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

# hook

> Forward Claude Code file-change events to the Supermodel daemon

Reads a Claude Code `PostToolUse` JSON payload from stdin and forwards the file path to the running Supermodel daemon via UDP. Install as a `PostToolUse` hook in `.claude/settings.json`.

## Synopsis

```bash theme={null}
supermodel hook [flags]
```

## Flags

| Flag         | Description                                        |
| ------------ | -------------------------------------------------- |
| `--port`     | UDP port of the Supermodel daemon (default `7734`) |
| `-h, --help` | Help for hook                                      |

## Example

Add to `.claude/settings.json`:

```json theme={null}
{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Write|Edit",
      "hooks": [{ "type": "command", "command": "supermodel hook" }]
    }]
  }
}
```

The `supermodel setup` wizard installs this automatically when Claude Code is detected.
