cc-orchestrator 0.0.1

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.
Files changed (3) hide show
  1. package/README.md +59 -0
  2. package/index.js +202 -0
  3. package/package.json +31 -0
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # cc-orchestrator
2
+
3
+ One-line installer for [CC Orchestrator](https://github.com/zhsks311/cc-orchestratorestrator) - Multi-model orchestration for Claude Code.
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ npx cc-orchestrator
9
+ ```
10
+
11
+ That's it! The installer will:
12
+ 1. Clone the repository to `~/.cc-orchestratorestrator`
13
+ 2. Install dependencies
14
+ 3. Run the interactive setup wizard
15
+ 4. Configure Claude Code automatically
16
+
17
+ ## Usage
18
+
19
+ ```bash
20
+ # Install to default location (~/.cc-orchestratorestrator)
21
+ npx cc-orchestrator
22
+
23
+ # Install to custom directory
24
+ npx cc-orchestrator ./my-cco
25
+
26
+ # Update existing installation
27
+ npx cc-orchestrator --upgrade
28
+
29
+ # Force reinstall all components
30
+ npx cc-orchestrator --force
31
+ ```
32
+
33
+ ## After Installation
34
+
35
+ 1. **Restart Claude Code**
36
+ 2. Try using the orchestrator:
37
+ - `"oracle한테 이 프로젝트 리뷰해달라고 해"`
38
+ - `"librarian한테 React Query 사용법 찾아줘"`
39
+
40
+ ## Update
41
+
42
+ ```bash
43
+ # Option 1: Use npx
44
+ npx cc-orchestrator --upgrade
45
+
46
+ # Option 2: Use npm script
47
+ cd ~/.cc-orchestratorestrator
48
+ npm run update
49
+ ```
50
+
51
+ ## Requirements
52
+
53
+ - Node.js >= 18.0.0
54
+ - Git
55
+ - At least one API key (OpenAI, Google, or Anthropic)
56
+
57
+ ## License
58
+
59
+ MIT
package/index.js ADDED
@@ -0,0 +1,202 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * cc-orchestrator
4
+ *
5
+ * One-line installer for CC Orchestrator
6
+ *
7
+ * Usage:
8
+ * npx cc-orchestrator # Install
9
+ * npx cc-orchestrator --upgrade # Update existing installation
10
+ * npx cc-orchestrator --help # Show help
11
+ */
12
+
13
+ import * as fs from 'fs';
14
+ import * as path from 'path';
15
+ import * as os from 'os';
16
+ import * as readline from 'readline';
17
+ import { execSync, spawn } from 'child_process';
18
+
19
+ const REPO_URL = 'https://github.com/zhsks311/cc-orchestratorestrator.git';
20
+ const DEFAULT_INSTALL_DIR = path.join(os.homedir(), '.cc-orchestratorestrator');
21
+
22
+ // Parse arguments
23
+ const args = process.argv.slice(2);
24
+ const showHelp = args.includes('--help') || args.includes('-h');
25
+ const upgradeMode = args.includes('--upgrade') || args.includes('-u');
26
+ const forceMode = args.includes('--force') || args.includes('-f');
27
+
28
+ // Get custom directory from args (first non-flag arg)
29
+ const customDir = args.find(arg => !arg.startsWith('-'));
30
+
31
+ function printBanner() {
32
+ console.log(`
33
+ ╔════════════════════════════════════════════════════════════╗
34
+ ║ CC Orchestrator - Installer ║
35
+ ║ ║
36
+ ║ Multi-model orchestration for Claude Code ║
37
+ ║ GPT-5.2 | Gemini 3 Pro | Claude Sonnet 4.5 ║
38
+ ╚════════════════════════════════════════════════════════════╝
39
+ `);
40
+ }
41
+
42
+ function printHelp() {
43
+ printBanner();
44
+ console.log(`Usage:
45
+ npx cc-orchestrator [directory] [options]
46
+
47
+ Options:
48
+ --upgrade, -u Update existing installation
49
+ --force, -f Force reinstall all components
50
+ --help, -h Show this help message
51
+
52
+ Examples:
53
+ npx cc-orchestrator # Install to ~/.cc-orchestratorestrator
54
+ npx cc-orchestrator ./my-cco # Install to custom directory
55
+ npx cc-orchestrator --upgrade # Update existing installation
56
+ npx cc-orchestrator --force # Force reinstall
57
+
58
+ After installation:
59
+ 1. Restart Claude Code
60
+ 2. Try: "oracle한테 프로젝트 리뷰해달라고 해"
61
+ `);
62
+ }
63
+
64
+ function question(prompt) {
65
+ const rl = readline.createInterface({
66
+ input: process.stdin,
67
+ output: process.stdout,
68
+ });
69
+ return new Promise((resolve) => {
70
+ rl.question(prompt, (answer) => {
71
+ rl.close();
72
+ resolve(answer.trim());
73
+ });
74
+ });
75
+ }
76
+
77
+ function checkCommand(cmd) {
78
+ try {
79
+ execSync(`${cmd} --version`, { stdio: 'pipe' });
80
+ return true;
81
+ } catch {
82
+ return false;
83
+ }
84
+ }
85
+
86
+ function exec(cmd, options = {}) {
87
+ console.log(` $ ${cmd}`);
88
+ execSync(cmd, { stdio: 'inherit', ...options });
89
+ }
90
+
91
+ function spawnAsync(cmd, args, options = {}) {
92
+ return new Promise((resolve, reject) => {
93
+ const proc = spawn(cmd, args, { stdio: 'inherit', shell: true, ...options });
94
+ proc.on('close', (code) => {
95
+ if (code === 0) resolve();
96
+ else reject(new Error(`Command failed with code ${code}`));
97
+ });
98
+ proc.on('error', reject);
99
+ });
100
+ }
101
+
102
+ async function install(installDir) {
103
+ console.log(`\n📁 설치 경로: ${installDir}\n`);
104
+
105
+ // Check if directory exists
106
+ if (fs.existsSync(installDir)) {
107
+ if (upgradeMode) {
108
+ console.log('📦 기존 설치 발견 - 업그레이드 모드\n');
109
+ } else {
110
+ const answer = await question('⚠️ 이미 설치되어 있습니다. 덮어쓰시겠습니까? (y/N): ');
111
+ if (answer.toLowerCase() !== 'y') {
112
+ console.log('\n설치가 취소되었습니다.');
113
+ console.log('업그레이드하려면: npx cc-orchestrator --upgrade\n');
114
+ process.exit(0);
115
+ }
116
+ }
117
+ }
118
+
119
+ // Step 1: Clone or pull
120
+ console.log('─'.repeat(50));
121
+ if (fs.existsSync(path.join(installDir, '.git'))) {
122
+ console.log('\n[1/3] 최신 코드 가져오기...\n');
123
+ exec('git pull origin main', { cwd: installDir });
124
+ } else {
125
+ console.log('\n[1/3] 저장소 복제 중...\n');
126
+ if (fs.existsSync(installDir)) {
127
+ fs.rmSync(installDir, { recursive: true, force: true });
128
+ }
129
+ exec(`git clone ${REPO_URL} "${installDir}"`);
130
+ }
131
+
132
+ // Step 2: npm install
133
+ console.log('\n[2/3] 의존성 설치 중...\n');
134
+ exec('npm install', { cwd: installDir });
135
+
136
+ // Step 3: Run setup
137
+ console.log('\n[3/3] 설정 마법사 실행...\n');
138
+ console.log('─'.repeat(50));
139
+
140
+ const setupArgs = forceMode ? ['run', 'setup', '--', '--force'] : ['run', 'setup'];
141
+ await spawnAsync('npm', setupArgs, { cwd: installDir });
142
+
143
+ // Done
144
+ console.log(`
145
+ ╔════════════════════════════════════════════════════════════╗
146
+ ║ ✅ CC Orchestrator 설치 완료! ║
147
+ ╠════════════════════════════════════════════════════════════╣
148
+ ║ ║
149
+ ║ 다음 단계: ║
150
+ ║ 1. Claude Code를 재시작하세요 ║
151
+ ║ 2. 다음과 같이 사용해보세요: ║
152
+ ║ "oracle한테 이 프로젝트 리뷰해달라고 해" ║
153
+ ║ ║
154
+ ║ 업데이트: ║
155
+ ║ cd ${installDir}
156
+ ║ npm run update ║
157
+ ║ ║
158
+ ║ 또는: ║
159
+ ║ npx cc-orchestrator --upgrade ║
160
+ ║ ║
161
+ ╚════════════════════════════════════════════════════════════╝
162
+ `);
163
+ }
164
+
165
+ async function main() {
166
+ if (showHelp) {
167
+ printHelp();
168
+ process.exit(0);
169
+ }
170
+
171
+ printBanner();
172
+
173
+ // Check prerequisites
174
+ console.log('사전 요구사항 확인...\n');
175
+
176
+ const hasGit = checkCommand('git');
177
+ const hasNode = checkCommand('node');
178
+ const hasNpm = checkCommand('npm');
179
+
180
+ console.log(` Git: ${hasGit ? '✓' : '✗'}`);
181
+ console.log(` Node: ${hasNode ? '✓' : '✗'}`);
182
+ console.log(` npm: ${hasNpm ? '✓' : '✗'}`);
183
+
184
+ if (!hasGit || !hasNode || !hasNpm) {
185
+ console.log('\n❌ 필수 도구가 설치되지 않았습니다.');
186
+ if (!hasGit) console.log(' - Git을 설치하세요: https://git-scm.com/');
187
+ if (!hasNode) console.log(' - Node.js를 설치하세요: https://nodejs.org/');
188
+ process.exit(1);
189
+ }
190
+
191
+ // Determine install directory
192
+ const installDir = customDir
193
+ ? path.resolve(customDir)
194
+ : DEFAULT_INSTALL_DIR;
195
+
196
+ await install(installDir);
197
+ }
198
+
199
+ main().catch((error) => {
200
+ console.error('\n❌ 오류 발생:', error.message);
201
+ process.exit(1);
202
+ });
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "cc-orchestrator",
3
+ "version": "0.0.1",
4
+ "description": "CLI to install CC Orchestrator - Multi-model orchestration for Claude Code",
5
+ "bin": {
6
+ "cc-orchestrator": "./index.js"
7
+ },
8
+ "main": "index.js",
9
+ "type": "module",
10
+ "scripts": {
11
+ "test": "node index.js --help"
12
+ },
13
+ "keywords": [
14
+ "cc-orchestrator",
15
+ "claude-code",
16
+ "mcp",
17
+ "multi-model",
18
+ "orchestration",
19
+ "llm",
20
+ "create"
21
+ ],
22
+ "author": "zhsks311",
23
+ "license": "MIT",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/zhsks311/cc-orchestrator.git"
27
+ },
28
+ "engines": {
29
+ "node": ">=18.0.0"
30
+ }
31
+ }