claude-hooks TypeScript-powered hook system for Claude Code - write hooks with full type safety and auto-completion Overview claude-hooks g…
claude-hooks TypeScript-powered hook system for Claude Code - write hooks with full type safety and auto-completion Overview claude-hooks g…
TypeScript-powered hook system for Claude Code - write hooks with full type safety and auto-completion
claude-hooks gives you a powerful, TypeScript-based way to customize Claude Code's behavior. Write hooks with full type safety, auto-completion, and access to strongly-typed payloads - all in familiar TypeScript syntax. No more guessing payload structures or dealing with untyped data!
npx claude-hooksThis will:
.claude/settings.json with hook configuration.claude/hooks/index.ts with TypeScript handlersnpx claude-hooksnpm install -g claude-hooks
claude-hooksThe CLI sets up a complete TypeScript development environment for Claude hooks:
.claude/settings.json - Hook configuration.claude/hooks/index.ts - Your main hook handlers (edit this!).claude/hooks/lib.ts - Type definitions and utilities.claude/hooks/session.ts - Optional session tracking utilities.claude/
├── settings.json
└── hooks/
├── index.ts
├── lib.ts
└── session.tsSession logs are saved to: /claude-hooks-sessions/
The real power comes from editing .claude/hooks/index.ts. You get full TypeScript support with typed payloads:
…The beauty is that you're writing regular TypeScript - use any npm packages, async/await, or patterns you're familiar with!
claude-hooks init [OPTIONS]
OPTIONS:
-f, --force Overwrite existing hooks
-h, --help Show helpcurl -fsSL https://bun.sh/install | bashMIT
No open issues yet, or sync has not completed.