Integrate GGA with Husky, pre-commit, and Lefthook.
GGA works alongside popular git hook managers. Use these integrations when your project already uses a hook manager, or when you want to combine GGA with linters, formatters, and type checkers in a single hook pipeline.
If your project has no existing hook manager, gga install is all you need — it writes a native git hook directly and requires no additional tooling.
Lefthook is a fast, language-agnostic hook manager written in Go.
Setup
1
Install Lefthook
Homebrew
npm
brew install lefthook
npm install -D lefthook
2
Create lefthook.yml
lefthook.yml
pre-commit: parallel: false commands: ai-review: run: gga run fail_text: "Gentleman Guardian Angel failed. Fix violations before committing." lint: glob: "*.{ts,tsx,js,jsx}" run: npm run lint typecheck: run: npm run typecheck
3
Activate the hooks
lefthook install
parallel: false is set intentionally. Lefthook runs commands in parallel by default, but GGA must complete before other commands run — otherwise a failed review would not block subsequent steps.