jq gymnastics. ## The shell hook problem Basic hooks work but lack structure: - JSON parsing needs extra tools - No autocompletion or type checking - Complex logic gets messy fast ## Bun + TypeScript solution Set up a typed hook environment: ### Why this pattern scales - Type safety: SDK types catch errors at write-time - One-line parsing: Bun.stdin.json() replaces complex pipes - NPM ecosystem: Use any package for advanced automationhttps://egghead.io/lessons/type-safe-claude-code-hooks-with-bun-and-type-script~76nmz