Skip to main content

install_hooks_claude_code

Function install_hooks_claude_code 

Source
pub fn install_hooks_claude_code(
    hooks_dir: &Path,
    settings_path: &Path,
    dry_run: bool,
) -> Result<HooksResult, CliError>
Expand description

Install Seshat hooks for Claude Code and register them in settings.json.

Writes two executable scripts to hooks_dir:

  • seshat-session-start — soft SessionStart reminder
  • seshat-pre-tool — soft PreToolUse nudge (1 per session)

Registers both in settings_path (typically ~/.claude/settings.json) under the "hooks" key. Idempotent: skips entries already present.