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
Comma-separated list of agent names to install hooks for. Equivalent to passing agent names as positional arguments.
Install the hook to your user-scope config so it applies to every project, not just the current one.
Install the hook to the project-scope config (the default for most agents). Use this to make the hook explicit in your config file.
Print the planned config changes without writing anything. Use this to preview what the install will do before committing to it.
Skip the confirmation prompt and apply the install immediately. Useful in scripted environments.
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.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.
Managing hooks
Hook uninstall flags
Comma-separated list of agent names to remove hooks for.
Remove the hook from your user-scope config.
Remove the hook from the project-scope config.
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)
| Flag | Agent |
|---|---|
--claude | Claude Code |
--cursor | Cursor |
--gemini | Gemini CLI |
--pi | pi |
Rules-only agents
Rules-only agents
| Flag | Agent |
|---|---|
--codex | Codex |
--windsurf | Windsurf |
--cline | Cline |
--kilocode | Kilocode |
--antigravity | Antigravity |
--copilot | GitHub Copilot |