init-*
Three variants of ingrain init-*, one per harness, each registering the
ingrain hook entry point inside the harness’s own
configuration.
| Command | Harness |
|---|---|
ingrain init-claude | Claude Code |
ingrain init-cursor | Cursor |
ingrain init-speckit | spec-kit — registers the after_plan hook in selected repos. |
Claude Code
Section titled “Claude Code”ingrain init-claudeWrites the Claude Code hook configuration to your Claude settings so the
agent invokes ingrain hook --harness=claude at the right lifecycle points.
Run once per machine.
Cursor
Section titled “Cursor”ingrain init-cursorSame idea, configured for Cursor’s hook format.
spec-kit
Section titled “spec-kit”ingrain init-speckitInteractive — discovers spec-kit repos in your workspace and lets you pick
which ones to register the after_plan hook into. Re-run any time you add a
new repo you want covered.
Undoing
Section titled “Undoing”ingrain uninstall removes the hooks from every
harness in one pass, along with the binary and PATH entry.
To remove a single harness’s hook while keeping the others (and the CLI) installed, edit the harness’s hook configuration by hand:
- Claude Code: your Claude Code
settings.json(PreToolUseentries referencingingrain hook). - Cursor: the Cursor hooks file.
- spec-kit: the
after_planhook entry in each repo where you registered it.