Configure options below — the preview updates in real time.

Root-Level Configuration

Global settings for the pre-commit configuration file.

Hook types installed by default when running pre-commit install.

pre-commit

Mapping of language names to default language_version (e.g. python: python3.11).

Global default for the stages property of hooks. Only overrides hooks that do not set stages.

Global regex pattern to filter which files hooks run on.

Global regex pattern to exclude files from hooks.

Fail FastAbort and stop running subsequent hooks after the first failure.

Require at least this version of the pre-commit CLI.

Repository Configuration

Define which repositories to fetch hooks from and their revisions.

Git repository URL to clone hooks from. Use "local" for local hooks or "meta" for built-in hooks.

The git revision or tag to clone at (e.g. v4.5.0). Not needed for local/meta repos.

Hook Configuration

Configure individual hooks: their identity, file matching, arguments, and behavior.

The unique identifier of the hook to use.

An additional custom ID to reference this hook with pre-commit run.

Override the display name shown during execution.

Override the language version for this hook (e.g. python3.11).

The language runtime for this hook. Required for local hooks.

The executable to run. Required for local hooks.

Regex pattern of files to run this hook on.

Regex pattern of files to exclude.

File types to run on evaluated with AND logic (e.g. text, executable).

File types to run on evaluated with OR logic.

File types to specifically exclude.

Additional parameters passed to the hook CLI.

Git hook stages this hook will execute during.

Extra packages to install into the hook's isolated environment.

Always RunRun the hook even if no files matched the file/type filters.
Fail Fast (Hook)If true, pre-commit will stop running subsequent hooks after this hook fails.
VerboseForce the hook output to be printed even if it succeeds.

Write hook output to this file path on failure or when verbose.

Pass FilenamesPass matched filenames as arguments to the hook. Set to false to omit them.
Require SerialForce the hook to run in a single process instead of parallelizing.

Override the description of what the hook does.

CI Configuration (pre-commit.ci)

Settings for the pre-commit.ci continuous integration service.

Custom commit message when pre-commit.ci auto-fixes and pushes changes.

Autofix PRsAutomatically push formatting fixes back to pull requests.

Branch for pre-commit.ci auto-update PRs (defaults to default branch).

Custom commit message for hook auto-update PRs.

How often pre-commit.ci auto-updates hooks.

Hook IDs that pre-commit.ci should skip (e.g. hooks needing credentials).

SubmodulesClone and validate git submodules in pre-commit.ci.