Skip to content
Fallow home
All docs pages

Docs home

fallow setup-hooks

fallow setup-hooks is a deprecated command that installs the commit gate, so use fallow agent install or fallow hooks.

Install or remove the commit gate, which blocks git commit and git push of a coding agent until fallow audit passes.

Commit gate for Claude Code and Codex explains the commit gate. This command is deprecated. Use fallow agent install for the full agent setup, or fallow hooks install --target agent for the commit gate only.

Synopsis

fallow setup-hooks [OPTIONS]

Options

OptionDescription
--agent <AGENT>Target a specific agent surface (default: auto-detect). Values: claude, codex.
--dry-runPrint what would be written or removed without touching the filesystem
--forceOverwrite a user-edited hook script, invalid settings.json, or remove a user-edited script during uninstall
--userWrite to the user's home directory instead of the project root
--gitignore-claudeAppend .claude/ to the project's .gitignore
--uninstallRemove the fallow-gate handler, hook script, and AGENTS.md managed block instead of installing them. Idempotent: reports "unchanged" when nothing to remove

The global options are in these groups: Project, Output, Scope, Baselines, Gates, Duplication, Type-aware, Performance.

Output

fallow setup-hooks --dry-run
warning: `fallow setup-hooks` is deprecated and will be removed in the next major; use `fallow agent install` or `fallow hooks install --target agent`.
fallow setup-hooks (install) (dry run):
  .claude/settings.json                       would create
  .claude/hooks/fallow-gate.sh                would create

Each row gives a file and the change to it.

Exit codes

CodeMeaning
0The command completed.
2Invalid input, for example an invalid settings.json.

See Exit codes.

Examples

# Use this command in place of fallow setup-hooks
fallow hooks install --target agent

# Remove a gate that fallow setup-hooks installed
fallow hooks uninstall --target agent