Add NPM distribution support with hybrid installation approach
Major changes: - Add package.json with NPM packaging configuration - Create Node.js CLI interface (bin/claude-hooks.js) with full command set - Convert bash scripts to Python for better npm integration - Add npm postinstall/preuninstall hooks for automatic setup - Update bootstrap prompt to recommend NPM method with git fallback - Enhance README with NPM-first documentation - Maintain backward compatibility with existing git installation Features: - npm install -g claude-hooks for easy distribution - claude-hooks init/status/test/backup/uninstall commands - Automatic Python dependency installation - Conflict detection and prevention - Hybrid approach supporting both npm and git workflows This resolves installation complexity while maintaining developer flexibility. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
1e169a5d45
commit
9445e09c48
13 changed files with 1055 additions and 107 deletions
47
package.json
Normal file
47
package.json
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "claude-hooks",
|
||||
"version": "1.0.0",
|
||||
"description": "Intelligent hooks system for Claude Code with shadow learning and automatic backup",
|
||||
"keywords": ["claude", "hooks", "ai", "automation", "backup", "learning"],
|
||||
"author": "Claude Hooks Contributors",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.supported.systems/rsp2k/claude-hooks.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://git.supported.systems/rsp2k/claude-hooks/issues"
|
||||
},
|
||||
"homepage": "https://git.supported.systems/rsp2k/claude-hooks",
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
"npm": ">=8.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"claude-hooks": "./bin/claude-hooks.js"
|
||||
},
|
||||
"files": [
|
||||
"bin/",
|
||||
"hooks/",
|
||||
"lib/",
|
||||
"config/",
|
||||
"scripts/",
|
||||
"docs/",
|
||||
"requirements.txt",
|
||||
"README.md"
|
||||
],
|
||||
"scripts": {
|
||||
"postinstall": "node scripts/npm-postinstall.js",
|
||||
"preuninstall": "node scripts/npm-preuninstall.js",
|
||||
"test": "python3 scripts/test.sh",
|
||||
"start": "claude-hooks"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": "^11.0.0",
|
||||
"chalk": "^5.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"python3": ">=3.8.0"
|
||||
},
|
||||
"preferGlobal": true
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue