Skip to main content

All commands

CommandDescriptionExample
gga initCreate sample .gga config filegga init
gga installInstall git pre-commit hook (default)gga install
gga install --commit-msgInstall git commit-msg hookgga install --commit-msg
gga uninstallRemove git hooks from current repogga uninstall
gga runRun code review on staged filesgga run
gga run --no-cacheRun review ignoring cachegga run --no-cache
gga run --ciRun review on last commit (CI/CD)gga run --ci
gga run --pr-modeReview all files changed in the full PRgga run --pr-mode
gga run --pr-mode --diff-onlyPR review with diffs only (faster, cheaper)gga run --pr-mode --diff-only
gga configDisplay current configuration and statusgga config
gga cache statusShow cache status for current projectgga cache status
gga cache clearClear cache for current projectgga cache clear
gga cache clear-allClear all cached datagga cache clear-all
gga versionShow installed versiongga version
gga helpShow help message with all commandsgga help

gga init

Creates a sample .gga configuration file in your project root with sensible defaults.
gga init
Terminal output:
 Created config file: .gga
The generated file includes commented examples for every setting: PROVIDER, FILE_PATTERNS, EXCLUDE_PATTERNS, RULES_FILE, STRICT_MODE, TIMEOUT, and PR_BASE_BRANCH.
If a .gga file already exists, gga init prompts you before overwriting:
⚠️  Config file already exists: .gga
Overwrite? (y/N):
Press y to overwrite or any other key to abort.

gga install

Installs a git hook that automatically runs code review on every commit.
Installs a pre-commit hook. The hook runs gga run before every commit and blocks the commit if the review fails.
gga install
Terminal output:
 Installed pre-commit hook: .git/hooks/pre-commit
Appends rather than replaces. If a hook file already exists, GGA adds its block between markers (# ======== GGA START ======== / # ======== GGA END ========) rather than overwriting the file. If an existing exit 0 statement is found, GGA inserts its block before the final exit so it always runs.
GGA uses git rev-parse --git-path hooks to locate the hooks directory. This works correctly for both regular repositories and git worktrees.

gga uninstall

Removes GGA from the pre-commit and/or commit-msg hooks in your repository.
gga uninstall
Terminal output:
 Removed pre-commit hook (was GGA-only)
If GGA was appended alongside other hook content, only the GGA block is removed and the rest of the hook file is preserved:
 Removed Gentleman Guardian Angel from pre-commit hook
If the hook file becomes empty after removal (only the shebang line and whitespace remain), GGA deletes the file entirely.

gga run

Reviews staged files against your AGENTS.md rules by sending them to your configured AI provider. Smart caching is enabled by default — unchanged files that previously passed are skipped.
gga run
See Run modes for all flags: --no-cache, --ci, --pr-mode, and --diff-only.

gga config

Shows the current configuration, the location of each loaded config file, and the resolved value of every setting.
gga config
Terminal output:
Current Configuration:

Config Files:
  Global:  Not found
  Project: .gga

Values:
  PROVIDER:          claude
  FILE_PATTERNS:     *.ts,*.tsx,*.js,*.jsx
  EXCLUDE_PATTERNS:  *.test.ts,*.spec.ts
  RULES_FILE:        AGENTS.md
  STRICT_MODE:       true
  TIMEOUT:           300s
  PR_BASE_BRANCH:    auto-detect

Rules File: Found
Config files are loaded in order: global config (~/.config/gga/config) first, then project config (.gga), then environment variables. Each layer overrides the previous one.

gga cache <subcommand>

Manages the smart file review cache. See Smart caching for a full explanation of how the cache works.
gga cache status
  • status — Shows the cache directory, validity, file count, and size for the current project.
  • clear — Clears the cache for the current project only.
  • clear-all — Clears cached data for all projects.

gga version

Shows the installed version of gga.
gga version
Terminal output:
gga v1.2.3
After printing the version, gga automatically checks GitHub for a newer release and prints an upgrade notice if one is available:
gga v1.2.3
  Update available: v1.2.3 v1.3.0
  brew update && brew upgrade gga
The update check is skipped for dev builds (when VERSION=dev). It has a 2-second timeout and fails silently if the network is unavailable.

Bypass review

To commit without running the pre-commit hook, use --no-verify:
git commit --no-verify -m "wip: work in progress"
Short form:
git commit -n -m "hotfix: urgent fix"
Bypassing the hook skips the AI review entirely. Use this only when necessary — for example, for work-in-progress commits or emergency hotfixes.

Build docs developers (and LLMs) love