pkg.soopen package index

brew / rank 368

Install pre-commit with Homebrew, apk, apt, dnf, MacPorts, Nix, pacman

Framework for managing multi-language pre-commit hooks. Version 4.6.2 via Homebrew; verified 2026-09-11. Also installable with debian: sudo apt install pre-commit.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install pre-commit

local Homebrew formula metadata

MacPortsverified · 94%
sudo port install pre-commit

MacPorts ports tree · python/pre-commit/Portfile · source: api.github.com

Linux

Alpine Linux apkverified · 92%
sudo apk add pre-commit

Alpine Linux edge package indexes · pre-commit · source: dl-cdn.alpinelinux.org

Debian aptverified · 92%
sudo apt install pre-commit

Debian stable package indexes · pre-commit · source: deb.debian.org

Fedora dnfverified · 92%
sudo dnf install pre-commit

Fedora Rawhide package metadata · pre-commit · source: dl.fedoraproject.org

Nixverified · 92%
nix profile install nixpkgs#pre-commit

nixpkgs package indexes · pkgs/by-name/pr/pre-commit/package.nix · source: api.github.com

Arch Linux pacmanverified · 92%
sudo pacman -S pre-commit

Arch Linux sync databases · pre-commit · source: geo.mirror.pkgbuild.com

overview

Package summary

Framework for managing multi-language pre-commit hooks

Commands and aliases

  • pre-commit

history

Project history and usage

pre-commit is a framework and multi-language package manager for installing and running reusable Git hooks.

Project history

pre-commit began in 2014 to replace copied, project-specific Git-hook scripts with reusable hooks that could be shared across repositories and implemented in different languages. Anthony Sottile has been the principal maintainer.

Version 1.0.0 in 2017 formalized semantic versioning and introduced the modern top-level-map configuration format. The project continued broadening language support and refining isolated toolchain installation, reaching the 4.x series in 2024.

Adoption history

pre-commit became broadly distributed across Linux and macOS package managers in addition to its native Python installation routes. Its language adapters let repositories consume hooks implemented in ecosystems such as Python, Node, Ruby, Go, Rust, Docker, and others without requiring every toolchain to be managed directly by each project.

The framework's configuration convention and reusable hook repositories made it a common integration point for formatters, linters, security checks, and repository-policy tools. It is also routinely run in CI against all files, complementing its local Git-hook role.

How it is used

A project places .pre-commit-config.yaml at its repository root, listing hook repositories, pinned revisions, and selected hooks. Running pre-commit install writes the Git hook, after which configured checks run during commits or other selected Git stages.

pre-commit run --all-files is commonly used for initial adoption and CI. pre-commit autoupdate refreshes configured hook revisions, while the framework caches isolated hook environments for reuse.

Why package nerds care

pre-commit describes itself as a multi-language package manager for hooks. That framing is important to package enthusiasts: it resolves hook repositories and revisions, creates isolated environments, bootstraps supported runtimes where possible, and reuses cached installations.

Its ecosystem separates the orchestration framework, hook-provider repositories, and project-local YAML policy. This makes heterogeneous developer tooling reproducible without forcing an application's primary dependency manager to own every linter or formatter.

Timeline

  • 2014: Version 0.1.0 was released.
  • 2017: Version 1.0.0 adopted semantic versioning and introduced the modern configuration structure.
  • 2024: Version 4.0.0 removed the deprecated python_venv language alias and updated hook-stage naming.
  • 2025: Version 4.1.0 added Julia hook support.

Related projects

  • pre-commit/pre-commit-hooks is the official collection of general-purpose hooks released alongside the framework.
  • pre-commit.ci applies the same configuration in hosted continuous integration.
  • Individual formatter, linter, and security-tool repositories can publish hooks through a .pre-commit-hooks.yaml manifest.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Installs with 2 runtime dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

local files

Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.

Configuration files

Config paths the tool may read or write during local use.

Unix
.pre-commit-config.yaml

executables

Installed executables

CommandKindExposureNote
pre-commitcliglobal executable

freshness

Version and freshness

These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.

page generated2026-09-19
manager version4.6.2
manager updated2026-09-11
local dataok
upstreamnot checked
latest detectednot detected

https://pre-commit.com/

install metadata

Package metadata

Package keybrew:pre-commit
Version4.6.2
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/pre-commit
Homepagehttps://pre-commit.com/
Repositoryhttps://github.com/pre-commit/pre-commit
Upstream docshttps://pre-commit.com/
LicenseMIT
Source archivehttps://files.pythonhosted.org/packages/74/89/1f3e8e1fc3e97de0fa963495832f581f025f29471602a309e48808244292/pre_commit-4.6.2.tar.gz
Last updated2026-09-11T23:11:18Z
Pulseupdated
Dependencieslibyaml, python@3.14
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namepre-commit
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Debian apt95%

pre-commit 4.2.0-2

Git pre-commit hook framework

https://pre-commit.com

sudo apt install pre-commit
  • Section: utils
  • Architecture: all
  • 6 dependencies
  • normalized package name match
  • Matched by: Pre Commit
Debian stable package indexes · deb.debian.org · Debian stable package indexes: pre-commit from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

pre-commit

nix profile install nixpkgs#pre-commit
  • normalized package name match
  • Matched by: Pre Commit
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/pr/pre-commit/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

pre-commit 3.6.2-1

Git pre-commit hook framework

https://pre-commit.com

sudo apt install pre-commit
  • Section: universe/utils
  • Architecture: all
  • 6 dependencies
  • normalized package name match
  • Matched by: Pre Commit
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: pre-commit from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

pre-commit 4.6.2-r0

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

https://pre-commit.com

sudo apk add pre-commit
  • License: MIT
  • Architecture: x86_64
  • Source Package: pre-commit
  • 1 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Pre Commit
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: pre-commit from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
apk95%

pre-commit-pyc 4.6.2-r0

Precompiled Python bytecode for pre-commit

https://pre-commit.com

sudo apk add pre-commit-pyc
  • License: MIT
  • Architecture: x86_64
  • Source Package: pre-commit
  • 1 dependencies
  • normalized package name match
  • Matched by: Pre Commit
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: pre-commit-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
dnf95%

pre-commit 4.6.2-1.fc45

Framework for managing and maintaining multi-language pre-commit hooks

https://pre-commit.com

sudo dnf install pre-commit
  • License: MIT
  • Category: Unspecified
  • Architecture: noarch
  • Source Package: pre-commit
  • 5 dependencies
  • 3 provides
  • normalized package name match
  • Matched by: Pre Commit
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: pre-commit from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/652278618dec9c023176a80c435a32a2c8154869fb0eb662c267a54df28d77d9-primary.xml.zst
pacman95%

pre-commit 4.6.2-1

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

https://github.com/pre-commit/pre-commit

sudo pacman -S pre-commit
  • License: MIT
  • Architecture: any
  • 6 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Pre Commit
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: pre-commit from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
MacPorts95%

pre-commit

sudo port install pre-commit
  • normalized package name match
  • Matched by: Pre Commit
MacPorts ports tree · api.github.com · MacPorts ports tree: python/pre-commit/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment
  • pkg.so package database
  • pkgdb category and tag curation