Skip to main content

Configuration

Wiring hooks into Claude Code

ccmon observes claude sessions through Claude Code's hook system. Wire them in once with:

ccmon install

This merges entries into ~/.claude/settings.json. Existing user hooks are preserved, and each ccmon entry is tagged "_ccmon": true so ccmon uninstall can remove them cleanly later.

By default both event hooks (SessionStart, PreToolUse, PostToolUse, Notification, Stop, …) and the blocking PermissionRequest hook are installed. To skip the approval bridge:

ccmon install --no-approval

To target a non-default settings file:

ccmon install --settings /path/to/settings.json
caution

~/.claude/settings.json is global. ccmon hooks fire for every Claude Code session on the machine, including ones started before the daemon. Sessions started while the daemon was down still get tracked the moment they fire their next event.

Health check

Confirm everything is wired up:

ccmon doctor

Expected output:

daemon: OK (port 7777, version 0.1.0)
settings.json: OK (~/.claude/settings.json) — events: Notification, PermissionRequest, …
claude binary: /home/you/.local/bin/claude
notify-send: /usr/bin/notify-send
state dir: ~/.local/state/ccmon (writable)

If daemon is not OK, the daemon either isn't running or is bound to a different port — see Running the daemon.

Removing hooks

ccmon uninstall

Only entries tagged "_ccmon": true are removed; unrelated hooks stay intact.

Fail-safe behavior

The daemon is fail-safe: if it's down, hook scripts exit 0 silently and claude falls back to its normal in-terminal permission prompts. You will never lose a session because the daemon crashed — the worst case is a prompt appearing in your terminal instead of in the desktop UI.