> ## Documentation Index
> Fetch the complete documentation index at: https://ccsafetynet.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# hook command

> Reference for cc-safety-net hook: the runtime hook entry point your agent calls, its integration flag for each agent, and which agents load CC Safety Net in process instead.

`hook` is the command your agent calls before it runs a tool. It reads the agent's hook input as JSON from stdin and, to block the call, answers in that agent's deny format. Your agent's plugin or config sets it up, so you do not normally run it by hand.

For example, `install --cursor` writes this command into Cursor's hook config, and Cursor runs it for every tool call:

```bash theme={"dark"}
npx -y cc-safety-net hook --cursor
```

## hook integration flags

`hook` requires exactly one integration flag, which names the agent. With no flag or more than one, it prints `hook requires exactly one integration flag. Try: cc-safety-net hook --kimi-code`, shows the command help, and exits `1`.

| Flag | Agent | Legacy flags |
| - | - | - |
| `-ac`, `--agy-cli` | [Antigravity CLI](/docs/installation/antigravity-cli.md) | None |
| `-cc`, `--coding-cli` | [Coding CLI (Claude Code)](/docs/installation/claude-code.md) | `--claude-code`; also `cc-safety-net -cc` and `cc-safety-net --claude-code` as top-level forms |
| `-cx`, `--codex` | [Codex](/docs/installation/codex.md) | None |
| `-cu`, `--cursor` | [Cursor](/docs/installation/cursor.md) | None |
| `-dv`, `--devin` | [Devin CLI](/docs/installation/devin-cli.md) | None |
| `-fd`, `--droid` | [Factory Droid](/docs/installation/factory-droid.md) | None |
| `-gc`, `--gemini-cli` | [Gemini CLI](/docs/installation/gemini-cli.md) | `cc-safety-net -gc` and `cc-safety-net --gemini-cli` as top-level forms |
| `-cp`, `--copilot-cli` | [GitHub Copilot CLI](/docs/installation/github-copilot-cli.md) | `cc-safety-net -cp` and `cc-safety-net --copilot-cli` as top-level forms |
| `-gb`, `--grok-build` | [Grok Build](/docs/installation/grok-build.md) | None |
| `-ha`, `--hermes-agent` | [Hermes Agent](/docs/installation/hermes-agent.md) | None |
| `-kc`, `--kimi-code` | [Kimi Code](/docs/installation/kimi-code.md) | None |

Each agent's page describes what its hook checks and what happens when the check fails. In Claude Code, the hook can ask you instead of blocking. See [When Claude Code asks you instead of blocking](/docs/installation/claude-code.md#when-claude-code-asks-you-instead-of-blocking).

## Agents without a hook flag

Amp Code, DeepSeek Harness, OpenClaw, OpenCode, and Pi have no `hook` flag. They load CC Safety Net inside their own process, as a plugin or extension. See [Integration models](/docs/guides/how-it-works.md#integration-models).

> [!NOTE]
>
> There is no `hook install` or `hook uninstall` subcommand. Use the top-level [`install`](/docs/reference/cli/install) and [`uninstall`](/docs/reference/cli/uninstall) commands.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.