claude-all-config 2.0.0
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/LICENSE +21 -0
- package/LICENSE.md +70 -0
- package/README.md +133 -0
- package/VERSION +1 -0
- package/agents/accessibility-reviewer.md +96 -0
- package/agents/ai-prompt-optimizer.md +94 -0
- package/agents/api-tester.md +102 -0
- package/agents/code-generator.md +94 -0
- package/agents/code-reviewer.md +47 -0
- package/agents/component-generator.md +102 -0
- package/agents/doc-generator.md +91 -0
- package/agents/migration-generator.md +94 -0
- package/agents/performance-analyzer.md +90 -0
- package/agents/proactive-mode.md +91 -0
- package/agents/readme-generator.md +101 -0
- package/agents/security-auditor.md +86 -0
- package/agents/terraform-generator.md +94 -0
- package/agents/test-generator.md +76 -0
- package/bin/agentrouter.json +36 -0
- package/bin/ai-chat +20 -0
- package/bin/antigravity.json +76 -0
- package/bin/api-manager +340 -0
- package/bin/claude-launcher +19 -0
- package/bin/claude-master +15 -0
- package/bin/claude_master.py +295 -0
- package/bin/cohere.json +7 -0
- package/bin/deepseek.json +44 -0
- package/bin/gemini.json +56 -0
- package/bin/glm.json +21 -0
- package/bin/groq.json +41 -0
- package/bin/minimax.json +26 -0
- package/bin/mistral.json +7 -0
- package/bin/moonshot.json +7 -0
- package/bin/ollama.json +36 -0
- package/bin/openai.json +46 -0
- package/bin/openrouter.json +38 -0
- package/bin/perplexity.json +12 -0
- package/bin/qwen.json +7 -0
- package/bin/switch-provider +73 -0
- package/bin/test.json +7 -0
- package/bin/xai.json +41 -0
- package/claude-all +2707 -0
- package/claude-config.json +340 -0
- package/claude-suite/REFACTORING_SUMMARY.md +88 -0
- package/claude-suite/auth/.antigravity_proxy.py +78 -0
- package/claude-suite/auth/__pycache__/openai_auth.cpython-312.pyc +0 -0
- package/claude-suite/auth/gemini_auth.py +80 -0
- package/claude-suite/auth/openai_auth.py +138 -0
- package/claude-suite/backups/claude-all-before-refactor +1075 -0
- package/claude-suite/backups/claude-all.backup +840 -0
- package/claude-suite/backups/claude-all.original +840 -0
- package/claude-suite/models/add-model-manual.sh +588 -0
- package/claude-suite/models/add-model.sh +114 -0
- package/claude-suite/models/model-switcher.sh +69 -0
- package/claude-suite/providers/claude-glm +89 -0
- package/claude-suite/providers/claude-glm-wrapper.sh +55 -0
- package/claude-suite/providers/claude-minimax +12 -0
- package/claude-suite/providers/claude-smart +132 -0
- package/claude-suite/providers/xai_chat.sh +56 -0
- package/claude-suite/utils/__pycache__/claude_master.cpython-312.pyc +0 -0
- package/claude-suite/utils/antigravity_proxy_server.py +168 -0
- package/claude-suite/utils/claude-all-help.txt +83 -0
- package/claude-suite/utils/claude_master.py +408 -0
- package/commands/brainstorm.md +5 -0
- package/commands/execute-plan.md +5 -0
- package/commands/write-plan.md +5 -0
- package/docs/ANTIGRAVITY-SETUP.md +176 -0
- package/docs/AUTH_CREDENTIALS.md +54 -0
- package/docs/NPM-INSTALLATION.md +166 -0
- package/hooks/hooks.json +15 -0
- package/hooks/run-hook.cmd +19 -0
- package/hooks/session-start.sh +52 -0
- package/install.sh +155 -0
- package/mcp.json +34 -0
- package/model/perplexity.json +12 -0
- package/package.json +69 -0
- package/plugins/README.md +47 -0
- package/plugins/installed_plugins.json +317 -0
- package/plugins/known_marketplaces.json +10 -0
- package/plugins/marketplace-info/marketplace.json +517 -0
- package/postinstall.js +100 -0
- package/scripts/antigravity_proxy_server.py +168 -0
- package/scripts/get_gemini_api_key.py +96 -0
- package/scripts/setup_antigravity_auth.py +171 -0
- package/skills/api-development/SKILL.md +11 -0
- package/skills/api-development/openapi/api-documentation.yaml +108 -0
- package/skills/brainstorming/SKILL.md +54 -0
- package/skills/code-quality/SKILL.md +196 -0
- package/skills/condition-based-waiting/SKILL.md +120 -0
- package/skills/condition-based-waiting/example.ts +158 -0
- package/skills/database-development/SKILL.md +11 -0
- package/skills/database-development/migrations/migration.template.sql +49 -0
- package/skills/defense-in-depth/SKILL.md +127 -0
- package/skills/deployment/SKILL.md +11 -0
- package/skills/deployment/ci-cd/github-actions.yml +95 -0
- package/skills/deployment/docker/Dockerfile.template +39 -0
- package/skills/dispatching-parallel-agents/SKILL.md +180 -0
- package/skills/documentation-generation/SKILL.md +8 -0
- package/skills/documentation-generation/templates/README.template.md +60 -0
- package/skills/error-handling/SKILL.md +267 -0
- package/skills/executing-plans/SKILL.md +76 -0
- package/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/skills/frontend-design/frontend-design/SKILL.md +42 -0
- package/skills/integration-testing/SKILL.md +13 -0
- package/skills/integration-testing/examples/contract-test.py +317 -0
- package/skills/integration-testing/examples/e2e-test.js +147 -0
- package/skills/integration-testing/examples/test-isolation.md +94 -0
- package/skills/logging-monitoring/SKILL.md +66 -0
- package/skills/mobile-development/SKILL.md +11 -0
- package/skills/mobile-development/responsive/responsive.css +80 -0
- package/skills/performance-optimization/SKILL.md +9 -0
- package/skills/performance-optimization/profiling/profile.template.js +21 -0
- package/skills/receiving-code-review/SKILL.md +209 -0
- package/skills/refactoring/SKILL.md +11 -0
- package/skills/refactoring/code-smells/common-smells.md +115 -0
- package/skills/requesting-code-review/SKILL.md +105 -0
- package/skills/requesting-code-review/code-reviewer.md +146 -0
- package/skills/root-cause-tracing/SKILL.md +174 -0
- package/skills/root-cause-tracing/find-polluter.sh +63 -0
- package/skills/security-review/SKILL.md +11 -0
- package/skills/security-review/checklists/owasp-checklist.md +31 -0
- package/skills/sharing-skills/SKILL.md +194 -0
- package/skills/subagent-driven-development/SKILL.md +240 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
- package/skills/subagent-driven-development/implementer-prompt.md +78 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +295 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/SKILL.md +364 -0
- package/skills/testing-anti-patterns/SKILL.md +302 -0
- package/skills/testing-skills-with-subagents/SKILL.md +387 -0
- package/skills/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/ui-ux-review/SKILL.md +13 -0
- package/skills/ui-ux-review/checklists/ux-heuristics.md +61 -0
- package/skills/using-git-worktrees/SKILL.md +213 -0
- package/skills/using-superpowers/SKILL.md +101 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/writing-plans/SKILL.md +116 -0
- package/skills/writing-skills/SKILL.md +622 -0
- package/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/writing-skills/persuasion-principles.md +187 -0
- package/update.sh +36 -0
- package/utils/check-superpowers.sh +114 -0
- package/utils/claude-branding.md +166 -0
- package/utils/config.js +185 -0
- package/utils/custom-claude-config.sh +89 -0
- package/utils/custom-claude-hooks.md +129 -0
- package/utils/custom-claude-lib.js +222 -0
- package/utils/customize-claude-ui.sh +162 -0
- package/utils/fix-claude-integration.sh +133 -0
- package/utils/help.js +125 -0
- package/utils/install-curl.ps1 +135 -0
- package/utils/install-curl.sh +525 -0
- package/utils/install-superpowers.js +411 -0
- package/utils/install.js +298 -0
- package/utils/install.sh +182 -0
- package/utils/postinstall.js +63 -0
- package/utils/rename-claude.sh +96 -0
- package/utils/uninstall-superpowers.js +273 -0
- package/utils/uninstall.ps1 +136 -0
- package/utils/uninstall.sh +163 -0
- package/utils/update.sh +160 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 🦸 Claude-All Superpowers Installer
|
|
5
|
+
* Menginstall skills, commands, agents, dan hooks ke Claude Code
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const os = require('os');
|
|
11
|
+
const { execSync } = require('child_process');
|
|
12
|
+
|
|
13
|
+
class SuperpowersInstaller {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.homeDir = os.homedir();
|
|
16
|
+
this.packageDir = path.resolve(__dirname, '..');
|
|
17
|
+
this.superpowersDir = path.join(this.packageDir, 'superpowers');
|
|
18
|
+
this.claudeDir = path.join(this.homeDir, '.claude');
|
|
19
|
+
|
|
20
|
+
// Claude Code paths
|
|
21
|
+
this.claudePluginsDir = path.join(this.claudeDir, 'plugins', 'claude-all-superpowers');
|
|
22
|
+
this.claudeCommandsDir = path.join(this.claudeDir, 'commands');
|
|
23
|
+
this.claudeSkillsDir = path.join(this.claudePluginsDir, 'skills');
|
|
24
|
+
this.claudeGlobalSkillsDir = path.join(this.claudeDir, 'skills'); // Global skills folder
|
|
25
|
+
this.claudeAgentsDir = path.join(this.claudePluginsDir, 'agents');
|
|
26
|
+
this.claudeGlobalAgentsDir = path.join(this.claudeDir, 'agents'); // Global agents folder
|
|
27
|
+
this.claudeHooksDir = path.join(this.claudePluginsDir, 'hooks');
|
|
28
|
+
this.claudeLibDir = path.join(this.claudePluginsDir, 'lib');
|
|
29
|
+
this.claudeTestsDir = path.join(this.claudePluginsDir, 'tests');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
printHeader() {
|
|
33
|
+
console.log('');
|
|
34
|
+
console.log('🦸 CLAUDE-ALL SUPERPOWERS INSTALLER');
|
|
35
|
+
console.log('===================================');
|
|
36
|
+
console.log('');
|
|
37
|
+
console.log('Installing superpowers to Claude Code:');
|
|
38
|
+
console.log(' ✅ Skills (specialized capabilities)');
|
|
39
|
+
console.log(' ✅ Commands (slash commands)');
|
|
40
|
+
console.log(' ✅ Agents (task automation)');
|
|
41
|
+
console.log(' ✅ Hooks (git hooks)');
|
|
42
|
+
console.log(' ✅ Libraries (helper functions)');
|
|
43
|
+
console.log(' ✅ Tests (test suites)');
|
|
44
|
+
console.log('');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
checkPrerequisites() {
|
|
48
|
+
console.log('🔍 Checking prerequisites...');
|
|
49
|
+
|
|
50
|
+
// Check if Claude directory exists
|
|
51
|
+
if (!fs.existsSync(this.claudeDir)) {
|
|
52
|
+
console.log(`⚠️ Claude directory not found: ${this.claudeDir}`);
|
|
53
|
+
console.log('💡 Make sure Claude Code CLI is installed first');
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Check if superpowers directory exists
|
|
58
|
+
if (!fs.existsSync(this.superpowersDir)) {
|
|
59
|
+
console.log(`❌ Superpowers directory not found: ${this.superpowersDir}`);
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
console.log(`✅ Claude directory: ${this.claudeDir}`);
|
|
64
|
+
console.log(`✅ Superpowers source: ${this.superpowersDir}`);
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
createDirectories() {
|
|
69
|
+
console.log('');
|
|
70
|
+
console.log('📁 Creating directories...');
|
|
71
|
+
|
|
72
|
+
const dirs = [
|
|
73
|
+
this.claudePluginsDir,
|
|
74
|
+
this.claudeSkillsDir,
|
|
75
|
+
this.claudeAgentsDir,
|
|
76
|
+
this.claudeHooksDir,
|
|
77
|
+
this.claudeLibDir,
|
|
78
|
+
this.claudeCommandsDir
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
dirs.forEach(dir => {
|
|
82
|
+
if (!fs.existsSync(dir)) {
|
|
83
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
84
|
+
console.log(` ✅ Created: ${path.basename(dir)}`);
|
|
85
|
+
} else {
|
|
86
|
+
console.log(` ✓ Exists: ${path.basename(dir)}`);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
copyDirectory(src, dest, name) {
|
|
92
|
+
if (!fs.existsSync(src)) {
|
|
93
|
+
console.log(` ⚠️ Skipped ${name}: source not found`);
|
|
94
|
+
return 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
let count = 0;
|
|
98
|
+
|
|
99
|
+
const copy = (source, destination) => {
|
|
100
|
+
const stat = fs.statSync(source);
|
|
101
|
+
|
|
102
|
+
if (stat.isDirectory()) {
|
|
103
|
+
const items = fs.readdirSync(source);
|
|
104
|
+
items.forEach(item => {
|
|
105
|
+
copy(path.join(source, item), path.join(destination, item));
|
|
106
|
+
});
|
|
107
|
+
} else {
|
|
108
|
+
// Create destination directory if needed
|
|
109
|
+
const destDir = path.dirname(destination);
|
|
110
|
+
if (!fs.existsSync(destDir)) {
|
|
111
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
fs.copyFileSync(source, destination);
|
|
115
|
+
count++;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
copy(src, dest);
|
|
120
|
+
return count;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
installSkills() {
|
|
124
|
+
console.log('');
|
|
125
|
+
console.log('🎯 Installing Skills...');
|
|
126
|
+
|
|
127
|
+
const skillsSource = path.join(this.superpowersDir, 'skills');
|
|
128
|
+
const skillsPluginDir = this.claudeSkillsDir;
|
|
129
|
+
const skillsGlobalDir = this.claudeGlobalSkillsDir;
|
|
130
|
+
|
|
131
|
+
if (!fs.existsSync(skillsSource)) {
|
|
132
|
+
console.log(' ⚠️ No skills directory found');
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Ensure global skills directory exists
|
|
137
|
+
if (!fs.existsSync(skillsGlobalDir)) {
|
|
138
|
+
fs.mkdirSync(skillsGlobalDir, { recursive: true });
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const skills = fs.readdirSync(skillsSource);
|
|
142
|
+
let count = 0;
|
|
143
|
+
|
|
144
|
+
skills.forEach(skill => {
|
|
145
|
+
const srcPath = path.join(skillsSource, skill);
|
|
146
|
+
|
|
147
|
+
// Copy to plugin skills directory
|
|
148
|
+
const destPath1 = path.join(skillsPluginDir, skill);
|
|
149
|
+
const numFiles1 = this.copyDirectory(srcPath, destPath1, skill);
|
|
150
|
+
|
|
151
|
+
// Also copy to global Claude skills directory (so they're available globally)
|
|
152
|
+
const destPath2 = path.join(skillsGlobalDir, skill);
|
|
153
|
+
const numFiles2 = this.copyDirectory(srcPath, destPath2, skill);
|
|
154
|
+
|
|
155
|
+
if (numFiles1 > 0) {
|
|
156
|
+
console.log(` ✅ ${skill} (${numFiles1} files) → plugin & global`);
|
|
157
|
+
count++;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
console.log(`📊 Total: ${count} skills installed (to both locations)`);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
installCommands() {
|
|
165
|
+
console.log('');
|
|
166
|
+
console.log('⚡ Installing Commands...');
|
|
167
|
+
|
|
168
|
+
const commandsSource = path.join(this.superpowersDir, 'commands');
|
|
169
|
+
const commandsDest = this.claudeCommandsDir;
|
|
170
|
+
|
|
171
|
+
if (!fs.existsSync(commandsSource)) {
|
|
172
|
+
console.log(' ⚠️ No commands directory found');
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const commands = fs.readdirSync(commandsSource).filter(f => f.endsWith('.md'));
|
|
177
|
+
let count = 0;
|
|
178
|
+
|
|
179
|
+
commands.forEach(cmd => {
|
|
180
|
+
const srcPath = path.join(commandsSource, cmd);
|
|
181
|
+
const destPath = path.join(commandsDest, cmd);
|
|
182
|
+
|
|
183
|
+
fs.copyFileSync(srcPath, destPath);
|
|
184
|
+
console.log(` ✅ /${cmd.replace('.md', '')}`);
|
|
185
|
+
count++;
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
console.log(`📊 Total: ${count} commands installed`);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
installAgents() {
|
|
192
|
+
console.log('');
|
|
193
|
+
console.log('🤖 Installing Agents...');
|
|
194
|
+
|
|
195
|
+
const agentsSource = path.join(this.superpowersDir, 'agents');
|
|
196
|
+
const agentsPluginDir = this.claudeAgentsDir;
|
|
197
|
+
const agentsGlobalDir = this.claudeGlobalAgentsDir;
|
|
198
|
+
|
|
199
|
+
if (!fs.existsSync(agentsSource)) {
|
|
200
|
+
console.log(' ⚠️ No agents directory found');
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Ensure global agents directory exists
|
|
205
|
+
if (!fs.existsSync(agentsGlobalDir)) {
|
|
206
|
+
fs.mkdirSync(agentsGlobalDir, { recursive: true });
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const agents = fs.readdirSync(agentsSource);
|
|
210
|
+
let count = 0;
|
|
211
|
+
|
|
212
|
+
agents.forEach(agent => {
|
|
213
|
+
const srcPath = path.join(agentsSource, agent);
|
|
214
|
+
|
|
215
|
+
// Copy to plugin agents directory
|
|
216
|
+
const destPath1 = path.join(agentsPluginDir, agent);
|
|
217
|
+
fs.copyFileSync(srcPath, destPath1);
|
|
218
|
+
|
|
219
|
+
// Also copy to global Claude agents directory (so they're available globally)
|
|
220
|
+
const destPath2 = path.join(agentsGlobalDir, agent);
|
|
221
|
+
fs.copyFileSync(srcPath, destPath2);
|
|
222
|
+
|
|
223
|
+
console.log(` ✅ ${agent} → plugin & global`);
|
|
224
|
+
count++;
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
console.log(`📊 Total: ${count} agents installed (to both locations)`);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
installHooks() {
|
|
231
|
+
console.log('');
|
|
232
|
+
console.log('🪝 Installing Hooks...');
|
|
233
|
+
|
|
234
|
+
const hooksSource = path.join(this.superpowersDir, 'hooks');
|
|
235
|
+
const hooksDest = this.claudeHooksDir;
|
|
236
|
+
const claudeMainHooksDir = path.join(this.claudeDir, 'hooks');
|
|
237
|
+
|
|
238
|
+
if (!fs.existsSync(hooksSource)) {
|
|
239
|
+
console.log(' ⚠️ No hooks directory found');
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Ensure main hooks directory exists
|
|
244
|
+
if (!fs.existsSync(claudeMainHooksDir)) {
|
|
245
|
+
fs.mkdirSync(claudeMainHooksDir, { recursive: true });
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const hooks = fs.readdirSync(hooksSource);
|
|
249
|
+
let count = 0;
|
|
250
|
+
|
|
251
|
+
hooks.forEach(hook => {
|
|
252
|
+
const srcPath = path.join(hooksSource, hook);
|
|
253
|
+
|
|
254
|
+
// Copy to plugin hooks directory
|
|
255
|
+
const destPath1 = path.join(hooksDest, hook);
|
|
256
|
+
const numFiles1 = this.copyDirectory(srcPath, destPath1, hook);
|
|
257
|
+
|
|
258
|
+
// Also copy to main Claude hooks directory (so they can be executed)
|
|
259
|
+
const destPath2 = path.join(claudeMainHooksDir, hook);
|
|
260
|
+
const numFiles2 = this.copyDirectory(srcPath, destPath2, hook);
|
|
261
|
+
|
|
262
|
+
if (numFiles1 > 0) {
|
|
263
|
+
console.log(` ✅ ${hook} (${numFiles1} files) → plugins & main hooks`);
|
|
264
|
+
count++;
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
console.log(`📊 Total: ${count} hooks installed (to both locations)`);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
installLibs() {
|
|
272
|
+
console.log('');
|
|
273
|
+
console.log('📚 Installing Libraries...');
|
|
274
|
+
|
|
275
|
+
const libsSource = path.join(this.superpowersDir, 'lib');
|
|
276
|
+
const libsDest = this.claudeLibDir;
|
|
277
|
+
|
|
278
|
+
if (!fs.existsSync(libsSource)) {
|
|
279
|
+
console.log(' ⚠️ No lib directory found');
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
const libs = fs.readdirSync(libsSource);
|
|
284
|
+
let count = 0;
|
|
285
|
+
|
|
286
|
+
libs.forEach(lib => {
|
|
287
|
+
const srcPath = path.join(libsSource, lib);
|
|
288
|
+
const destPath = path.join(libsDest, lib);
|
|
289
|
+
|
|
290
|
+
fs.copyFileSync(srcPath, destPath);
|
|
291
|
+
console.log(` ✅ ${lib}`);
|
|
292
|
+
count++;
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
console.log(`📊 Total: ${count} libraries installed`);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
installTests() {
|
|
299
|
+
console.log('');
|
|
300
|
+
console.log('🧪 Installing Tests...');
|
|
301
|
+
|
|
302
|
+
const testsSource = path.join(this.superpowersDir, 'tests');
|
|
303
|
+
const testsDest = this.claudeTestsDir;
|
|
304
|
+
|
|
305
|
+
if (!fs.existsSync(testsSource)) {
|
|
306
|
+
console.log(' ⚠️ No tests directory found');
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
const testSuites = fs.readdirSync(testsSource);
|
|
311
|
+
let count = 0;
|
|
312
|
+
|
|
313
|
+
testSuites.forEach(suite => {
|
|
314
|
+
const srcPath = path.join(testsSource, suite);
|
|
315
|
+
const destPath = path.join(testsDest, suite);
|
|
316
|
+
|
|
317
|
+
const numFiles = this.copyDirectory(srcPath, destPath, suite);
|
|
318
|
+
if (numFiles > 0) {
|
|
319
|
+
console.log(` ✅ ${suite} (${numFiles} files)`);
|
|
320
|
+
count++;
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
console.log(`📊 Total: ${count} test suites installed`);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
createManifest() {
|
|
328
|
+
console.log('');
|
|
329
|
+
console.log('📋 Creating manifest...');
|
|
330
|
+
|
|
331
|
+
const manifest = {
|
|
332
|
+
name: 'claude-all-superpowers',
|
|
333
|
+
version: fs.readFileSync(path.join(this.packageDir, 'VERSION'), 'utf8').trim(),
|
|
334
|
+
description: 'Claude-All Superpowers Collection',
|
|
335
|
+
installedAt: new Date().toISOString(),
|
|
336
|
+
components: {
|
|
337
|
+
skills: fs.existsSync(this.claudeSkillsDir) ? fs.readdirSync(this.claudeSkillsDir).length : 0,
|
|
338
|
+
commands: fs.existsSync(this.claudeCommandsDir) ? fs.readdirSync(this.claudeCommandsDir).filter(f => f.endsWith('.md')).length : 0,
|
|
339
|
+
agents: fs.existsSync(this.claudeAgentsDir) ? fs.readdirSync(this.claudeAgentsDir).length : 0,
|
|
340
|
+
hooks: fs.existsSync(this.claudeHooksDir) ? fs.readdirSync(this.claudeHooksDir).length : 0,
|
|
341
|
+
libs: fs.existsSync(this.claudeLibDir) ? fs.readdirSync(this.claudeLibDir).length : 0,
|
|
342
|
+
tests: fs.existsSync(this.claudeTestsDir) ? fs.readdirSync(this.claudeTestsDir).length : 0
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
const manifestPath = path.join(this.claudePluginsDir, 'manifest.json');
|
|
347
|
+
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2));
|
|
348
|
+
console.log(` ✅ Manifest created: ${manifestPath}`);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
showCompletion() {
|
|
352
|
+
console.log('');
|
|
353
|
+
console.log('🎉 SUPERPOWERS INSTALLATION COMPLETED!');
|
|
354
|
+
console.log('=====================================');
|
|
355
|
+
console.log('');
|
|
356
|
+
console.log('✅ All superpowers installed to Claude Code');
|
|
357
|
+
console.log('');
|
|
358
|
+
console.log('📍 Installation Location:');
|
|
359
|
+
console.log(` ${this.claudePluginsDir}`);
|
|
360
|
+
console.log('');
|
|
361
|
+
console.log('🚀 Usage:');
|
|
362
|
+
console.log(' Restart Claude Code CLI to load superpowers');
|
|
363
|
+
console.log('');
|
|
364
|
+
console.log('📚 Available Superpowers:');
|
|
365
|
+
console.log(' • Skills - Specialized capabilities');
|
|
366
|
+
console.log(' • Commands - Slash commands');
|
|
367
|
+
console.log(' • Agents - Task automation');
|
|
368
|
+
console.log(' • Hooks - Git hooks');
|
|
369
|
+
console.log(' • Libraries - Helper functions');
|
|
370
|
+
console.log(' • Tests - Test suites');
|
|
371
|
+
console.log('');
|
|
372
|
+
console.log('💡 Tip: Use /help in Claude Code to see available commands');
|
|
373
|
+
console.log('');
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
async install() {
|
|
377
|
+
try {
|
|
378
|
+
this.printHeader();
|
|
379
|
+
|
|
380
|
+
if (!this.checkPrerequisites()) {
|
|
381
|
+
console.log('');
|
|
382
|
+
console.log('❌ Installation failed: Prerequisites not met');
|
|
383
|
+
process.exit(1);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
this.createDirectories();
|
|
387
|
+
this.installSkills();
|
|
388
|
+
this.installCommands();
|
|
389
|
+
this.installAgents();
|
|
390
|
+
this.installHooks();
|
|
391
|
+
this.installLibs();
|
|
392
|
+
this.installTests();
|
|
393
|
+
this.createManifest();
|
|
394
|
+
this.showCompletion();
|
|
395
|
+
|
|
396
|
+
} catch (error) {
|
|
397
|
+
console.error('');
|
|
398
|
+
console.error('❌ Installation failed:', error.message);
|
|
399
|
+
console.error(error.stack);
|
|
400
|
+
process.exit(1);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Run installer if called directly
|
|
406
|
+
if (require.main === module) {
|
|
407
|
+
const installer = new SuperpowersInstaller();
|
|
408
|
+
installer.install();
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
module.exports = SuperpowersInstaller;
|
package/utils/install.js
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 🤖 Claude-All Universal AI Launcher - NPM Installer
|
|
5
|
+
* Cross-platform installer for AI CLI launcher with multiple providers
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const { execSync } = require('child_process');
|
|
11
|
+
const os = require('os');
|
|
12
|
+
|
|
13
|
+
class ClaudeAllInstaller {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.homeDir = os.homedir();
|
|
16
|
+
this.platform = os.platform();
|
|
17
|
+
this.packageDir = __dirname;
|
|
18
|
+
this.installDir = path.join(this.homeDir, '.claude-all');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
printHeader() {
|
|
22
|
+
console.log('🤖 CLAUDE-ALL UNIVERSAL AI LAUNCHER');
|
|
23
|
+
console.log('==================================');
|
|
24
|
+
console.log('Installing AI CLI launcher with:');
|
|
25
|
+
console.log(' ✅ Claude Code CLI integration');
|
|
26
|
+
console.log(' ✅ Multiple AI providers (MiniMax, Gemini, OpenAI, Groq, Ollama)');
|
|
27
|
+
console.log(' ✅ Universal device compatibility');
|
|
28
|
+
console.log(' ✅ Cross-platform support');
|
|
29
|
+
console.log('');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
checkSystem() {
|
|
33
|
+
console.log('🔍 Checking system compatibility...');
|
|
34
|
+
|
|
35
|
+
const supportedPlatforms = ['linux', 'darwin', 'win32', 'freebsd', 'openbsd', 'android', 'sunos'];
|
|
36
|
+
if (!supportedPlatforms.includes(this.platform)) {
|
|
37
|
+
console.log(`⚠️ Platform ${this.platform} not officially supported`);
|
|
38
|
+
console.log(' Trying installation anyway...');
|
|
39
|
+
} else {
|
|
40
|
+
console.log(`✅ Platform: ${this.platform}`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Check Node.js version
|
|
44
|
+
const nodeVersion = process.version;
|
|
45
|
+
const majorVersion = parseInt(nodeVersion.slice(1).split('.')[0]);
|
|
46
|
+
if (majorVersion < 14) {
|
|
47
|
+
console.log(`⚠️ Node.js ${nodeVersion} detected. Minimum recommended: 14.x`);
|
|
48
|
+
} else {
|
|
49
|
+
console.log(`✅ Node.js: ${nodeVersion}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
createDirectories() {
|
|
54
|
+
console.log('📁 Creating directories...');
|
|
55
|
+
|
|
56
|
+
const dirs = [
|
|
57
|
+
this.installDir,
|
|
58
|
+
path.join(this.installDir, 'config'),
|
|
59
|
+
path.join(this.installDir, 'logs'),
|
|
60
|
+
path.join(this.installDir, 'cache')
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
dirs.forEach(dir => {
|
|
64
|
+
if (!fs.existsSync(dir)) {
|
|
65
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
66
|
+
console.log(` ✅ Created: ${dir}`);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
installDependencies() {
|
|
72
|
+
console.log('📦 Checking dependencies...');
|
|
73
|
+
|
|
74
|
+
const commands = {
|
|
75
|
+
linux: [
|
|
76
|
+
'curl --version',
|
|
77
|
+
'wget --version',
|
|
78
|
+
'python3 --version'
|
|
79
|
+
],
|
|
80
|
+
darwin: [
|
|
81
|
+
'curl --version',
|
|
82
|
+
'wget --version',
|
|
83
|
+
'python3 --version'
|
|
84
|
+
],
|
|
85
|
+
win32: [
|
|
86
|
+
'curl --version',
|
|
87
|
+
'python --version'
|
|
88
|
+
],
|
|
89
|
+
android: [
|
|
90
|
+
'curl --version',
|
|
91
|
+
'python --version'
|
|
92
|
+
]
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const platformCommands = commands[this.platform] || commands.linux;
|
|
96
|
+
|
|
97
|
+
platformCommands.forEach(cmd => {
|
|
98
|
+
try {
|
|
99
|
+
execSync(cmd, { stdio: 'pipe' });
|
|
100
|
+
console.log(` ✅ ${cmd.split(' ')[0]} available`);
|
|
101
|
+
} catch (e) {
|
|
102
|
+
console.log(` ⚠️ ${cmd.split(' ')[0]} not found (optional)`);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
setupConfiguration() {
|
|
108
|
+
console.log('⚙️ Setting up configuration...');
|
|
109
|
+
|
|
110
|
+
const defaultConfig = {
|
|
111
|
+
version: fs.readFileSync(path.join(this.packageDir, '..', 'VERSION'), 'utf8').trim(),
|
|
112
|
+
providers: {
|
|
113
|
+
minimax: {
|
|
114
|
+
name: "MiniMax",
|
|
115
|
+
enabled: true,
|
|
116
|
+
endpoint: "https://api.minimax.chat/v1",
|
|
117
|
+
models: ["abab6.5", "abab6.5s", "abab5.5"]
|
|
118
|
+
},
|
|
119
|
+
gemini: {
|
|
120
|
+
name: "Google Gemini",
|
|
121
|
+
enabled: true,
|
|
122
|
+
endpoint: "https://generativelanguage.googleapis.com/v1beta",
|
|
123
|
+
models: ["gemini-pro", "gemini-pro-vision"]
|
|
124
|
+
},
|
|
125
|
+
openai: {
|
|
126
|
+
name: "OpenAI",
|
|
127
|
+
enabled: true,
|
|
128
|
+
endpoint: "https://api.openai.com/v1",
|
|
129
|
+
models: ["gpt-4", "gpt-3.5-turbo"]
|
|
130
|
+
},
|
|
131
|
+
groq: {
|
|
132
|
+
name: "Groq",
|
|
133
|
+
enabled: true,
|
|
134
|
+
endpoint: "https://api.groq.com/openai/v1",
|
|
135
|
+
models: ["llama-3.1-70b-versatile", "mixtral-8x7b-32768"]
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
ui: {
|
|
139
|
+
theme: "default",
|
|
140
|
+
auto_save: true,
|
|
141
|
+
history_size: 1000
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const configFile = path.join(this.installDir, 'config', 'config.json');
|
|
146
|
+
fs.writeFileSync(configFile, JSON.stringify(defaultConfig, null, 2));
|
|
147
|
+
console.log(` ✅ Configuration: ${configFile}`);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
createSymlinks() {
|
|
151
|
+
console.log('🔗 Creating symlinks...');
|
|
152
|
+
|
|
153
|
+
const binDir = path.join(this.homeDir, '.local', 'bin');
|
|
154
|
+
if (!fs.existsSync(binDir)) {
|
|
155
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const targets = [
|
|
159
|
+
{ src: 'claude-all', dest: 'claude-all' },
|
|
160
|
+
{ src: 'claude-all', dest: 'claude-launcher' },
|
|
161
|
+
{ src: 'claude-all', dest: 'ai-chat' }
|
|
162
|
+
];
|
|
163
|
+
|
|
164
|
+
targets.forEach(({ src, dest }) => {
|
|
165
|
+
const sourcePath = path.join(this.packageDir, '..', 'bin', src);
|
|
166
|
+
const destPath = path.join(binDir, dest);
|
|
167
|
+
|
|
168
|
+
try {
|
|
169
|
+
if (fs.existsSync(destPath)) {
|
|
170
|
+
fs.unlinkSync(destPath);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (this.platform === 'win32') {
|
|
174
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
175
|
+
fs.chmodSync(destPath, '755');
|
|
176
|
+
} else {
|
|
177
|
+
fs.symlinkSync(sourcePath, destPath);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
console.log(` ✅ ${dest}`);
|
|
181
|
+
} catch (e) {
|
|
182
|
+
console.log(` ⚠️ Could not create ${dest}: ${e.message}`);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
updateShellConfig() {
|
|
188
|
+
console.log('🔧 Updating shell configuration...');
|
|
189
|
+
|
|
190
|
+
const shellFiles = ['.bashrc', '.zshrc', '.profile'];
|
|
191
|
+
const binPath = path.join(this.homeDir, '.local', 'bin');
|
|
192
|
+
const exportLine = `export PATH="${binPath}:$PATH"`;
|
|
193
|
+
|
|
194
|
+
shellFiles.forEach(file => {
|
|
195
|
+
const filePath = path.join(this.homeDir, file);
|
|
196
|
+
|
|
197
|
+
if (fs.existsSync(filePath)) {
|
|
198
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
199
|
+
|
|
200
|
+
if (!content.includes(binPath)) {
|
|
201
|
+
fs.appendFileSync(filePath, `\n\n# Claude-All AI Launcher\n${exportLine}\n`);
|
|
202
|
+
console.log(` ✅ Updated ${file}`);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
console.log(` 💡 Add to PATH: ${binPath}`);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
createStartupScripts() {
|
|
211
|
+
console.log('🚀 Creating startup scripts...');
|
|
212
|
+
|
|
213
|
+
const launchScript = `#!/bin/bash
|
|
214
|
+
# Claude-All AI Launcher
|
|
215
|
+
echo "🤖 Starting Claude-All AI Launcher..."
|
|
216
|
+
exec "${path.join(this.packageDir, '..', 'bin', 'claude-all')}" "$@"
|
|
217
|
+
`;
|
|
218
|
+
|
|
219
|
+
const scripts = {
|
|
220
|
+
'claude-launch': launchScript,
|
|
221
|
+
'ai-chat': launchScript
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
Object.entries(scripts).forEach(([name, content]) => {
|
|
225
|
+
const scriptPath = path.join(this.installDir, name);
|
|
226
|
+
fs.writeFileSync(scriptPath, content);
|
|
227
|
+
fs.chmodSync(scriptPath, '755');
|
|
228
|
+
console.log(` ✅ ${scriptPath}`);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
showCompletion() {
|
|
233
|
+
console.log('');
|
|
234
|
+
console.log('🎉 CLAUDE-ALL INSTALLATION COMPLETED!');
|
|
235
|
+
console.log('====================================');
|
|
236
|
+
console.log('');
|
|
237
|
+
console.log('✅ Universal AI launcher installed');
|
|
238
|
+
console.log('✅ Multiple AI providers configured');
|
|
239
|
+
console.log('✅ Cross-platform compatibility ensured');
|
|
240
|
+
console.log('✅ Shell configuration updated');
|
|
241
|
+
console.log('');
|
|
242
|
+
console.log('🚀 Quick Start:');
|
|
243
|
+
console.log('');
|
|
244
|
+
console.log('NPM Commands:');
|
|
245
|
+
console.log(' npm run claude - Start Claude-All');
|
|
246
|
+
console.log(' npm run launch - Start Claude-All');
|
|
247
|
+
console.log(' npm run switch - Switch AI provider');
|
|
248
|
+
console.log(' npm run config - Configure settings');
|
|
249
|
+
console.log(' npm run help - Show help');
|
|
250
|
+
console.log('');
|
|
251
|
+
console.log('Direct Commands:');
|
|
252
|
+
console.log(' claude-all - Start AI launcher');
|
|
253
|
+
console.log(' ai-chat - Start chat interface');
|
|
254
|
+
console.log(' claude-launcher - Alternative launcher');
|
|
255
|
+
console.log('');
|
|
256
|
+
console.log('🔧 Configuration:');
|
|
257
|
+
console.log(` Config: ${path.join(this.installDir, 'config', 'config.json')}`);
|
|
258
|
+
console.log(` Logs: ${path.join(this.installDir, 'logs')}`);
|
|
259
|
+
console.log('');
|
|
260
|
+
console.log('📱 Supported Providers:');
|
|
261
|
+
console.log(' • MiniMax • Google Gemini');
|
|
262
|
+
console.log(' • OpenAI • Groq');
|
|
263
|
+
console.log(' • Ollama (Local) • Custom APIs');
|
|
264
|
+
console.log(' • xAI/Grok • ZhipuAI/GLM');
|
|
265
|
+
console.log('');
|
|
266
|
+
console.log('⚠️ IMPORTANT:');
|
|
267
|
+
console.log(' • Restart your shell or run: source ~/.bashrc');
|
|
268
|
+
console.log(' • Set API keys in configuration');
|
|
269
|
+
console.log(' • Run: npm run config to setup');
|
|
270
|
+
console.log('');
|
|
271
|
+
console.log('🎯 Ready to launch AI assistants on any device! 🚀');
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
async install() {
|
|
275
|
+
try {
|
|
276
|
+
this.printHeader();
|
|
277
|
+
this.checkSystem();
|
|
278
|
+
this.createDirectories();
|
|
279
|
+
this.installDependencies();
|
|
280
|
+
this.setupConfiguration();
|
|
281
|
+
this.createSymlinks();
|
|
282
|
+
this.updateShellConfig();
|
|
283
|
+
this.createStartupScripts();
|
|
284
|
+
this.showCompletion();
|
|
285
|
+
} catch (error) {
|
|
286
|
+
console.error('❌ Installation failed:', error.message);
|
|
287
|
+
process.exit(1);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
// Run installer if called directly
|
|
293
|
+
if (require.main === module) {
|
|
294
|
+
const installer = new ClaudeAllInstaller();
|
|
295
|
+
installer.install();
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
module.exports = ClaudeAllInstaller;
|