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.
Files changed (167) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.md +70 -0
  3. package/README.md +133 -0
  4. package/VERSION +1 -0
  5. package/agents/accessibility-reviewer.md +96 -0
  6. package/agents/ai-prompt-optimizer.md +94 -0
  7. package/agents/api-tester.md +102 -0
  8. package/agents/code-generator.md +94 -0
  9. package/agents/code-reviewer.md +47 -0
  10. package/agents/component-generator.md +102 -0
  11. package/agents/doc-generator.md +91 -0
  12. package/agents/migration-generator.md +94 -0
  13. package/agents/performance-analyzer.md +90 -0
  14. package/agents/proactive-mode.md +91 -0
  15. package/agents/readme-generator.md +101 -0
  16. package/agents/security-auditor.md +86 -0
  17. package/agents/terraform-generator.md +94 -0
  18. package/agents/test-generator.md +76 -0
  19. package/bin/agentrouter.json +36 -0
  20. package/bin/ai-chat +20 -0
  21. package/bin/antigravity.json +76 -0
  22. package/bin/api-manager +340 -0
  23. package/bin/claude-launcher +19 -0
  24. package/bin/claude-master +15 -0
  25. package/bin/claude_master.py +295 -0
  26. package/bin/cohere.json +7 -0
  27. package/bin/deepseek.json +44 -0
  28. package/bin/gemini.json +56 -0
  29. package/bin/glm.json +21 -0
  30. package/bin/groq.json +41 -0
  31. package/bin/minimax.json +26 -0
  32. package/bin/mistral.json +7 -0
  33. package/bin/moonshot.json +7 -0
  34. package/bin/ollama.json +36 -0
  35. package/bin/openai.json +46 -0
  36. package/bin/openrouter.json +38 -0
  37. package/bin/perplexity.json +12 -0
  38. package/bin/qwen.json +7 -0
  39. package/bin/switch-provider +73 -0
  40. package/bin/test.json +7 -0
  41. package/bin/xai.json +41 -0
  42. package/claude-all +2707 -0
  43. package/claude-config.json +340 -0
  44. package/claude-suite/REFACTORING_SUMMARY.md +88 -0
  45. package/claude-suite/auth/.antigravity_proxy.py +78 -0
  46. package/claude-suite/auth/__pycache__/openai_auth.cpython-312.pyc +0 -0
  47. package/claude-suite/auth/gemini_auth.py +80 -0
  48. package/claude-suite/auth/openai_auth.py +138 -0
  49. package/claude-suite/backups/claude-all-before-refactor +1075 -0
  50. package/claude-suite/backups/claude-all.backup +840 -0
  51. package/claude-suite/backups/claude-all.original +840 -0
  52. package/claude-suite/models/add-model-manual.sh +588 -0
  53. package/claude-suite/models/add-model.sh +114 -0
  54. package/claude-suite/models/model-switcher.sh +69 -0
  55. package/claude-suite/providers/claude-glm +89 -0
  56. package/claude-suite/providers/claude-glm-wrapper.sh +55 -0
  57. package/claude-suite/providers/claude-minimax +12 -0
  58. package/claude-suite/providers/claude-smart +132 -0
  59. package/claude-suite/providers/xai_chat.sh +56 -0
  60. package/claude-suite/utils/__pycache__/claude_master.cpython-312.pyc +0 -0
  61. package/claude-suite/utils/antigravity_proxy_server.py +168 -0
  62. package/claude-suite/utils/claude-all-help.txt +83 -0
  63. package/claude-suite/utils/claude_master.py +408 -0
  64. package/commands/brainstorm.md +5 -0
  65. package/commands/execute-plan.md +5 -0
  66. package/commands/write-plan.md +5 -0
  67. package/docs/ANTIGRAVITY-SETUP.md +176 -0
  68. package/docs/AUTH_CREDENTIALS.md +54 -0
  69. package/docs/NPM-INSTALLATION.md +166 -0
  70. package/hooks/hooks.json +15 -0
  71. package/hooks/run-hook.cmd +19 -0
  72. package/hooks/session-start.sh +52 -0
  73. package/install.sh +155 -0
  74. package/mcp.json +34 -0
  75. package/model/perplexity.json +12 -0
  76. package/package.json +69 -0
  77. package/plugins/README.md +47 -0
  78. package/plugins/installed_plugins.json +317 -0
  79. package/plugins/known_marketplaces.json +10 -0
  80. package/plugins/marketplace-info/marketplace.json +517 -0
  81. package/postinstall.js +100 -0
  82. package/scripts/antigravity_proxy_server.py +168 -0
  83. package/scripts/get_gemini_api_key.py +96 -0
  84. package/scripts/setup_antigravity_auth.py +171 -0
  85. package/skills/api-development/SKILL.md +11 -0
  86. package/skills/api-development/openapi/api-documentation.yaml +108 -0
  87. package/skills/brainstorming/SKILL.md +54 -0
  88. package/skills/code-quality/SKILL.md +196 -0
  89. package/skills/condition-based-waiting/SKILL.md +120 -0
  90. package/skills/condition-based-waiting/example.ts +158 -0
  91. package/skills/database-development/SKILL.md +11 -0
  92. package/skills/database-development/migrations/migration.template.sql +49 -0
  93. package/skills/defense-in-depth/SKILL.md +127 -0
  94. package/skills/deployment/SKILL.md +11 -0
  95. package/skills/deployment/ci-cd/github-actions.yml +95 -0
  96. package/skills/deployment/docker/Dockerfile.template +39 -0
  97. package/skills/dispatching-parallel-agents/SKILL.md +180 -0
  98. package/skills/documentation-generation/SKILL.md +8 -0
  99. package/skills/documentation-generation/templates/README.template.md +60 -0
  100. package/skills/error-handling/SKILL.md +267 -0
  101. package/skills/executing-plans/SKILL.md +76 -0
  102. package/skills/finishing-a-development-branch/SKILL.md +200 -0
  103. package/skills/frontend-design/frontend-design/SKILL.md +42 -0
  104. package/skills/integration-testing/SKILL.md +13 -0
  105. package/skills/integration-testing/examples/contract-test.py +317 -0
  106. package/skills/integration-testing/examples/e2e-test.js +147 -0
  107. package/skills/integration-testing/examples/test-isolation.md +94 -0
  108. package/skills/logging-monitoring/SKILL.md +66 -0
  109. package/skills/mobile-development/SKILL.md +11 -0
  110. package/skills/mobile-development/responsive/responsive.css +80 -0
  111. package/skills/performance-optimization/SKILL.md +9 -0
  112. package/skills/performance-optimization/profiling/profile.template.js +21 -0
  113. package/skills/receiving-code-review/SKILL.md +209 -0
  114. package/skills/refactoring/SKILL.md +11 -0
  115. package/skills/refactoring/code-smells/common-smells.md +115 -0
  116. package/skills/requesting-code-review/SKILL.md +105 -0
  117. package/skills/requesting-code-review/code-reviewer.md +146 -0
  118. package/skills/root-cause-tracing/SKILL.md +174 -0
  119. package/skills/root-cause-tracing/find-polluter.sh +63 -0
  120. package/skills/security-review/SKILL.md +11 -0
  121. package/skills/security-review/checklists/owasp-checklist.md +31 -0
  122. package/skills/sharing-skills/SKILL.md +194 -0
  123. package/skills/subagent-driven-development/SKILL.md +240 -0
  124. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
  125. package/skills/subagent-driven-development/implementer-prompt.md +78 -0
  126. package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  127. package/skills/systematic-debugging/CREATION-LOG.md +119 -0
  128. package/skills/systematic-debugging/SKILL.md +295 -0
  129. package/skills/systematic-debugging/test-academic.md +14 -0
  130. package/skills/systematic-debugging/test-pressure-1.md +58 -0
  131. package/skills/systematic-debugging/test-pressure-2.md +68 -0
  132. package/skills/systematic-debugging/test-pressure-3.md +69 -0
  133. package/skills/test-driven-development/SKILL.md +364 -0
  134. package/skills/testing-anti-patterns/SKILL.md +302 -0
  135. package/skills/testing-skills-with-subagents/SKILL.md +387 -0
  136. package/skills/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md +189 -0
  137. package/skills/ui-ux-review/SKILL.md +13 -0
  138. package/skills/ui-ux-review/checklists/ux-heuristics.md +61 -0
  139. package/skills/using-git-worktrees/SKILL.md +213 -0
  140. package/skills/using-superpowers/SKILL.md +101 -0
  141. package/skills/verification-before-completion/SKILL.md +139 -0
  142. package/skills/writing-plans/SKILL.md +116 -0
  143. package/skills/writing-skills/SKILL.md +622 -0
  144. package/skills/writing-skills/anthropic-best-practices.md +1150 -0
  145. package/skills/writing-skills/graphviz-conventions.dot +172 -0
  146. package/skills/writing-skills/persuasion-principles.md +187 -0
  147. package/update.sh +36 -0
  148. package/utils/check-superpowers.sh +114 -0
  149. package/utils/claude-branding.md +166 -0
  150. package/utils/config.js +185 -0
  151. package/utils/custom-claude-config.sh +89 -0
  152. package/utils/custom-claude-hooks.md +129 -0
  153. package/utils/custom-claude-lib.js +222 -0
  154. package/utils/customize-claude-ui.sh +162 -0
  155. package/utils/fix-claude-integration.sh +133 -0
  156. package/utils/help.js +125 -0
  157. package/utils/install-curl.ps1 +135 -0
  158. package/utils/install-curl.sh +525 -0
  159. package/utils/install-superpowers.js +411 -0
  160. package/utils/install.js +298 -0
  161. package/utils/install.sh +182 -0
  162. package/utils/postinstall.js +63 -0
  163. package/utils/rename-claude.sh +96 -0
  164. package/utils/uninstall-superpowers.js +273 -0
  165. package/utils/uninstall.ps1 +136 -0
  166. package/utils/uninstall.sh +163 -0
  167. package/utils/update.sh +160 -0
@@ -0,0 +1,525 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # One-liner curl installer for Claude-All-New v7.0
4
+ # Supports: Linux, Termux, macOS, Windows (Git Bash/WSL)
5
+ # Usage: curl -fsSL https://raw.githubusercontent.com/zesbe/Claude-All-New/main/utils/install-curl.sh | bash
6
+ # Includes Superpowers Library (30 skills + 14 agents)
7
+
8
+ set -e
9
+
10
+ # Global variables for cleanup
11
+ TEMP_DIR=""
12
+ INSTALL_DIR=""
13
+
14
+ # Cleanup function for interrupted script
15
+ cleanup_on_exit() {
16
+ if [[ -n "$TEMP_DIR" && -d "$TEMP_DIR" ]]; then
17
+ echo -e "${YELLOW}🧹 Cleaning up temporary files...${NC}"
18
+ cd /
19
+ rm -rf "$TEMP_DIR" 2>/dev/null || true
20
+ fi
21
+ }
22
+
23
+ # Set trap for cleanup on script exit/interrupt
24
+ trap cleanup_on_exit EXIT INT TERM
25
+
26
+ # Platform detection
27
+ detect_platform() {
28
+ case "$(uname -s)" in
29
+ Linux*) echo "Linux";;
30
+ Darwin*) echo "macOS";;
31
+ CYGWIN*|MINGW*|MSYS*) echo "Windows";;
32
+ esac
33
+ }
34
+
35
+ PLATFORM=$(detect_platform)
36
+
37
+ # Colors - Support both Linux/macOS and Windows
38
+ if [[ "$PLATFORM" == "Windows" ]]; then
39
+ # Windows (Git Bash/WSL) - Use tput if available, otherwise plain
40
+ if command -v tput &> /dev/null; then
41
+ GREEN=$(tput setaf 2 2>/dev/null || echo "")
42
+ BLUE=$(tput setaf 4 2>/dev/null || echo "")
43
+ YELLOW=$(tput setaf 3 2>/dev/null || echo "")
44
+ RED=$(tput setaf 1 2>/dev/null || echo "")
45
+ NC=$(tput sgr0 2>/dev/null || echo "")
46
+ else
47
+ # Plain text for Windows without color support
48
+ GREEN=''
49
+ BLUE=''
50
+ YELLOW=''
51
+ RED=''
52
+ NC=''
53
+ fi
54
+ else
55
+ # Linux/macOS/Termux
56
+ GREEN='\033[0;32m'
57
+ BLUE='\033[0;34m'
58
+ YELLOW='\033[1;33m'
59
+ RED='\033[0;31m'
60
+ NC='\033[0m'
61
+ fi
62
+
63
+ echo -e "${GREEN}🚀 Claude-All-New - One Command Installer${NC}"
64
+ echo "============================================"
65
+ echo ""
66
+
67
+ # Check if curl is installed
68
+ if ! command -v curl &> /dev/null; then
69
+ echo -e "${RED}Error: curl is not installed${NC}"
70
+ echo ""
71
+ echo "Please install curl first:"
72
+ echo " Ubuntu/Debian: sudo apt install curl"
73
+ echo " macOS: brew install curl"
74
+ echo " Termux (Android): pkg install curl"
75
+ echo " Windows: Install Git for Windows (includes curl)"
76
+ echo ""
77
+ exit 1
78
+ fi
79
+
80
+ # Check if tar is installed
81
+ if ! command -v tar &> /dev/null; then
82
+ echo -e "${RED}Error: tar is not installed${NC}"
83
+ echo "Please install tar first."
84
+ exit 1
85
+ fi
86
+
87
+ # Function to clean up existing installation
88
+ cleanup_existing_installation() {
89
+ local install_dir="$1"
90
+
91
+ echo -e "${YELLOW}🔍 Checking for existing installation...${NC}"
92
+
93
+ # Backup existing config if exists
94
+ if [[ -f "$install_dir/perplexity.json" ]]; then
95
+ cp "$install_dir/perplexity.json" "$install_dir/perplexity.json.backup" 2>/dev/null || true
96
+ echo -e "${BLUE}📋 Backed up existing Perplexity config${NC}"
97
+ fi
98
+
99
+ # Remove old claude-all if exists to prevent conflicts
100
+ if [[ -f "$install_dir/claude-all" ]]; then
101
+ echo -e "${YELLOW}🗑️ Removing old claude-all installation...${NC}"
102
+ rm -f "$install_dir/claude-all" 2>/dev/null || true
103
+ fi
104
+
105
+ # Remove old bin folder files that might conflict
106
+ if [[ -d "$install_dir" && -f "$install_dir/glm.json" ]]; then
107
+ echo -e "${YELLOW}🧹 Cleaning old config files...${NC}"
108
+ # Keep backup of custom API keys
109
+ for config_file in "$install_dir"/*.json; do
110
+ if [[ -f "$config_file" && "$config_file" != *"test.json" && "$config_file" != *"SET_YOUR"* ]]; then
111
+ cp "$config_file" "$config_file.backup" 2>/dev/null || true
112
+ fi
113
+ done
114
+ fi
115
+ }
116
+
117
+ # Create temp directory (cross-platform)
118
+ if [[ "$PLATFORM" == "Windows" ]]; then
119
+ # Windows - use a simple temp dir
120
+ TEMP_DIR="/tmp/claude-all-new-$$"
121
+ mkdir -p "$TEMP_DIR" || {
122
+ echo -e "${RED}❌ Failed to create temp directory${NC}"
123
+ exit 1
124
+ }
125
+ else
126
+ # Linux/macOS/Termux
127
+ TEMP_DIR=$(mktemp -d) || {
128
+ echo -e "${RED}❌ Failed to create temp directory${NC}"
129
+ exit 1
130
+ }
131
+ fi
132
+
133
+ cd "$TEMP_DIR" || {
134
+ echo -e "${RED}❌ Failed to change to temp directory${NC}"
135
+ exit 1
136
+ }
137
+
138
+ echo -e "${BLUE}Downloading Claude-All-New...${NC}"
139
+ curl -fsSL https://github.com/zesbe/Claude-All-New/archive/main.tar.gz -o claude-all-new.tar.gz || {
140
+ echo -e "${RED}Failed to download. Check your internet connection.${NC}"
141
+ exit 1
142
+ }
143
+
144
+ echo -e "${BLUE}Extracting files...${NC}"
145
+ tar -xzf claude-all-new.tar.gz || {
146
+ echo -e "${RED}Failed to extract files.${NC}"
147
+ exit 1
148
+ }
149
+
150
+ cd Claude-All-New-main || {
151
+ echo -e "${RED}Failed to change directory.${NC}"
152
+ exit 1
153
+ }
154
+
155
+ # Choose installation directory
156
+ if [[ "$1" == "--system" ]]; then
157
+ if [[ "$PLATFORM" == "Windows" ]]; then
158
+ echo -e "${YELLOW}System-wide installation not supported on Windows${NC}"
159
+ INSTALL_DIR="$HOME/.local/bin"
160
+ else
161
+ INSTALL_DIR="/usr/local/bin"
162
+ echo -e "${BLUE}Installing system-wide to $INSTALL_DIR${NC}"
163
+ if ! sudo mkdir -p "$INSTALL_DIR" 2>/dev/null; then
164
+ echo -e "${YELLOW}Cannot write to /usr/local/bin, trying ~/.local/bin${NC}"
165
+ INSTALL_DIR="$HOME/.local/bin"
166
+ mkdir -p "$INSTALL_DIR" || {
167
+ echo -e "${RED}❌ Failed to create installation directory${NC}"
168
+ exit 1
169
+ }
170
+ fi
171
+ fi
172
+ else
173
+ INSTALL_DIR="$HOME/.local/bin"
174
+ echo -e "${BLUE}Installing to $INSTALL_DIR${NC}"
175
+ mkdir -p "$INSTALL_DIR" || {
176
+ echo -e "${RED}❌ Failed to create installation directory${NC}"
177
+ exit 1
178
+ }
179
+ fi
180
+
181
+ # Clean up existing installation before proceeding
182
+ cleanup_existing_installation "$INSTALL_DIR"
183
+
184
+ # Copy files (main script + config files)
185
+ if [[ "$INSTALL_DIR" == "/usr/local/bin" ]]; then
186
+ # Copy main claude-all script
187
+ sudo cp claude-all "$INSTALL_DIR/" 2>/dev/null || {
188
+ echo -e "${RED}Failed to copy claude-all script${NC}"
189
+ exit 1
190
+ }
191
+ sudo chmod +x "$INSTALL_DIR/claude-all" 2>/dev/null || true
192
+
193
+ # Copy config files from bin/
194
+ sudo cp -r bin/* "$INSTALL_DIR/" 2>/dev/null || {
195
+ echo -e "${RED}Failed to copy config files${NC}"
196
+ exit 1
197
+ }
198
+ sudo chmod +x "$INSTALL_DIR"/* 2>/dev/null || true
199
+ else
200
+ # Copy main claude-all script
201
+ cp claude-all "$INSTALL_DIR/" || {
202
+ echo -e "${RED}Failed to copy claude-all script${NC}"
203
+ exit 1
204
+ }
205
+ chmod +x "$INSTALL_DIR/claude-all" || true
206
+
207
+ # Copy config files from bin/
208
+ cp -r bin/* "$INSTALL_DIR/" || {
209
+ echo -e "${RED}Failed to copy config files${NC}"
210
+ exit 1
211
+ }
212
+ chmod +x "$INSTALL_DIR"/* 2>/dev/null || true
213
+
214
+ # Also copy claude-switch to main bin directory if exists
215
+ if [[ -f "$HOME/.local/bin/claude-switch" ]]; then
216
+ cp "$HOME/.local/bin/claude-switch" "$INSTALL_DIR/" 2>/dev/null || true
217
+ fi
218
+ fi
219
+
220
+ # Copy model config
221
+ if [[ -d "model" ]]; then
222
+ echo -e "${BLUE}Copying model configuration...${NC}"
223
+ mkdir -p "$INSTALL_DIR/model"
224
+ if [[ -n "$(ls -A model/ 2>/dev/null)" ]]; then
225
+ cp model/* "$INSTALL_DIR/model/" 2>/dev/null || echo -e "${YELLOW}Warning: Failed to copy model files${NC}"
226
+ echo -e "${GREEN}✓ Model config copied${NC}"
227
+ else
228
+ echo -e "${YELLOW}Warning: Model directory is empty${NC}"
229
+ fi
230
+ fi
231
+
232
+ # Copy Superpowers components (NO DUPLICATION)
233
+ if [[ -d "superpowers" ]]; then
234
+ echo -e "${BLUE}📦 Installing Superpowers components...${NC}"
235
+
236
+ # Create temporary source path
237
+ TEMP_SOURCE="/tmp/superpowers-$$"
238
+ cp -r superpowers "$TEMP_SOURCE" 2>/dev/null || {
239
+ echo -e "${YELLOW}Warning: Could not copy superpowers temporarily${NC}"
240
+ }
241
+
242
+ # Remove skills from temp (will install directly to ~/.claude/skills/)
243
+ if [[ -d "$TEMP_SOURCE/skills" ]]; then
244
+ rm -rf "$TEMP_SOURCE/skills"
245
+ fi
246
+
247
+ # Copy remaining components to install dir (without skills)
248
+ if [[ "$INSTALL_DIR" == "/usr/local/bin" ]]; then
249
+ sudo cp -r "$TEMP_SOURCE" "$INSTALL_DIR/superpowers" 2>/dev/null || {
250
+ echo -e "${YELLOW}Warning: Could not copy superpowers components${NC}"
251
+ }
252
+ else
253
+ cp -r "$TEMP_SOURCE" "$INSTALL_DIR/superpowers" 2>/dev/null || {
254
+ echo -e "${YELLOW}Warning: Could not copy superpowers components${NC}"
255
+ }
256
+ fi
257
+
258
+ # Clean up temp
259
+ rm -rf "$TEMP_SOURCE"
260
+
261
+ echo -e "${GREEN}✓ Superpowers components installed${NC}"
262
+ echo -e "${GREEN} ✅ Skills will be installed directly to ~/.claude/skills/${NC}"
263
+ echo -e "${GREEN} ✅ No duplication - single source of truth${NC}"
264
+ fi
265
+
266
+ # Verify installation success
267
+ echo -e "${BLUE}🔍 Verifying installation...${NC}"
268
+
269
+ # Check if claude-all script was copied successfully
270
+ if [[ ! -f "$INSTALL_DIR/claude-all" ]]; then
271
+ echo -e "${RED}❌ Installation failed: claude-all script not found${NC}"
272
+ exit 1
273
+ fi
274
+
275
+ # Check if claude-all is executable
276
+ if [[ ! -x "$INSTALL_DIR/claude-all" ]]; then
277
+ echo -e "${RED}❌ Installation failed: claude-all is not executable${NC}"
278
+ exit 1
279
+ fi
280
+
281
+ # Check if PATH is set correctly and add it automatically if needed
282
+ PATH_ADDED=false
283
+ PATH_ALREADY_SET=false
284
+
285
+ if echo ":$PATH:" | grep -q ":$INSTALL_DIR:"; then
286
+ PATH_ALREADY_SET=true
287
+ echo -e "${GREEN}✓ PATH already configured${NC}"
288
+ else
289
+ echo -e "${YELLOW}⚙️ Configuring PATH automatically...${NC}"
290
+
291
+ # Detect shell and configuration file
292
+ if [[ -n "$BASH_VERSION" ]]; then
293
+ SHELL_CONF="$HOME/.bashrc"
294
+ if [[ "$PLATFORM" == "Darwin" ]] && [[ -f "$HOME/.zshrc" ]]; then
295
+ SHELL_CONF="$HOME/.zshrc"
296
+ fi
297
+ elif [[ -n "$ZSH_VERSION" ]]; then
298
+ SHELL_CONF="$HOME/.zshrc"
299
+ else
300
+ SHELL_CONF="$HOME/.profile"
301
+ fi
302
+
303
+ # Add PATH to shell configuration
304
+ if echo "export PATH=\"$INSTALL_DIR:\$PATH\"" >> "$SHELL_CONF" 2>/dev/null; then
305
+ echo -e "${GREEN}✓ Added PATH to $SHELL_CONF${NC}"
306
+ PATH_ADDED=true
307
+ else
308
+ echo -e "${YELLOW}⚠️ Could not modify $SHELL_CONF automatically${NC}"
309
+ PATH_ADDED=false
310
+ fi
311
+ fi
312
+
313
+ # Test claude-all command
314
+ if command -v claude-all &> /dev/null; then
315
+ echo -e "${GREEN}✓ claude-all command is working!${NC}"
316
+ COMMAND_WORKS=true
317
+ else
318
+ echo -e "${YELLOW}⚠️ claude-all command not found in current session${NC}"
319
+ COMMAND_WORKS=false
320
+ fi
321
+
322
+ # Install Superpowers for Claude - AUTOMATIC INTEGRATION
323
+ echo ""
324
+ echo -e "${BLUE}🔗 Integrating Superpowers with Claude...${NC}"
325
+
326
+ # Create Claude directories
327
+ CLAUDE_DIR="$HOME/.claude"
328
+ CLAUDE_PLUGINS_DIR="$CLAUDE_DIR/plugins"
329
+ mkdir -p "$CLAUDE_PLUGINS_DIR"
330
+ mkdir -p "$CLAUDE_DIR/agents"
331
+ mkdir -p "$CLAUDE_DIR/commands"
332
+ mkdir -p "$CLAUDE_DIR/hooks"
333
+ mkdir -p "$CLAUDE_DIR/lib"
334
+ mkdir -p "$CLAUDE_DIR/skills"
335
+
336
+ # Check for local copy first
337
+ SUPERPOWERS_SOURCE=""
338
+ if [[ -d "$INSTALL_DIR/superpowers" ]]; then
339
+ SUPERPOWERS_SOURCE="$INSTALL_DIR/superpowers"
340
+ echo -e "${GREEN}✓ Found bundled Superpowers library${NC}"
341
+ elif [[ -d "$INSTALL_DIR/../superpowers" ]]; then
342
+ SUPERPOWERS_SOURCE="$INSTALL_DIR/../superpowers"
343
+ echo -e "${GREEN}✓ Found local Superpowers library${NC}"
344
+ fi
345
+
346
+ if [[ -n "$SUPERPOWERS_SOURCE" ]]; then
347
+ # Install from local source (FASTEST)
348
+ echo -e "${BLUE}🚀 Installing from local copy...${NC}"
349
+
350
+ # Copy components to plugins directory (without skills)
351
+ mkdir -p "$HOME/.claude/plugins/superpowers"
352
+
353
+ # Copy everything except skills
354
+ for item in "$SUPERPOWERS_SOURCE"/*; do
355
+ item_name=$(basename "$item")
356
+ if [[ "$item_name" != "skills" ]]; then
357
+ cp -r "$item" "$HOME/.claude/plugins/superpowers/" 2>/dev/null || true
358
+ fi
359
+ done
360
+
361
+ # Copy skills directly to ~/.claude/skills/
362
+ if [[ -d "$SUPERPOWERS_SOURCE/skills" ]]; then
363
+ cp -r "$SUPERPOWERS_SOURCE/skills"/* "$CLAUDE_DIR/skills/" 2>/dev/null || true
364
+ echo -e "${GREEN}✓ Skills installed to ~/.claude/skills/${NC}"
365
+ fi
366
+
367
+ SUPERPOWERS_DIR="$HOME/.claude/plugins/superpowers"
368
+ echo -e "${GREEN}✓ Local copy installed${NC}"
369
+ elif command -v git &> /dev/null; then
370
+ # Download from GitHub as fallback
371
+ echo -e "${YELLOW}⬇️ Downloading from GitHub...${NC}"
372
+ if [[ -d "$HOME/.claude/plugins/superpowers" ]]; then
373
+ echo "Updating Superpowers..."
374
+ (cd "$HOME/.claude/plugins/superpowers" && git pull) || echo -e "${YELLOW}Warning: Could not update${NC}"
375
+ else
376
+ echo "Downloading Superpowers..."
377
+ git clone https://github.com/obra/superpowers.git "$HOME/.claude/plugins/superpowers" || echo -e "${YELLOW}Warning: Could not download${NC}"
378
+ fi
379
+
380
+ # Move skills from plugins to skills directory
381
+ if [[ -d "$HOME/.claude/plugins/superpowers/skills" ]]; then
382
+ mv "$HOME/.claude/plugins/superpowers/skills"/* "$CLAUDE_DIR/skills/" 2>/dev/null || true
383
+ rm -rf "$HOME/.claude/plugins/superpowers/skills"
384
+ echo -e "${GREEN}✓ Skills moved to ~/.claude/skills/${NC}"
385
+ fi
386
+
387
+ SUPERPOWERS_DIR="$HOME/.claude/plugins/superpowers"
388
+
389
+ # Install as Claude plugin
390
+ if [[ -d "$SUPERPOWERS_DIR" ]]; then
391
+ echo "Installing as Claude plugin..."
392
+
393
+ # Copy plugin configuration
394
+ if [[ -f "$SUPERPOWERS_DIR/.claude-plugin/plugin.json" ]]; then
395
+ cp "$SUPERPOWERS_DIR/.claude-plugin/plugin.json" "$CLAUDE_PLUGINS_DIR/"
396
+ fi
397
+
398
+ # Copy marketplace configuration
399
+ if [[ -f "$SUPERPOWERS_DIR/.claude-plugin/marketplace.json" ]]; then
400
+ cp "$SUPERPOWERS_DIR/.claude-plugin/marketplace.json" "$CLAUDE_PLUGINS_DIR/"
401
+ fi
402
+
403
+ # Copy agents
404
+ if [[ -d "$SUPERPOWERS_DIR/agents" ]]; then
405
+ cp -r "$SUPERPOWERS_DIR/agents/"* "$CLAUDE_DIR/agents/" 2>/dev/null || true
406
+ echo -e "${GREEN}✓ Agents installed${NC}"
407
+ fi
408
+
409
+ # Copy commands
410
+ if [[ -d "$SUPERPOWERS_DIR/commands" ]]; then
411
+ cp -r "$SUPERPOWERS_DIR/commands/"* "$CLAUDE_DIR/commands/" 2>/dev/null || true
412
+ echo -e "${GREEN}✓ Commands installed${NC}"
413
+ fi
414
+
415
+ # Copy hooks
416
+ if [[ -d "$SUPERPOWERS_DIR/hooks" ]]; then
417
+ cp -r "$SUPERPOWERS_DIR/hooks/"* "$CLAUDE_DIR/hooks/" 2>/dev/null || true
418
+ echo -e "${GREEN}✓ Hooks installed${NC}"
419
+ fi
420
+
421
+ # Copy library
422
+ if [[ -d "$SUPERPOWERS_DIR/lib" ]]; then
423
+ cp -r "$SUPERPOWERS_DIR/lib/"* "$CLAUDE_DIR/lib/" 2>/dev/null || true
424
+ echo -e "${GREEN}✓ Library files installed${NC}"
425
+ fi
426
+
427
+ # Skills are already copied directly to ~/.claude/skills/
428
+ skill_count=$(find "$CLAUDE_DIR/skills" -maxdepth 1 -type d 2>/dev/null | wc -l)
429
+ skill_count=$((skill_count - 1)) # Subtract parent directory
430
+ echo -e "${GREEN}✓ Skills installed directly: $skill_count skills${NC}"
431
+ echo -e "${BLUE} Skills location: ~/.claude/skills/${NC}"
432
+
433
+ # Create marketplace entry for easy installation
434
+ mkdir -p "$CLAUDE_PLUGINS_DIR/marketplaces"
435
+ cat > "$CLAUDE_PLUGINS_DIR/marketplaces/superpowers.json" << 'EOF'
436
+ {
437
+ "name": "superpowers-marketplace",
438
+ "url": "file:///data/data/com.termux/files/home/.claude/plugins/superpowers/.claude-plugin"
439
+ }
440
+ EOF
441
+
442
+ echo ""
443
+ echo -e "${GREEN}✅ Superpowers installed successfully!${NC}"
444
+ echo ""
445
+ echo -e "${BLUE}Available commands in Claude:${NC}"
446
+ echo " /superpowers:brainstorm - Design refinement"
447
+ echo " /superpowers:write-plan - Create implementation plan"
448
+ echo " /superpowers:execute-plan - Execute plan in batches"
449
+ fi
450
+ else
451
+ echo -e "${YELLOW}⚠️ Git not found. Skipping Superpowers installation.${NC}"
452
+ echo -e "${YELLOW} To install manually: git clone https://github.com/obra/superpowers.git ~/.claude/plugins/superpowers${NC}"
453
+ fi
454
+
455
+ echo ""
456
+ echo -e "${GREEN}🎉 Installation complete!${NC}"
457
+ echo ""
458
+ echo -e "${BLUE}Platform:${NC} $PLATFORM"
459
+ echo -e "${BLUE}Install Dir:${NC} $INSTALL_DIR"
460
+ echo ""
461
+
462
+ # Status indicators
463
+ if [[ "$PATH_ALREADY_SET" == "true" && "$COMMAND_WORKS" == "true" ]]; then
464
+ echo -e "${GREEN}🚀 Ready to use! Run: claude-all${NC}"
465
+ READY_TO_USE=true
466
+ elif [[ "$PATH_ADDED" == "true" || "$PATH_ALREADY_SET" == "true" ]]; then
467
+ if [[ "$COMMAND_WORKS" == "false" ]]; then
468
+ echo -e "${YELLOW}⚠️ PATH is configured but current session needs reload${NC}"
469
+ echo -e "${BLUE}Run: source ~/.bashrc && claude-all${NC}"
470
+ READY_TO_USE=false
471
+ fi
472
+ else
473
+ echo -e "${YELLOW}⚠️ Manual PATH configuration may be needed${NC}"
474
+ echo -e "${BLUE}Run: export PATH=\"$INSTALL_DIR:\$PATH\" && claude-all${NC}"
475
+ READY_TO_USE=false
476
+ fi
477
+
478
+ echo ""
479
+ echo -e "${BLUE}Next steps:${NC}"
480
+ echo "1. 🔑 Get your API keys:"
481
+ echo " • GLM: https://open.bigmodel.cn/usercenter/apikeys"
482
+ echo " • MiniMax: https://platform.minimax.io/"
483
+ echo " • OpenAI: https://platform.openai.com/api-keys"
484
+ echo " • Gemini: https://aistudio.google.com/app/apikey"
485
+ echo " • Perplexity: https://console.perplexity.ai/"
486
+ echo ""
487
+ echo "2. 💾 Save API keys:"
488
+ echo " claude-all"
489
+ echo " # Choose: 10) 🔑 API Key Manager"
490
+ echo ""
491
+ echo "3. 🚀 Start chatting:"
492
+ echo " claude-all 7 # For GLM"
493
+ echo " claude-all 1 # For MiniMax"
494
+ echo " claude-all 11 # Custom (e.g., perplexity/sonar-pro)"
495
+ echo ""
496
+ echo "4. 🎯 Superpowers Skills (INSTALLED):"
497
+ echo -e "${GREEN} ✅ 55+ files copied to ~/.claude/plugins/superpowers/${NC}"
498
+ echo -e "${GREEN} ✅ 20 development skills linked${NC}"
499
+ echo -e "${GREEN} ✅ Commands, agents, hooks integrated${NC}"
500
+ echo ""
501
+ echo "5. 💡 Use Superpowers in Claude:"
502
+ echo " claude"
503
+ echo " /superpowers:brainstorm # Refine your ideas"
504
+ echo " /superpowers:write-plan # Create implementation plan"
505
+ echo " /superpowers:execute-plan # Execute step-by-step"
506
+ echo ""
507
+ echo "6. 📚 Skills location:"
508
+ echo " ~/.claude/skills/ # 20 skills available"
509
+ echo " ~/.claude/commands/ # Core commands"
510
+ echo " ~/.claude/agents/ # Code reviewer"
511
+ echo " ~/.claude/hooks/ # Workflow automation"
512
+ echo ""
513
+
514
+ # Show backup information if backups were created
515
+ if ls "$INSTALL_DIR"/*.backup 2>/dev/null | head -1 >/dev/null; then
516
+ echo -e "${BLUE}📋 Backups created of existing configurations:${NC}"
517
+ ls "$INSTALL_DIR"/*.backup 2>/dev/null | while read backup; do
518
+ echo " $(basename "$backup" .backup)"
519
+ done
520
+ echo ""
521
+ fi
522
+ echo -e "${BLUE}📚 Documentation:${NC}"
523
+ echo " https://github.com/zesbe/Claude-All-New"
524
+ echo ""
525
+ echo -e "${GREEN}Happy Chatting! 🚀${NC}"