Install a hook
Install hooks for the agents you use. The command accepts agent names as positional arguments, as a--agent comma-separated list, or as individual shortcut flags:
Agent types
Not all agents have the same hook capabilities. aislop distinguishes between two types:Runtime adapters
These agents support a full scan + feedback loop. After every edit, aislop runs, and the score and diagnostics flow back into the agent’s context in real time.Supported agents:
claude, cursor, gemini, piRules-only
These agents read the aislop rules at session start and use them to guide their output. There is no live scan loop, but the agent is aware of the patterns it should avoid.Supported agents:
codex, windsurf, cline, kilocode, antigravity, copilotHook install flags
string
Comma-separated list of agent names to install hooks for. Equivalent to passing agent names as positional arguments.
boolean
Install the hook to your user-scope config so it applies to every project, not just the current one.
boolean
Install the hook to the project-scope config (the default for most agents). Use this to make the hook explicit in your config file.
boolean
Print the planned config changes without writing anything. Use this to preview what the install will do before committing to it.
boolean
Skip the confirmation prompt and apply the install immediately. Useful in scripted environments.
boolean
Add a Claude Stop hook that blocks the agent from completing an edit if the score regresses below the baseline. Requires setting a baseline first with
aislop hook baseline.Quality-gate mode
Quality-gate mode turns the hook into an active blocker: if the agent’s edit causes the score to drop below the baseline, the Stop hook fires and the edit is rejected. The agent sees the regression and must fix it before continuing.1
Install with --quality-gate
2
Capture the current score as the baseline
Run this after your codebase is in the state you want to protect. The baseline is stored locally and used by the Stop hook on every subsequent edit.
3
Work normally — regressions are blocked automatically
From this point on, any agent edit that drops the score below the baseline triggers the Stop hook. The agent sees the finding list and must resolve the regression before the edit is accepted.
Managing hooks
Hook uninstall flags
string
Comma-separated list of agent names to remove hooks for.
boolean
Remove the hook from your user-scope config.
boolean
Remove the hook from the project-scope config.
boolean
Print the planned removal without writing anything.
All agent shortcut flags
Bothhook install and hook uninstall accept these per-agent shortcut flags in addition to --agent:
Runtime adapters (scan + feedback)
Runtime adapters (scan + feedback)
Rules-only agents
Rules-only agents
