Lefthook
$ lefthook Community Low RiskA single-binary, zero-dependency Git hooks manager written in Go that runs repo checks in parallel. Supports lefthook dump for inspecting resolved YAML/JSON config and --no-tty for clean headless agent execution.
brew install lefthook Executes local repo checks directly as subprocesses; MCP adds no value over direct CLI invocation.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --no-tty, NO_COLOR=1, and lefthook dump --format json, though run output is plain command stdout.
lefthook run --no-ttydisables interactive spinnerslefthook dump --format jsonprints effective configuration
Zero remote auth surface and deterministic local lefthook.yml execution; dump enables pre-flight inspection.
- Purely local configuration with explicit
runtargeting
Single static Go binary installable via Homebrew, npm, Go, and release tarballs across all major OSes.
- Fast standalone Go binary with zero runtime dependencies
Parallel hook execution and glob filtering make monorepo checks significantly faster than sequential runners.
- Parallel command execution with
{staged_files}substitution
Actively maintained by Evil Martians under MIT license.
- Active
evilmartians/lefthookrepository
Clear configuration docs at lefthook.dev and concise --help flags.
- Structured configuration docs at lefthook.dev
Security, Auth & Guardrails
No credentials required; reads local lefthook.yml and .lefthook-local.yml configuration files.
MIT open-source Go binary; completely free.
# Lefthook Agent Rules - Pass `--no-tty` and set `NO_COLOR=1` when running `lefthook run` in agent shells. - Use `lefthook dump` to inspect which commands a hook triggers before running it.
Agent-Ready Command Recipes
Safe Read-Only Queries
lefthook dump --format json
Prints the effective merged hook configuration in JSON format without running any hooks.
Controlled Writes & Previews
lefthook run pre-commit --no-tty
Runs configured pre-commit commands across files with interactive TTY progress disabled.
Strengths for Agents
- + Single Go binary starts instantly and runs polyglot checks in parallel.
- +
--no-ttyandNO_COLOR=1keep agent logs clean. - +
lefthook dump --format jsonmakes hook inspection trivial.
Caveats & Pitfalls
- !
lefthook runaggregates raw command output without a JSON test/lint summary. - ! Relies on tools already installed in the repo environment (unlike
pre-commitauto-envs).