{"_id":"@c-p-b/cc-hooks","_rev":"2-9a88b29bf0ca1a12ea863072effe4f00","name":"@c-p-b/cc-hooks","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.5":{"name":"@c-p-b/cc-hooks","version":"0.1.5","keywords":["claude","claude-code","hooks","automation","cli","developer-tools"],"author":"","license":"MIT","_id":"@c-p-b/cc-hooks@0.1.5","maintainers":[{"name":"c-p-b","email":"conor.barber@pm.me"}],"homepage":"https://github.com/c-p-b/cc-hooks#readme","bugs":{"url":"https://github.com/c-p-b/cc-hooks/issues"},"bin":{"cc-hooks":"dist/cli.js"},"dist":{"shasum":"f48692ca94d7df9eca05b272474aa6f2e0840f82","tarball":"https://registry.npmjs.org/@c-p-b/cc-hooks/-/cc-hooks-0.1.5.tgz","fileCount":121,"integrity":"sha512-BCG6X0LTsuj+VDh7kl8Gz5/XsPBueusndRrqyQR5DCV0XI42ZMrmHyOkHPolozSsZu2gS68nj0BkJxFDG3HXHQ==","signatures":[{"sig":"MEYCIQDafjTcXuNfki5YF8IA3fgXZLQnH0b7qmLQr7J3T4GXiwIhAMLoYPmYdo6lQOytE2PDMV2yM3RES/29xf5QA/JVPGlr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@c-p-b%2fcc-hooks@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":394576},"main":"dist/index.js","engines":{"node":">=18.0.0 <23.0.0"},"gitHead":"04f794309fc07774976816c83b6224b4f18311e4","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts","test":"jest --maxWorkers=50%","build":"tsc","clean":"rm -rf dist","format":"prettier --write 'src/**/*.ts'","pretest":"npm run build","lint:fix":"eslint src --ext .ts --fix","test:unit":"jest __tests__/unit","test:watch":"jest --watch","format:check":"prettier --check 'src/**/*.ts'","test:coverage":"jest --coverage","prepublishOnly":"npm run lint && npm run test && npm run build","test:integration":"jest __tests__/integration"},"_npmUser":{"name":"c-p-b","email":"conor.barber@pm.me"},"repository":{"url":"git+https://github.com/c-p-b/cc-hooks.git","type":"git"},"_npmVersion":"10.8.2","description":"A universal, stable, and user-friendly hook management system for Claude Code","directories":{},"_nodeVersion":"20.19.4","dependencies":{"chalk":"^4.1.2","commander":"^14.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.5","eslint":"^9.33.0","ts-jest":"^29.4.1","ts-node":"^10.9.2","prettier":"^3.6.2","typescript":"^5.9.2","@types/jest":"^30.0.0","@types/node":"^24.3.0","eslint-config-prettier":"^10.0.1","eslint-plugin-prettier":"^5.2.2","@typescript-eslint/parser":"^8.39.1","conventional-commits-parser":"^6.2.0","@typescript-eslint/eslint-plugin":"^8.39.1"},"_npmOperationalInternal":{"tmp":"tmp/cc-hooks_0.1.5_1755799854683_0.35274565937126745","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@c-p-b/cc-hooks","version":"0.1.6","description":"A universal, stable, and user-friendly hook management system for Claude Code","main":"dist/index.js","bin":{"cc-hooks":"dist/cli.js"},"engines":{"node":">=18.0.0 <23.0.0"},"scripts":{"build":"tsc","clean":"rm -rf dist","pretest":"npm run build","test":"jest --maxWorkers=50%","test:unit":"jest __tests__/unit","test:integration":"jest __tests__/integration","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix","format":"prettier --write 'src/**/*.ts'","format:check":"prettier --check 'src/**/*.ts'","prepublishOnly":"npm run lint && npm run test && npm run build","dev":"tsc --watch"},"keywords":["claude","claude-code","hooks","automation","cli","developer-tools"],"author":"","license":"MIT","repository":{"type":"git","url":"git+https://github.com/c-p-b/cc-hooks.git"},"bugs":{"url":"https://github.com/c-p-b/cc-hooks/issues"},"homepage":"https://github.com/c-p-b/cc-hooks#readme","dependencies":{"chalk":"^4.1.2","commander":"^14.0.0"},"devDependencies":{"@types/jest":"^30.0.0","@types/node":"^24.3.0","@typescript-eslint/eslint-plugin":"^8.39.1","@typescript-eslint/parser":"^8.39.1","conventional-commits-parser":"^6.2.0","eslint":"^9.33.0","eslint-config-prettier":"^10.0.1","eslint-plugin-prettier":"^5.2.2","jest":"^30.0.5","prettier":"^3.6.2","ts-jest":"^29.4.1","ts-node":"^10.9.2","typescript":"^5.9.2"},"_id":"@c-p-b/cc-hooks@0.1.6","gitHead":"c71f8ce4db4968e0be880160678f82860b16d9bb","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-SUtyn629RACZ+e3CSXRTg5EQjQhEb1LiF+vtop6cSIhLTG6C6Fbepsrka70wvGavyyoOYdMh4T1dm+UrAkS/hw==","shasum":"63704429b6463e624f5b773d2098661fdadc4ea1","tarball":"https://registry.npmjs.org/@c-p-b/cc-hooks/-/cc-hooks-0.1.6.tgz","fileCount":118,"unpackedSize":391153,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@c-p-b%2fcc-hooks@0.1.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEuumE0O6m0lmUjcfKYn/fcDqTBLAWgZN4ke5tipkfSJAiAmN3NTkxF34Y55PPXrcTE5JiKrTSuHfDRn207P7gJW3Q=="}]},"_npmUser":{"name":"c-p-b","email":"conor.barber@pm.me"},"directories":{},"maintainers":[{"name":"c-p-b","email":"conor.barber@pm.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cc-hooks_0.1.6_1755801835104_0.013671090580679834"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-21T18:10:54.556Z","modified":"2025-08-21T18:43:55.660Z","0.1.5":"2025-08-21T18:10:54.952Z","0.1.6":"2025-08-21T18:43:55.289Z"},"bugs":{"url":"https://github.com/c-p-b/cc-hooks/issues"},"license":"MIT","homepage":"https://github.com/c-p-b/cc-hooks#readme","keywords":["claude","claude-code","hooks","automation","cli","developer-tools"],"repository":{"type":"git","url":"git+https://github.com/c-p-b/cc-hooks.git"},"description":"A universal, stable, and user-friendly hook management system for Claude Code","maintainers":[{"name":"c-p-b","email":"conor.barber@pm.me"}],"readme":"# cc-hooks\n\nA universal, stable, and user-friendly hook management system for Claude Code.\n\n## Installation\n\n```bash\nnpm install -g @c-p-b/cc-hooks\n```\n\n## Quick Start\n\n```bash\n# Initialize cc-hooks in your project\ncc-hooks init\n\n# Install hooks - three options:\n# Option 1: Install a complete bundle (multiple related hooks)\ncc-hooks install typescript        # Installs all TypeScript hooks (eslint, prettier, tests, etc.)\ncc-hooks install python           # Installs all Python hooks\n\n# Option 2: Install individual hooks from templates\ncc-hooks install templates/typescript/eslint-post.json   # Just ESLint\ncc-hooks install templates/git/conventional-commits.json # Git commit validation\n\n# Option 3: Install from local files or directories\ncc-hooks install ./my-hook.json   # Single hook file\ncc-hooks install ./hooks-dir      # All .json files in directory (treated as bundle)\n\n# Show all configured hooks\ncc-hooks show\n\n# Test your hooks locally\ncc-hooks init-test                # Generate test event files\ncc-hooks test                     # Test all hooks\ncc-hooks test Stop.json           # Test specific event\ncat Stop.json | cc-hooks run      # Manual testing (what Claude does)\n\n# View hook execution logs\ncc-hooks logs                     # View recent logs (including test runs)\ncc-hooks logs --details           # Show detailed output snippets\ncc-hooks logs --stats             # Show execution statistics\n```\n\n## Available Templates\n\n### Bundles (install all hooks in a category)\n- `typescript` - ESLint, Prettier, type checking, unit tests, coverage\n- `python` - Ruff linting\n- `git` - Conventional commit message validation\n- `session` - Context loading, initialization, transcript saving\n- `analysis` - Code quality, compatibility, and pattern scanning\n- `automation` - Script runners and prompt processors\n\n### Individual Hooks\nBrowse all available hooks in the `templates/` directory, organized by category.\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build TypeScript\nnpm run build\n\n# Run tests\nnpm test\n\n# Watch mode for development\nnpm run dev\n\n# Run with debug output\nnode dist/cli.js --debug\n```\n\n## Bundles\n\nWhen you install from a directory, cc-hooks treats it as a **bundle** - a collection of related hooks:\n\n- All `.json` files in the directory are installed as individual hooks\n- Hook names are automatically prefixed with the directory name (e.g., `typescript:lint`)\n- Installation is all-or-nothing: if any hook is invalid, none are installed\n- When using `--force`, all hooks in the bundle replace existing ones with the same names\n\nExamples:\n```bash\n# Install all hooks from a local directory\ncc-hooks install ./my-hooks        # Installs all .json files as a bundle\n\n# Built-in bundles work the same way\ncc-hooks install typescript         # Installs multiple TypeScript-related hooks\n```\n\n## Architecture\n\n- **Two-tier hook system**: Text (exit code mapping) and Structured (JSON output)\n- **Resource limits**: 60s timeout (configurable), 1MB output per hook\n- **Priority-based execution**: Lower priority numbers execute first\n- **Platform support**: Mac/Linux native, Windows via WSL2\n\n## Requirements\n\n- Node.js 18.x, 20.x, or 22.x\n- WSL2 for Windows users (native support planned for v0.2.0)","readmeFilename":"README.md"}