Skip to content

Auto-install hooks during neurostack init #22

Description

@raphasouthall

Summary

neurostack hooks install currently requires a separate manual step after neurostack init. Hooks should be set up automatically as part of the init flow.

Proposed Behavior

During neurostack init, after vault setup and config generation:

  1. Install systemd harvest timer (existing hooks install logic) — hourly neurostack harvest --sessions 3
  2. Detect Claude Code and inject a SessionEnd hook into ~/.claude/settings.json that runs neurostack harvest --sessions 1 on session exit
  3. Support other agents (Codex, Gemini) if their hook config paths are detected

UX

  • Prompt user during interactive init: "Install automation hooks? (harvest timer + session hooks) [Y/n]"
  • --no-hooks flag to skip in non-interactive mode
  • Print summary of what was installed

Why

New users don't know about neurostack hooks install and miss out on automatic session harvesting. This is the highest-value automation NeuroStack provides and should be on by default.

Acceptance Criteria

  • neurostack init installs harvest timer unless declined
  • neurostack init detects Claude Code and adds SessionEnd hook
  • neurostack init --no-hooks skips hook setup
  • Idempotent — re-running init doesn't duplicate hooks
  • neurostack hooks status reflects hooks installed via init

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions