claude-all-config 3.5.7 → 3.5.9

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/README.md CHANGED
@@ -18,17 +18,36 @@ The most comprehensive AI agent configuration system with features **beyond skil
18
18
 
19
19
  ## ⚡ Quick Install
20
20
 
21
+ > **Prereq:** install Claude Code first using the [official native installer](https://code.claude.com/docs/en/setup) (recommended, auto-updates):
22
+ > ```bash
23
+ > # macOS / Linux / WSL
24
+ > curl -fsSL https://claude.ai/install.sh | bash
25
+ >
26
+ > # Windows (PowerShell)
27
+ > irm https://claude.ai/install.ps1 | iex
28
+ > ```
29
+
30
+ Then install ClaudeAll:
31
+
21
32
  ```bash
22
- # npm (Recommended)
33
+ # npm (Recommended — works everywhere)
23
34
  npm install -g claude-all-config
24
35
 
25
- # curl
36
+ # curl one-liner (requires the GitHub repo to be public)
26
37
  curl -fsSL https://raw.githubusercontent.com/zesbe/ClaudeAll/main/install.sh | bash
27
38
  ```
28
39
 
29
- **Termux Android:**
40
+ After install, ClaudeAll's `claude-all` binary is symlinked into `~/.local/bin/`
41
+ so it sits next to the native `claude` binary. Make sure `~/.local/bin` is on your PATH:
42
+
43
+ ```bash
44
+ export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc or ~/.zshrc
45
+ ```
46
+
47
+ **Termux / Android** (native installer not yet supported on Android):
30
48
  ```bash
31
49
  pkg install nodejs-lts git
50
+ npm install -g @anthropic-ai/claude-code # legacy npm install (only Termux needs this)
32
51
  npm install -g claude-all-config
33
52
  ```
34
53
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 3.5.7
1
+ 3.5.9
package/install-termux.sh CHANGED
@@ -28,11 +28,15 @@ echo "✅ npm $(npm --version)"
28
28
  echo ""
29
29
 
30
30
  # Install Claude CLI if not present
31
+ # NOTE: Termux/Android does not support the native installer (https://claude.ai/install.sh)
32
+ # because the native binary is built for Linux x86_64 / macOS / Windows only.
33
+ # So on Termux we still use npm install. Once Anthropic ships ARM/Android builds,
34
+ # this should be migrated to: curl -fsSL https://claude.ai/install.sh | bash
31
35
  if ! command -v claude &> /dev/null; then
32
- echo "📥 Installing Claude CLI..."
36
+ echo "📥 Installing Claude CLI (npm — Termux fallback)..."
33
37
  npm install -g @anthropic-ai/claude-code
34
38
  fi
35
- echo "✅ Claude CLI installed"
39
+ echo "✅ Claude CLI installed at: $(command -v claude)"
36
40
 
37
41
  # Install Gemini CLI if not present (optional)
38
42
  if ! command -v gemini &> /dev/null; then
@@ -57,10 +57,37 @@ echo ""
57
57
 
58
58
  # Install Claude CLI
59
59
  if ! command -v claude &> /dev/null; then
60
- echo "📥 Installing Claude CLI..."
61
- npm install -g @anthropic-ai/claude-code
60
+ echo "📥 Installing Claude CLI (native installer)..."
61
+ case $PLATFORM in
62
+ linux|macos)
63
+ # Native installer (recommended) - puts binary in ~/.local/bin/
64
+ if curl -fsSL https://claude.ai/install.sh | bash; then
65
+ echo "✅ Claude CLI installed via native installer"
66
+ # Ensure ~/.local/bin is in PATH for current session
67
+ export PATH="$HOME/.local/bin:$PATH"
68
+ else
69
+ echo "⚠️ Native installer failed, falling back to npm..."
70
+ npm install -g @anthropic-ai/claude-code
71
+ fi
72
+ ;;
73
+ termux)
74
+ # Termux/Android: native binary not supported, use npm
75
+ echo "ℹ️ Termux detected, using npm (native installer not supported)"
76
+ npm install -g @anthropic-ai/claude-code
77
+ ;;
78
+ windows)
79
+ # Windows under msys/cygwin - prefer native PowerShell installer if possible
80
+ echo "ℹ️ For Windows native install, run in PowerShell:"
81
+ echo " irm https://claude.ai/install.ps1 | iex"
82
+ echo " Falling back to npm for this session..."
83
+ npm install -g @anthropic-ai/claude-code
84
+ ;;
85
+ *)
86
+ npm install -g @anthropic-ai/claude-code
87
+ ;;
88
+ esac
62
89
  else
63
- echo "✅ Claude CLI already installed"
90
+ echo "✅ Claude CLI already installed ($(command -v claude))"
64
91
  fi
65
92
 
66
93
  # Install ClaudeAll config
package/install.sh CHANGED
@@ -47,8 +47,16 @@ if [ "$HAS_CLAUDE" = false ] && [ "$HAS_GEMINI" = false ]; then
47
47
  echo -e "${RED}❌ No CLI detected!${NC}"
48
48
  echo ""
49
49
  echo "Install at least one:"
50
- echo " npm install -g @anthropic-ai/claude-code"
51
- echo " npm install -g @google/gemini-cli"
50
+ echo ""
51
+ echo " Claude Code (recommended - native installer, auto-updates):"
52
+ echo " macOS/Linux/WSL: curl -fsSL https://claude.ai/install.sh | bash"
53
+ echo " Windows PS: irm https://claude.ai/install.ps1 | iex"
54
+ echo ""
55
+ echo " Gemini CLI:"
56
+ echo " npm install -g @google/gemini-cli"
57
+ echo ""
58
+ echo " (Termux/Android only, native installer not yet supported):"
59
+ echo " npm install -g @anthropic-ai/claude-code"
52
60
  exit 1
53
61
  fi
54
62
  echo ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-all-config",
3
- "version": "3.5.7",
3
+ "version": "3.5.9",
4
4
  "description": "🦾 MONSTER ENGINEER v2 - Ultimate AI CLI with 63 Skills, 12 Superpowers, 14 Agents. Multi-Agent Orchestration, Cost-Aware, Security Scorecard, Parallel-First.",
5
5
  "main": "index.js",
6
6
  "bin": {
package/postinstall.js CHANGED
@@ -33,32 +33,54 @@ if (!hasClaude && !hasGemini) {
33
33
  }
34
34
  console.log('');
35
35
 
36
- // Copy function
36
+ // Copy function — resilient: skip files that can't be copied (e.g., EACCES from
37
+ // previous sudo install) instead of crashing the whole postinstall.
37
38
  function copyDir(src, dest) {
38
39
  if (!fs.existsSync(src)) return 0;
39
40
 
40
- if (!fs.existsSync(dest)) {
41
- fs.mkdirSync(dest, { recursive: true });
41
+ try {
42
+ if (!fs.existsSync(dest)) {
43
+ fs.mkdirSync(dest, { recursive: true });
44
+ }
45
+ } catch (e) {
46
+ return 0;
42
47
  }
43
48
 
44
- const files = fs.readdirSync(src);
49
+ let files;
50
+ try { files = fs.readdirSync(src); } catch { return 0; }
45
51
  let count = 0;
52
+ let skipped = 0;
46
53
 
47
54
  files.forEach(file => {
48
55
  const srcPath = path.join(src, file);
49
56
  const destPath = path.join(dest, file);
50
57
 
51
- if (fs.statSync(srcPath).isDirectory()) {
52
- if (!fs.existsSync(destPath)) {
53
- fs.mkdirSync(destPath, { recursive: true });
54
- }
58
+ let stat;
59
+ try { stat = fs.statSync(srcPath); } catch { return; }
60
+
61
+ if (stat.isDirectory()) {
62
+ try {
63
+ if (!fs.existsSync(destPath)) {
64
+ fs.mkdirSync(destPath, { recursive: true });
65
+ }
66
+ } catch { skipped++; return; }
55
67
  count += copyDir(srcPath, destPath);
56
68
  } else {
57
- fs.copyFileSync(srcPath, destPath);
58
- count++;
69
+ try {
70
+ fs.copyFileSync(srcPath, destPath);
71
+ count++;
72
+ } catch (e) {
73
+ // EACCES from a prior root-owned copy, EBUSY, etc — skip and continue
74
+ skipped++;
75
+ }
59
76
  }
60
77
  });
61
78
 
79
+ if (skipped > 0) {
80
+ // Surface a hint without aborting; user can sudo chown -R if they really want everything fresh
81
+ process.env._CA_COPY_SKIPS = String(Number(process.env._CA_COPY_SKIPS || 0) + skipped);
82
+ }
83
+
62
84
  return count;
63
85
  }
64
86
 
@@ -103,9 +125,13 @@ function installClaude() {
103
125
  const mcpSrc = path.join(PKG_DIR, 'mcp.json');
104
126
  const mcpDest = path.join(HOME, '.mcp.json');
105
127
  if (fs.existsSync(mcpSrc)) {
106
- fs.copyFileSync(mcpSrc, mcpDest);
107
- fs.chmodSync(mcpDest, 0o600);
108
- console.log(` 🔧 MCP config (7 servers)`);
128
+ try {
129
+ fs.copyFileSync(mcpSrc, mcpDest);
130
+ try { fs.chmodSync(mcpDest, 0o600); } catch {}
131
+ console.log(` 🔧 MCP config (7 servers)`);
132
+ } catch (e) {
133
+ console.log(` ⚠️ MCP config skipped (${e.code || 'error'}): ${mcpDest}`);
134
+ }
109
135
  }
110
136
 
111
137
  // Settings - create both settings.json AND settings.local.json
@@ -122,20 +148,31 @@ function installClaude() {
122
148
 
123
149
  // Write settings.json (main config - Claude reads this)
124
150
  const settingsJsonPath = path.join(CLAUDE_DIR, 'settings.json');
125
- fs.writeFileSync(settingsJsonPath, JSON.stringify(settings, null, 2));
151
+ try {
152
+ fs.writeFileSync(settingsJsonPath, JSON.stringify(settings, null, 2));
153
+ } catch (e) {
154
+ console.log(` ⚠️ settings.json skipped (${e.code || 'error'}) — try: sudo chown -R $USER ~/.claude`);
155
+ }
126
156
 
127
157
  // Write settings.local.json (backup/local overrides)
128
158
  const settingsLocalPath = path.join(CLAUDE_DIR, 'settings.local.json');
129
- fs.writeFileSync(settingsLocalPath, JSON.stringify(settings, null, 2));
130
-
131
- console.log(` ⚙️ settings.json + settings.local.json (@proactive-mode enabled)`);
159
+ try {
160
+ fs.writeFileSync(settingsLocalPath, JSON.stringify(settings, null, 2));
161
+ console.log(` ⚙️ settings.json + settings.local.json (@proactive-mode enabled)`);
162
+ } catch (e) {
163
+ console.log(` ⚠️ settings.local.json skipped (${e.code || 'error'})`);
164
+ }
132
165
 
133
166
  // Copy CLAUDE.md (global instructions)
134
167
  const claudeMdSrc = path.join(PKG_DIR, 'CLAUDE.md');
135
168
  const claudeMdDest = path.join(CLAUDE_DIR, 'CLAUDE.md');
136
169
  if (fs.existsSync(claudeMdSrc)) {
137
- fs.copyFileSync(claudeMdSrc, claudeMdDest);
138
- console.log(` 📋 CLAUDE.md (global instructions)`);
170
+ try {
171
+ fs.copyFileSync(claudeMdSrc, claudeMdDest);
172
+ console.log(` 📋 CLAUDE.md (global instructions)`);
173
+ } catch (e) {
174
+ console.log(` ⚠️ CLAUDE.md skipped (${e.code || 'error'})`);
175
+ }
139
176
  }
140
177
  }
141
178
 
@@ -266,6 +303,66 @@ function installUvx() {
266
303
  }
267
304
  }
268
305
 
306
+ // Symlink ClaudeAll binaries to ~/.local/bin/ for unified path with native Claude install.
307
+ // As of Claude Code v2.x, the native installer puts `claude` at ~/.local/bin/claude.
308
+ // We mirror that convention so `claude-all` lives in the same directory and shows up
309
+ // on PATH without needing the npm-global bin directory.
310
+ function setupLocalBinSymlinks() {
311
+ // Skip on Windows native (no POSIX symlinks). WSL/MSYS still works because HOME is set.
312
+ if (process.platform === 'win32' && !process.env.MSYSTEM && !process.env.WSL_DISTRO_NAME) {
313
+ return;
314
+ }
315
+ if (!HOME) return;
316
+
317
+ const localBin = path.join(HOME, '.local', 'bin');
318
+ try {
319
+ fs.mkdirSync(localBin, { recursive: true });
320
+ } catch (e) {
321
+ // Cannot create ~/.local/bin (read-only HOME, etc) — silently skip
322
+ return;
323
+ }
324
+
325
+ // Map of binary name -> path inside this package
326
+ const bins = {
327
+ 'claude-all': path.join(PKG_DIR, 'claude-all'),
328
+ 'claude-all-skills': path.join(PKG_DIR, 'bin', 'skills-cli.js'),
329
+ 'claude-all-mcp': path.join(PKG_DIR, 'bin', 'mcp-install.js'),
330
+ 'claude-all-update': path.join(PKG_DIR, 'update.sh'),
331
+ };
332
+
333
+ let created = 0;
334
+ for (const [name, target] of Object.entries(bins)) {
335
+ if (!fs.existsSync(target)) continue;
336
+ const linkPath = path.join(localBin, name);
337
+ try {
338
+ // Replace any stale symlink/file pointing somewhere else
339
+ if (fs.existsSync(linkPath) || fs.lstatSync(linkPath, { throwIfNoEntry: false })) {
340
+ fs.unlinkSync(linkPath);
341
+ }
342
+ } catch {}
343
+ try {
344
+ fs.symlinkSync(target, linkPath);
345
+ try { fs.chmodSync(target, 0o755); } catch {}
346
+ created++;
347
+ } catch (e) {
348
+ // Symlink creation failed (e.g., cross-device link) — silently skip
349
+ }
350
+ }
351
+
352
+ if (created > 0) {
353
+ console.log(` 🔗 Linked ${created} binaries → ~/.local/bin/ (unified path with native Claude)`);
354
+
355
+ // Hint if ~/.local/bin not on PATH
356
+ const pathParts = (process.env.PATH || '').split(path.delimiter);
357
+ if (!pathParts.includes(localBin)) {
358
+ console.log('');
359
+ console.log(' ⚠️ ~/.local/bin is not in your PATH.');
360
+ console.log(' Add to your shell config (~/.bashrc, ~/.zshrc):');
361
+ console.log(' export PATH="$HOME/.local/bin:$PATH"');
362
+ }
363
+ }
364
+ }
365
+
269
366
  // Run installations
270
367
  installUvx();
271
368
 
@@ -278,6 +375,16 @@ if (hasGemini) {
278
375
  installGemini();
279
376
  }
280
377
 
378
+ setupLocalBinSymlinks();
379
+
380
+ const skips = Number(process.env._CA_COPY_SKIPS || 0);
381
+ if (skips > 0) {
382
+ console.log('');
383
+ console.log(`⚠️ ${skips} files were skipped (likely owned by root from a prior sudo install).`);
384
+ console.log(' To force-refresh everything, run:');
385
+ console.log(' sudo chown -R $USER ~/.claude ~/.gemini 2>/dev/null && npm install -g claude-all-config');
386
+ }
387
+
281
388
  console.log('\n✅ Installation complete!\n');
282
389
 
283
390
  if (hasClaude) {