@ryan_nookpi/pi-extension-claude-hooks-bridge

Bridge Claude Code hooks (.claude/settings.json) into pi extension lifecycle events.

Package details

extension

Install @ryan_nookpi/pi-extension-claude-hooks-bridge from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@ryan_nookpi/pi-extension-claude-hooks-bridge
Package
@ryan_nookpi/pi-extension-claude-hooks-bridge
Version
0.1.0
Published
Apr 16, 2026
Downloads
138/mo · 11/wk
Author
ryan_nookpi
License
MIT
Types
extension
Size
23.3 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

claude-hooks-bridge

Bridge Claude Code hooks (.claude/settings.json) into pi extension lifecycle events.

What it does

  • Reads .claude/settings.json hooks configuration from the project root
  • Executes hooks at matching lifecycle events:
    • SessionStartsession_start
    • UserPromptSubmitbefore_agent_start
    • PreToolUsetool_call (can block / ask for confirmation)
    • PostToolUsetool_result
    • Stopagent_end (can queue follow-up messages)
  • Supports matcher patterns (regex or pipe-separated tool names)
  • Maps pi tool names to Claude Code equivalents (bashBash, etc.)
  • Handles hook JSON output with permissionDecision / exit code 2 for blocking
  • Provides transcript files for Stop hooks

Requirements

  • bash is required — hooks are executed via bash -lc. Works on macOS and Linux. Not natively supported on Windows.

Install

pi install npm:@ryan_nookpi/pi-extension-claude-hooks-bridge