Skip to main content
Version: Next

Events & Hooks

Emit activity/lifecycle events and wire insight-flow into Claude Code hooks. These power the dashboard's live activity feed and timeline.

Events

CommandPurpose
log-eventEmit a typed lifecycle event. Flags: --task, --data, --source, --hook-name.
log-activityEmit a narrative line to the activity feed.
notifyFire an OS notification. Flags: --title, --project.

log-event types include: start, done, active, idle, edit-start, edit-end, research-start, research-end, review-start, review-end, git-start, git-end.

Hooks

CommandPurpose
install-activity-hookInstall the Claude Code PostToolUse activity hook. Flag: --force.
install-lifecycle-hooksInstall lifecycle event hooks. Flag: --bin.
migrate-hooksRefresh hook scripts after an upgrade. Flag: --bin.
hookSugar for log-event, mapped from Claude hook names (Stop, Notification, PreToolUse, PostToolUse, SessionStart, SessionEnd, UserPromptSubmit, SubagentStop, PermissionRequest). Flag: --provider cursor.

Example

insight-flow log-event start --task N42
insight-flow install-activity-hook --force