Pre-Commit Config Generator
Build production-grade .pre-commit-config.yaml hook configurations with curated multi-language presets — entirely on this device.
# .pre-commit-config.yaml
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/biomejs/pre-commit
rev: v0.4.0
hooks:
- id: biome-check
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks- Install pre-commit: pip install pre-commit (or brew install pre-commit).
- Install the git hook scripts in your repo: pre-commit install.
- Run against all files to test: pre-commit run --all-files.
- Hooks will now execute automatically on git commit, blocking non-compliant commits.
Do it offline:$
How to use it
- Select your target language and tooling presets (core formatting, Ruff, Biome, Prettier, Gitleaks, ShellCheck).
- Optionally enable fail_fast to halt test execution immediately upon encountering the first failure.
- Review the generated YAML configuration with pinned repository revisions and hook IDs.
- Copy the snippet to .pre-commit-config.yaml in your repository root and install using pre-commit install.
Generate production-ready .pre-commit-config.yaml configurations with pinned versions and curated presets for Python, JavaScript, TypeScript, Go, Rust, and secret detection.
How it works
The pre-commit framework manages multi-language git hooks in isolated virtual environments without polluting your local global environment.
Every repository revision in the generated config is pinned to a verified release tag or commit hash to guarantee deterministic CI and local reproducibility.
Hooks execute automatically whenever a developer runs 'git commit', catching formatting violations, syntax errors, and leaked API secrets before code leaves the developer machine.
Configurations are generated entirely on this device in pure TypeScript with zero telemetry or network calls.
Examples
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
Common errors
FAQ
How do I run pre-commit manually without making a commit?
You can run all configured hooks across your entire repository by executing 'pre-commit run --all-files' in your terminal.
How do I temporarily bypass pre-commit hooks in an emergency?
You can bypass git hooks for a single commit using the '--no-verify' flag: 'git commit -m 'quick hotfix' --no-verify'.
Why should hook revisions (rev) be pinned to specific tags?
Pinning revisions ensures everyone on your team runs the exact same linter and formatter versions, preventing conflicting style formatting battles between developers.