bootspring hook
Manage assistant hook configuration for Claude Code and Codex.
Overview
The hook command manages deterministic hook dispatching for AI assistants. Hooks inject memory context, session stats, and suggestions into every conversation automatically.
Usage
Loading code block...
Commands
| Command | Description |
|---|---|
install | Write hook config to Claude and Codex settings, initialize .bootspring/memory/ |
status | Show installed hook configuration |
doctor | Validate hook configs for stale events and dispatcher drift |
smoke [events...] | Dry-run dispatcher handlers locally with sample payloads |
memory-smoke | Verify memory prompt injection with isolated fixtures |
uninstall | Remove all hook entries from Claude and Codex settings |
dispatch <event> | (Internal) Dispatch a hook event to handlers in order |
profile | Manage hook profile (minimal, standard, strict) |
Install Options
| Option | Description |
|---|---|
--dry-run | Show what would be written without modifying files |
What hook install Does
- Writes deterministic hook config to
.claude/settings.local.jsonand.codex/hooks.json - Registers handlers in order: stats, suggest, recall
- Initializes
.bootspring/memory/with default blocks - Auto-populates project context from repo metadata (package.json, git info, stack)
Hook Events
Hooks fire on these assistant lifecycle events:
| Event | Description |
|---|---|
UserPromptSubmit | Before a user prompt is sent (injects memory context) |
PostToolUse | After a tool completes (collects stats) |
Stop | When the assistant stops (saves session snapshot) |
Hook Profiles
| Profile | Description |
|---|---|
minimal | Memory recall only |
standard | Memory + stats + suggestions (default) |
strict | All handlers + validation |
Error Isolation
Each handler runs in its own subprocess. If one handler fails, the others continue unaffected. This prevents a broken stats collector from blocking memory injection.
Examples
Loading code block...
Related
bootspring memory- Cross-session memorybootspring observe- Session observabilitybootspring init- Project initialization- Hooks Feature Guide - How hooks work