Opt-in Claude Code SessionStart hook

New sessions can start already knowing your project brain pages — brain install-hooks adds a project-local SessionStart hook for Claude Code.

Highlights

brain install-hooks

Project-local only (.claude/settings.json). It never writes ~/.claude/settings.json.

npx @mindmux/brain-md setup -y
npx @mindmux/brain-md init
npx @mindmux/brain-md install-hooks

Reverse with brain uninstall-hooks. Both commands are idempotent.

  • The hook only shells out to brain brain-dir and brain list-pages; it never reads or writes brain Markdown files.
  • No-ops when the brain is not populated; any failure exits 0.
  • Injects the compact page list (id / title / category / status), not page bodies.
  • brain init does not install the hook; it only mentions the command.

Install notes

  • Prefer a global install if you want bare brain on PATH; npx alone does not leave brain on PATH.
  • Existing 0.1.0 installs: bump to @mindmux/[email protected], then run brain setup -y.

Related links

Share to