PRE-COMMIT(1)

πŸ“¦ version 4.7.0, in epel 10, fedora 43, fedora 44

✨ PRE-COMMIT ✨

okay so bestie, gather round, because this is pre-commit β€” the manual page for the framework that manages and maintains your multi-language pre-commit hooks. It lives in the User Commands corner of the manual-verse, and honestly? It's giving main character energy. πŸ’…


🌸 NAME 🌸

pre-commit</purg> β€” a whole framework for managing and maintaining multi-language pre-commit hooks. no cap. that's literally the entire job description. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

pre-commit [-h] [-V]
{autoupdate,clean,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help,hook-impl} ...

so you either ask it for help, ask it for its version, or you pick one of those fifteen little subcommand girlies and let them cook. simple as. 🫢


πŸ’– OPTIONS πŸ’–

πŸŽ€ POSITIONAL ARGUMENTS πŸŽ€

here's the lineup, bestie β€” one bullet per subcommand, no skipping, no summarising, we are thorough in this house:

{autoupdate,clean,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help,hook-impl}
  • autoupdate β€” auto-updates your pre-commit config to the latest repos' versions. glow up your pins automatically ✨

See pre-commit-autoupdate(1).

  • clean β€” cleans out pre-commit files. a lil spring cleaning moment 🧹

See pre-commit-clean(1).

  • gc β€” cleans unused cached repos. garbage collection but make it cute πŸ—‘οΈβœ¨

See pre-commit-gc(1).

  • init-templatedir β€” installs the hook script in a directory that's intended for use with git config init.templateDir. templated dirs, but make it pre-commit πŸ’…

See pre-commit-init-templatedir(1).

  • install β€” installs the pre-commit script. the classic. the icon. the moment. πŸ‘‘

See pre-commit-install(1).

  • install-hooks β€” installs hook environments for all environments in the config file. quick lil heads-up: you may find pre-commit install --install-hooks more useful πŸ‘€

See pre-commit-install-hooks(1).

  • migrate-config β€” migrates list configuration to new map configuration. out with the old shape, in with the new πŸ¦‹

See pre-commit-migrate-config(1).

  • run β€” runs hooks. yeah. that one. the whole point. πŸ”₯

See pre-commit-run(1).

  • sample-config β€” produces a sample .pre-commit-config.yaml file. starter pack behaviour 🎁

See pre-commit-sample-config(1).

  • try-repo β€” tries the hooks in a repository. super useful for developing new hooks, fr fr πŸ§ͺ

See pre-commit-try-repo(1).

  • uninstall β€” uninstalls the pre-commit script. breaking up is hard to do 😭

See pre-commit-uninstall(1).

  • validate-config β€” validates .pre-commit-config.yaml files. vibe check, but for your config 🫢

See pre-commit-validate-config(1).

  • validate-manifest β€” validates .pre-commit-hooks.yaml files. same energy, different file πŸ’œ

See pre-commit-validate-manifest(1).

  • help β€” shows help for a specific command. the "bestie explain" button πŸ“–

See pre-commit-help(1).

and yeah, hook-impl is in that braces list up there too β€” it just doesn't get its own little paragraph here. it's the mysterious quiet one. πŸ™ˆ


⭐ OPTIONAL ARGUMENTS ⭐

  • -h, --help β€” show a help message and exit. when in doubt, ask for help ✨
  • -V, --version β€” show the program's version number and exit. for when you gotta know which girl you're dealing with πŸ’…

🌈 SEE ALSO 🌈

the whole squad, all thirteen friends, all linked up, all iconic:

pre-commit-autoupdate(1), pre-commit-clean(1), pre-commit-gc(1), pre-commit-init-templatedir(1), pre-commit-install(1), pre-commit-install-hooks(1), pre-commit-migrate-config(1), pre-commit-run(1), pre-commit-sample-config(1), pre-commit-try-repo(1), pre-commit-uninstall(1), pre-commit-validate-config(1), pre-commit-validate-manifest(1), pre-commit-help(1)


and that's the whole page, bestie 🫢 go forth and hook responsibly. this was PRE-COMMIT(1) from the User Commands section, dated February 2025 β€” periodt. πŸ’–βœ¨

πŸ“¦ where this page comes from