claude-comms 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/README.md +64 -23
- package/bin/claude-setup.js +118 -38
- package/package.json +67 -19
- package/src/cli/index.js +30 -0
- package/src/cli/interfaces.js +386 -0
- package/src/cli/parser.js +158 -0
- package/src/cli/prompts.js +317 -0
- package/src/cli/runner.js +436 -0
- package/src/fetcher/github.js +1092 -0
- package/src/index.js +221 -0
- package/src/installer/dependency-check.js +19 -0
- package/src/installer/file-writer.js +648 -0
- package/src/orchestrator/installer.js +875 -0
- package/src/orchestrator/main.js +267 -0
- package/src/orchestrator/mocks/index.js +388 -0
- package/src/utils/config.js +430 -0
- package/src/utils/constants.js +397 -0
- package/src/utils/errors.js +361 -0
- package/src/utils/index.js +46 -0
- package/src/utils/logger.js +177 -0
- package/src/utils/platform.js +362 -0
- package/src/utils/retry.js +358 -0
- package/templates/settings.local.json +1 -0
- package/.claude/hooks/comms/messages_UmaMatrix.json +0 -10
- package/.claude/hooks/comms/messages_VictorSpiral.json +0 -10
- package/.claude/hooks/comms/messages_WendyQuantum.json +0 -10
- package/.claude/hooks/comms/messages_XavierPrism.json +0 -10
- package/templates/get_unread_messages.py +0 -54
- package/templates/send_message.py +0 -75
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.3] - 2025-08-15
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **CRITICAL**: Rate limiting improvements with tarball fetch strategy (1 request vs 21+ requests)
|
|
12
|
+
- **PERFORMANCE**: Capped retry delays at 30 seconds maximum (down from 575+ seconds)
|
|
13
|
+
- **UX**: Installation time reduced to under 10 seconds from minutes
|
|
14
|
+
- **RELIABILITY**: Smart rate limit handling with user-friendly countdown displays
|
|
15
|
+
- **STABILITY**: Fail-fast logic for excessive rate limit waits (>5 minutes)
|
|
16
|
+
|
|
17
|
+
### Enhanced
|
|
18
|
+
- Tarball extraction strategy as primary fetch method for maximum efficiency
|
|
19
|
+
- Exponential backoff with jitter for network resilience
|
|
20
|
+
- Enhanced error messages with actionable suggestions for GITHUB_TOKEN usage
|
|
21
|
+
- Real-time countdown display for rate limit waits over 5 seconds
|
|
22
|
+
- Improved retry logic with circuit breaker patterns
|
|
23
|
+
|
|
24
|
+
### Technical Details
|
|
25
|
+
- GitHubFetcher now defaults to tarball strategy, reducing API calls by 95%
|
|
26
|
+
- Rate limit delays capped at 30s vs unlimited waits in v1.0.2
|
|
27
|
+
- Smart delay calculation prevents excessive retry timeouts
|
|
28
|
+
- Comprehensive retry conditions for network errors, server errors, and temporary failures
|
|
29
|
+
- Atomic file operations with rollback support maintained
|
|
30
|
+
|
|
31
|
+
## [1.0.2] - 2025-08-15
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
- **BREAKING**: Replaced mock implementations with real GitHubFetcher and FileWriter
|
|
35
|
+
- Integrated FrankPulse's path handling fixes for cross-platform compatibility
|
|
36
|
+
- Fixed dependency injection in `_createDependencies()` to use real implementations
|
|
37
|
+
- Enhanced installation flow to properly fetch from GitHub repository
|
|
38
|
+
- Fixed API interface compatibility between orchestrator and real modules
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
- Integration smoke test for CI/CD validation
|
|
42
|
+
- Real GitHub API integration with rate limiting and retry logic
|
|
43
|
+
- Comprehensive file writer with backup and rollback capabilities
|
|
44
|
+
- End-to-end installation testing framework
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
- Default repository configuration now points to `screwyforcepush/claude-code-subagent-bus`
|
|
48
|
+
- Improved error handling and progress reporting during installation
|
|
49
|
+
- Enhanced logging and debugging output for troubleshooting
|
|
50
|
+
|
|
51
|
+
### Technical Details
|
|
52
|
+
- GitHubFetcher now supports multi-strategy fetching (Trees API, Contents API, Raw URLs)
|
|
53
|
+
- FileWriter includes atomic operations, permissions handling, and validation
|
|
54
|
+
- Orchestrator properly coordinates real dependencies instead of mocks
|
|
55
|
+
- All 21+ files from .claude directory structure are now correctly installed
|
|
56
|
+
|
|
57
|
+
## [1.0.1] - 2025-08-14
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
- Initial mock implementation framework
|
|
61
|
+
- Orchestrator pattern with dependency injection
|
|
62
|
+
- CLI interface with comprehensive options
|
|
63
|
+
- Test suite with unit and integration tests
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
- Basic installation workflow
|
|
67
|
+
- File structure validation
|
|
68
|
+
|
|
69
|
+
## [1.0.0] - 2025-08-14
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
- Initial release
|
|
73
|
+
- NPX installer for Claude Code hooks and observability setup
|
|
74
|
+
- Multi-agent orchestration framework
|
|
75
|
+
- GitHub integration for fetching setup files
|
|
76
|
+
- File writer with backup and rollback capabilities
|
package/README.md
CHANGED
|
@@ -1,44 +1,85 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @claude-code/setup-installer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
NPX-installable package to set up Claude multi-agent orchestration in any project.
|
|
4
4
|
|
|
5
|
-
## Installation
|
|
5
|
+
## Installation & Usage
|
|
6
6
|
|
|
7
|
+
### Quick Start
|
|
7
8
|
```bash
|
|
8
|
-
npx claude-
|
|
9
|
+
npx @claude-code/setup-installer
|
|
9
10
|
```
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Install communication hooks in the current directory:
|
|
12
|
+
### Options
|
|
14
13
|
```bash
|
|
15
|
-
|
|
14
|
+
# Install to specific directory
|
|
15
|
+
npx @claude-code/setup-installer --dir ./my-project
|
|
16
|
+
|
|
17
|
+
# Install specific version
|
|
18
|
+
npx @claude-code/setup-installer --version v1.2.0
|
|
19
|
+
|
|
20
|
+
# Force overwrite existing files
|
|
21
|
+
npx @claude-code/setup-installer --force
|
|
22
|
+
|
|
23
|
+
# Skip Python/uv dependency check
|
|
24
|
+
npx @claude-code/setup-installer --no-python-check
|
|
25
|
+
|
|
26
|
+
# Development mode with verbose logging
|
|
27
|
+
npx @claude-code/setup-installer --dev
|
|
28
|
+
|
|
29
|
+
# Verify mode (no changes)
|
|
30
|
+
npx @claude-code/setup-installer --verify
|
|
31
|
+
|
|
32
|
+
# Dry run (show what would be done)
|
|
33
|
+
npx @claude-code/setup-installer --dry-run
|
|
16
34
|
```
|
|
17
35
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
36
|
+
## What Gets Installed
|
|
37
|
+
|
|
38
|
+
- `.claude/` directory with hooks, agents, and configuration
|
|
39
|
+
- `CLAUDE.md` project instructions file
|
|
40
|
+
- `settings.local.json` template for local configuration
|
|
41
|
+
|
|
42
|
+
## Development
|
|
43
|
+
|
|
44
|
+
### Package Structure
|
|
45
|
+
```
|
|
46
|
+
packages/setup-installer/
|
|
47
|
+
├── bin/claude-setup.js # NPX executable entry point
|
|
48
|
+
├── src/
|
|
49
|
+
│ ├── index.js # Main orchestrator
|
|
50
|
+
│ ├── cli/ # Command-line interface
|
|
51
|
+
│ ├── fetcher/ # GitHub API integration
|
|
52
|
+
│ ├── installer/ # File writing & validation
|
|
53
|
+
│ └── utils/ # Shared utilities
|
|
54
|
+
├── templates/ # Configuration templates
|
|
55
|
+
└── test/ # Test suites
|
|
21
56
|
```
|
|
22
57
|
|
|
23
|
-
|
|
58
|
+
### Scripts
|
|
24
59
|
```bash
|
|
25
|
-
|
|
60
|
+
npm test # Run all tests
|
|
61
|
+
npm run test:unit # Unit tests only
|
|
62
|
+
npm run test:integration # Integration tests
|
|
63
|
+
npm run test:coverage # Coverage report
|
|
64
|
+
npm run lint # ESLint
|
|
65
|
+
npm run dev # Development mode
|
|
26
66
|
```
|
|
27
67
|
|
|
28
|
-
##
|
|
68
|
+
## Architecture
|
|
29
69
|
|
|
30
|
-
This
|
|
70
|
+
This package implements a hybrid GitHub API strategy for optimal performance:
|
|
31
71
|
|
|
32
|
-
1.
|
|
33
|
-
2.
|
|
34
|
-
3.
|
|
35
|
-
4.
|
|
72
|
+
1. **GitHub Trees API** for efficient recursive directory fetching
|
|
73
|
+
2. **Contents API** for individual files
|
|
74
|
+
3. **Fallback strategies** for rate limiting scenarios
|
|
75
|
+
4. **Atomic operations** with rollback on failure
|
|
36
76
|
|
|
37
77
|
## Requirements
|
|
38
78
|
|
|
39
|
-
- Node.js
|
|
40
|
-
-
|
|
79
|
+
- Node.js 18.0.0 or higher
|
|
80
|
+
- npm 9.0.0 or higher
|
|
81
|
+
- Internet connection for GitHub access
|
|
41
82
|
|
|
42
|
-
##
|
|
83
|
+
## License
|
|
43
84
|
|
|
44
|
-
|
|
85
|
+
MIT
|
package/bin/claude-setup.js
CHANGED
|
@@ -1,48 +1,128 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Claude Code Setup Installer
|
|
5
|
+
* NPX-executable script to install Claude multi-agent orchestration setup
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* npx @claude-code/setup-installer
|
|
9
|
+
* npx @claude-code/setup-installer --dir ./my-project
|
|
10
|
+
* npx @claude-code/setup-installer --version v1.2.0
|
|
11
|
+
* npx @claude-code/setup-installer --force
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const { program } = require('commander');
|
|
4
15
|
const chalk = require('chalk');
|
|
5
16
|
const path = require('path');
|
|
6
|
-
const fs = require('fs-extra');
|
|
7
17
|
|
|
8
|
-
|
|
18
|
+
// Import main installer logic
|
|
19
|
+
const installer = require('../src/index.js');
|
|
20
|
+
const { version } = require('../package.json');
|
|
9
21
|
|
|
22
|
+
// Configure CLI arguments
|
|
10
23
|
program
|
|
11
|
-
.name('claude-
|
|
12
|
-
.description('Claude
|
|
13
|
-
.version(
|
|
24
|
+
.name('claude-setup')
|
|
25
|
+
.description('Install Claude multi-agent orchestration setup into your project')
|
|
26
|
+
.version(version)
|
|
27
|
+
.option('-d, --dir <directory>', 'Target directory for installation', process.cwd())
|
|
28
|
+
.option('-v, --version <version>', 'Specific version/tag to install from GitHub', 'main')
|
|
29
|
+
.option('-f, --force', 'Overwrite existing files without prompting', false)
|
|
30
|
+
.option('--no-python-check', 'Skip Python/uv dependency validation', false)
|
|
31
|
+
.option('--dev', 'Development mode with verbose logging', false)
|
|
32
|
+
.option('--verify', 'Verify installation without making changes', false)
|
|
33
|
+
.option('--dry-run', 'Show what would be installed without executing', false)
|
|
34
|
+
.parse();
|
|
14
35
|
|
|
15
|
-
program
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
console.log(chalk.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
console.log(chalk.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
const options = program.opts();
|
|
37
|
+
|
|
38
|
+
// Entry point
|
|
39
|
+
async function main() {
|
|
40
|
+
try {
|
|
41
|
+
console.log(chalk.cyan.bold(`\n🚀 Claude Code Setup Installer v${version}\n`));
|
|
42
|
+
|
|
43
|
+
// Validate target directory
|
|
44
|
+
const targetDir = path.resolve(options.dir);
|
|
45
|
+
console.log(chalk.blue(`📍 Target directory: ${targetDir}`));
|
|
46
|
+
|
|
47
|
+
// Development mode logging
|
|
48
|
+
if (options.dev) {
|
|
49
|
+
console.log(chalk.yellow('🔧 Development mode enabled'));
|
|
50
|
+
console.log(chalk.gray('Options:', JSON.stringify(options, null, 2)));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Verification mode
|
|
54
|
+
if (options.verify) {
|
|
55
|
+
console.log(chalk.yellow('🔍 Verification mode - no changes will be made'));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Dry run mode
|
|
59
|
+
if (options.dryRun) {
|
|
60
|
+
console.log(chalk.yellow('🏃 Dry run mode - showing what would be installed'));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Execute installer with options
|
|
64
|
+
await installer.install({
|
|
65
|
+
targetDir,
|
|
66
|
+
gitRef: options.version,
|
|
67
|
+
force: options.force,
|
|
68
|
+
checkPython: options.pythonCheck,
|
|
69
|
+
dev: options.dev,
|
|
70
|
+
verify: options.verify,
|
|
71
|
+
dryRun: options.dryRun
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
console.log(chalk.green.bold('\n✅ Installation complete!\n'));
|
|
75
|
+
|
|
76
|
+
// Show next steps
|
|
77
|
+
console.log(chalk.cyan('Next steps:'));
|
|
78
|
+
console.log(chalk.white('1. Review .claude/settings.local.json for configuration'));
|
|
79
|
+
console.log(chalk.white('2. Ensure Python and uv are installed for hooks'));
|
|
80
|
+
console.log(chalk.white('3. Start the observability server (optional)'));
|
|
81
|
+
console.log(chalk.white('4. Open your project in Claude Code'));
|
|
82
|
+
console.log(chalk.cyan('\nHappy coding with Claude! 🤖\n'));
|
|
83
|
+
|
|
84
|
+
} catch (error) {
|
|
85
|
+
console.error(chalk.red.bold('\n❌ Installation failed:'));
|
|
86
|
+
console.error(chalk.red(error.message));
|
|
87
|
+
|
|
88
|
+
if (options.dev && error.stack) {
|
|
89
|
+
console.error(chalk.gray('\nStack trace:'));
|
|
90
|
+
console.error(chalk.gray(error.stack));
|
|
45
91
|
}
|
|
46
|
-
|
|
92
|
+
|
|
93
|
+
// Show troubleshooting hints
|
|
94
|
+
console.log(chalk.yellow('\n💡 Troubleshooting:'));
|
|
95
|
+
console.log(chalk.white('• Check network connection for GitHub access'));
|
|
96
|
+
console.log(chalk.white('• Verify write permissions in target directory'));
|
|
97
|
+
console.log(chalk.white('• Try running with --dev for more details'));
|
|
98
|
+
console.log(chalk.white('• Report issues: https://github.com/alexsavage/claude-code-hooks-multi-agent-observability/issues'));
|
|
99
|
+
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Handle uncaught errors gracefully
|
|
105
|
+
process.on('uncaughtException', (error) => {
|
|
106
|
+
console.error(chalk.red.bold('\n💥 Unexpected error:'));
|
|
107
|
+
console.error(chalk.red(error.message));
|
|
108
|
+
process.exit(1);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
process.on('unhandledRejection', (reason, promise) => {
|
|
112
|
+
console.error(chalk.red.bold('\n💥 Unhandled promise rejection:'));
|
|
113
|
+
console.error(chalk.red(reason));
|
|
114
|
+
process.exit(1);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// Handle CTRL+C gracefully
|
|
118
|
+
process.on('SIGINT', () => {
|
|
119
|
+
console.log(chalk.yellow('\n\n⚠️ Installation cancelled by user'));
|
|
120
|
+
process.exit(0);
|
|
121
|
+
});
|
|
47
122
|
|
|
48
|
-
|
|
123
|
+
// Execute main function
|
|
124
|
+
main().catch((error) => {
|
|
125
|
+
console.error(chalk.red.bold('\n❌ Fatal error:'));
|
|
126
|
+
console.error(chalk.red(error.message));
|
|
127
|
+
process.exit(1);
|
|
128
|
+
});
|
package/package.json
CHANGED
|
@@ -1,37 +1,85 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-comms",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Claude Code
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "NPX installer for Claude Code hooks and observability setup",
|
|
5
|
+
"main": "src/index.js",
|
|
5
6
|
"bin": {
|
|
6
|
-
"claude-comms": "
|
|
7
|
+
"claude-comms": "bin/claude-setup.js"
|
|
7
8
|
},
|
|
8
|
-
"main": "./src/index.js",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"test": "
|
|
10
|
+
"test": "jest",
|
|
11
|
+
"test:unit": "jest --testPathPattern=unit",
|
|
12
|
+
"test:integration": "jest --testPathPattern=integration",
|
|
13
|
+
"test:watch": "jest --watch",
|
|
14
|
+
"test:coverage": "jest --coverage",
|
|
15
|
+
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
|
|
16
|
+
"test:e2e": "bash test/e2e/install.sh",
|
|
17
|
+
"test:memory": "node --expose-gc test/performance/memory-test.js",
|
|
18
|
+
"lint": "eslint src/ test/ --ext .js,.ts",
|
|
19
|
+
"lint:fix": "eslint src/ test/ --ext .js,.ts --fix",
|
|
20
|
+
"build": "node scripts/build.js",
|
|
21
|
+
"dev": "nodemon bin/claude-setup.js",
|
|
22
|
+
"security:check": "npm audit && snyk test",
|
|
23
|
+
"docs:lint": "markdownlint README.md docs/",
|
|
24
|
+
"examples:test": "node test/examples/test-examples.js",
|
|
25
|
+
"prepublishOnly_disabled": "npm run test && npm run lint && npm run build"
|
|
11
26
|
},
|
|
12
27
|
"keywords": [
|
|
13
|
-
"claude",
|
|
14
|
-
"code",
|
|
28
|
+
"claude-code",
|
|
15
29
|
"hooks",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
30
|
+
"observability",
|
|
31
|
+
"npx",
|
|
32
|
+
"installer",
|
|
33
|
+
"multi-agent"
|
|
18
34
|
],
|
|
19
35
|
"author": "Claude Code Team",
|
|
20
36
|
"license": "MIT",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/alexsavage/claude-code-hooks-multi-agent-observability.git",
|
|
40
|
+
"directory": "packages/setup-installer"
|
|
23
41
|
},
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"chalk": "^4.1.2",
|
|
27
|
-
"fs-extra": "^11.1.1"
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/alexsavage/claude-code-hooks-multi-agent-observability/issues"
|
|
28
44
|
},
|
|
45
|
+
"homepage": "https://github.com/alexsavage/claude-code-hooks-multi-agent-observability#readme",
|
|
29
46
|
"engines": {
|
|
30
47
|
"node": ">=16.0.0"
|
|
31
48
|
},
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/jest": "^29.5.0",
|
|
51
|
+
"@types/node": "^20.0.0",
|
|
52
|
+
"babel-jest": "^29.5.0",
|
|
53
|
+
"eslint": "^8.40.0",
|
|
54
|
+
"husky": "^8.0.0",
|
|
55
|
+
"jest": "^29.5.0",
|
|
56
|
+
"jest-junit": "^16.0.0",
|
|
57
|
+
"markdownlint-cli": "^0.35.0",
|
|
58
|
+
"mock-fs": "^5.2.0",
|
|
59
|
+
"nock": "^13.3.0",
|
|
60
|
+
"nodemon": "^3.0.0",
|
|
61
|
+
"snyk": "^1.1100.0",
|
|
62
|
+
"supertest": "^6.3.0",
|
|
63
|
+
"ts-jest": "^29.1.0",
|
|
64
|
+
"typescript": "^5.0.0"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"commander": "^11.0.0",
|
|
68
|
+
"prompts": "^2.4.2",
|
|
69
|
+
"chalk": "^4.1.2",
|
|
70
|
+
"ora": "^5.4.1",
|
|
71
|
+
"node-fetch": "^2.6.11",
|
|
72
|
+
"fs-extra": "^11.1.1",
|
|
73
|
+
"tar": "^6.2.0"
|
|
74
|
+
},
|
|
75
|
+
"files": [
|
|
76
|
+
"bin/",
|
|
77
|
+
"src/",
|
|
78
|
+
"templates/",
|
|
79
|
+
"README.md",
|
|
80
|
+
"CHANGELOG.md"
|
|
81
|
+
],
|
|
82
|
+
"publishConfig": {
|
|
83
|
+
"access": "public"
|
|
36
84
|
}
|
|
37
85
|
}
|
package/src/cli/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Entry Point for @claude-code/setup-installer
|
|
3
|
+
*
|
|
4
|
+
* Main entry point that orchestrates CLI parsing, user interaction,
|
|
5
|
+
* and installation flow with proper error handling.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const { run } = require('./runner');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* CLI entry point - can be called directly or used as module
|
|
12
|
+
*/
|
|
13
|
+
async function main() {
|
|
14
|
+
try {
|
|
15
|
+
await run(process.argv);
|
|
16
|
+
} catch (error) {
|
|
17
|
+
console.error('CLI execution failed:', error.message);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Run if called directly
|
|
23
|
+
if (require.main === module) {
|
|
24
|
+
main();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
run,
|
|
29
|
+
main
|
|
30
|
+
};
|