pre-commit

A command-line framework for managing and running multi-language Git pre-commit hooks across projects.

These buttons open the developer's own site, repository or store listing in a new tab. wares.gg does not host downloads.

1 more ways to get pre-commit

Package managers

About pre-commit

pre-commit runs checks on every Git commit to catch simple issues such as trailing whitespace, missing semicolons and leftover debug statements before code review. You list the hooks you want in a configuration file and pre-commit installs and runs them.

It acts as a package manager for hooks, so a linter written in another language, such as a Ruby-based SCSS linter in a Node project, can be used without setting up that language yourself. It also supports CI use through a GitHub Action.

Strengths

  • Installs hook environments for many languages automatically
  • Hooks shared across projects through a single config file
  • Works locally and in CI

Limitations

  • Requires Python to run
  • First run can be slow while hook environments are installed

Details

Pricing
FreeFree and open source.
License
MIT
Developer
The pre-commit contributors
Platforms
Windows, macOS, Linux, Command line
How it runs
Downloadable app
Account
Not required
Best suited for
Development teams that want consistent lint and format checks before each commit
Categories
Developer tools
Last verified
Added
Provenance
Facts checked against the developer's own pages and store listings, 1 sources on file.

Alternatives to pre-commit

Compare all

Software that can replace pre-commit for an important use case, and what changes if you switch.

  • prek

    Run code checks using existing pre-commit hooks and configurations.

    prek runs the same pre-commit hooks and configurations, so existing setups carry over, though individual hooks may still need their own tools and dependencies installed.

Similar software

Related functionality, not necessarily a direct replacement.

Report a wrong fact or a dead link on this listing