Documentation

CLI reference / Agent hooks

cumaru hooks

Print deterministic offline context payloads for native agent hooks.

Synopsis

cumaru hooks session|prompt|disciplines
cumaru hooks pretool < event.json

Arguments and options

Argument or optionMeaning
sessionPrint the discipline index and every discipline body, then the root tree projection.
promptPrint the kernel summary, then the discipline digest.
disciplinesPrint a compact digest of every installed discipline summary.
pretoolRead PreToolUse JSON on stdin and deny whole-file shell reads of .cumaru/ Markdown.

Side effects

  • Writes: None.
  • Network: None. Reads only local files.

Behavior

  • Install registers session, prompt, and pretool in .claude/settings.json or .codex/hooks.json. You do not normally run them by hand.
  • pretool redirects cat, head, tail, and non-in-place sed on .cumaru/ Markdown to cumaru map and cumaru get. Other commands pass.
  • The commands validate the complete set before printing, print one diagnostic line on failure, and always exit 0.

Example

cumaru hooks prompt

Failures

  • Invalid metadata or budget overflow prints one diagnostic line; the exit status stays 0 so a session is never disturbed.

Sources: Agent adapters: context bootstrap; cumaru hooks --help of CLI 0.15.3.

Back to all commands