# pre-commit

A framework for managing and maintaining multi-language pre-commit hooks.

Repository: https://github.com/pre-commit/pre-commit
Canonical: https://ross.abutalabs.com/products/pre-commit
Homepage: https://pre-commit.com
Language: Python
License: MIT
License Family: permissive
Topics: git, pre-commit, python, linter, refactoring
Last push: 2026-08-17T23:37:08+00:00
Link (homepage): https://pre-commit.com
Link (site_page): https://pre-commit.com/index.html

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 85, longevity 100
- inputs: {"age_days": 4557, "days_push": 16, "days_rel": 23, "gap_med": 74.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 15536, forks 1001 (observed 2026-08-28T04:11:11.735963+00:00)

## What it is
pre-commit is a framework for managing and maintaining multi-language Git pre-commit hooks. It automatically installs and runs hooks written in any language before each commit, catching issues like formatting errors and debug statements before code review.

## Use cases
- run linters automatically before every git commit
- share linting hooks across multiple projects
- use linters written in other languages without installing their toolchains
- check for trailing whitespace and missing semicolons on commit
- enforce code style checks before code review
- manage pre-commit hook dependencies without root access

## When to choose
- you want consistent automated checks on every commit across a team
- your project uses linters written in multiple languages
- you want to share hook configurations across many repositories
- you want to catch trivial style issues before human review

## When to avoid
- you only need a CI pipeline check without local git hooks
- your team commits infrequently and hooks would slow the workflow
- you need hooks for non-git version control systems

## Facets
- artifact type: framework
- maturity: stable
- function: linter, developer-tools, cli, code-review, formatter
- domain: developer-tools, version-control
- platform: python, cross-platform, cli
- tags: git-hooks, pre-commit-hooks, code-quality, multi-language, linting, command-line, automation

## Member repositories
- pre-commit/pre-commit (main) score 94
- pre-commit/pre-commit-hooks (plugin) score 68

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:11.735963+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:05:40.873325+00:00, confidence not recorded.
  - readme: https://github.com/pre-commit/pre-commit (fetched 2026-08-28T04:11:11.735963+00:00, sha e247ace0ab84)
  - homepage: https://pre-commit.com (fetched 2026-08-29T08:03:52.091271+00:00, sha 2441b1c2f7d4)
  - registry_pypi: https://pypi.org/pypi/pre-commit/json (fetched 2026-08-29T08:03:52.105843+00:00, sha be2f31705b53)
  - registry_pypi: https://pypi.org/pypi/pre-commit-hooks/json (fetched 2026-08-29T08:03:52.107649+00:00, sha 3377edd81869)
  - site_page: https://pre-commit.com/index.html (fetched 2026-08-29T08:03:52.102050+00:00, sha 2441b1c2f7d4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
