claude-all-config 3.7.1 → 3.7.2
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/VERSION +1 -1
- package/gemini +74 -0
- package/package.json +2 -1
- package/postinstall.js +24 -2
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.7.
|
|
1
|
+
3.7.2
|
package/gemini
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# gemini — ClaudeAll shim that:
|
|
4
|
+
# 1. Sources ~/.gemini/.env (and ~/.claude/.env as fallback) so MCP servers
|
|
5
|
+
# see CONTEXT7_API_KEY / EXA_API_KEY / Z_AI_API_KEY / TELEGRAM_* / etc.
|
|
6
|
+
# 2. Auto-prepends --yolo (-y) to make Gemini autonomous by default.
|
|
7
|
+
# 3. Forwards all args to the REAL gemini binary further down PATH.
|
|
8
|
+
#
|
|
9
|
+
# Opt out of YOLO for a single run:
|
|
10
|
+
# gemini --no-yolo ...
|
|
11
|
+
# GEMINI_NO_YOLO=1 gemini ...
|
|
12
|
+
#
|
|
13
|
+
# Bypass this shim entirely:
|
|
14
|
+
# command -v gemini -a # see all gemini binaries
|
|
15
|
+
# /usr/local/bin/gemini ... # call the real one directly
|
|
16
|
+
|
|
17
|
+
set -u
|
|
18
|
+
|
|
19
|
+
# ─── Source env files (most-specific first) ───────────────────────────────
|
|
20
|
+
load_env() {
|
|
21
|
+
local f="$1"
|
|
22
|
+
if [ -f "$f" ]; then
|
|
23
|
+
set -a
|
|
24
|
+
# shellcheck disable=SC1090
|
|
25
|
+
. "$f" 2>/dev/null || true
|
|
26
|
+
set +a
|
|
27
|
+
fi
|
|
28
|
+
}
|
|
29
|
+
load_env "$HOME/.claude/.env"
|
|
30
|
+
load_env "$HOME/.gemini/.env"
|
|
31
|
+
|
|
32
|
+
# ─── Find the REAL gemini binary (skip ourselves) ─────────────────────────
|
|
33
|
+
SELF="$(readlink -f "$0" 2>/dev/null || realpath "$0" 2>/dev/null || echo "$0")"
|
|
34
|
+
|
|
35
|
+
REAL_GEMINI=""
|
|
36
|
+
# Walk PATH manually, skipping the shim itself
|
|
37
|
+
IFS=':' read -ra DIRS <<< "$PATH"
|
|
38
|
+
for dir in "${DIRS[@]}"; do
|
|
39
|
+
candidate="$dir/gemini"
|
|
40
|
+
[ -x "$candidate" ] || continue
|
|
41
|
+
candidate_real="$(readlink -f "$candidate" 2>/dev/null || realpath "$candidate" 2>/dev/null || echo "$candidate")"
|
|
42
|
+
# Skip if this is the shim itself
|
|
43
|
+
if [ "$candidate_real" = "$SELF" ]; then
|
|
44
|
+
continue
|
|
45
|
+
fi
|
|
46
|
+
REAL_GEMINI="$candidate"
|
|
47
|
+
break
|
|
48
|
+
done
|
|
49
|
+
|
|
50
|
+
if [ -z "$REAL_GEMINI" ]; then
|
|
51
|
+
echo "❌ ClaudeAll gemini shim: real gemini binary not found in PATH." >&2
|
|
52
|
+
echo " Install: npm install -g @google/gemini-cli" >&2
|
|
53
|
+
echo " (After install, this shim will auto-locate it.)" >&2
|
|
54
|
+
exit 127
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# ─── Decide YOLO flag ─────────────────────────────────────────────────────
|
|
58
|
+
USE_YOLO=1
|
|
59
|
+
ARGS=()
|
|
60
|
+
for a in "$@"; do
|
|
61
|
+
case "$a" in
|
|
62
|
+
--no-yolo) USE_YOLO=0 ;;
|
|
63
|
+
-y|--yolo) USE_YOLO=1 ;;
|
|
64
|
+
*) ARGS+=("$a") ;;
|
|
65
|
+
esac
|
|
66
|
+
done
|
|
67
|
+
[ -n "${GEMINI_NO_YOLO:-}" ] && USE_YOLO=0
|
|
68
|
+
|
|
69
|
+
# ─── Exec real gemini ─────────────────────────────────────────────────────
|
|
70
|
+
if [ "$USE_YOLO" = "1" ]; then
|
|
71
|
+
exec "$REAL_GEMINI" --yolo "${ARGS[@]}"
|
|
72
|
+
else
|
|
73
|
+
exec "$REAL_GEMINI" "${ARGS[@]}"
|
|
74
|
+
fi
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-all-config",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.2",
|
|
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": {
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"CLAUDE.md",
|
|
89
89
|
"claude-all",
|
|
90
90
|
"gemini-all",
|
|
91
|
+
"gemini",
|
|
91
92
|
"install.sh",
|
|
92
93
|
"install-termux.sh",
|
|
93
94
|
"install-universal.sh",
|
package/postinstall.js
CHANGED
|
@@ -396,18 +396,40 @@ function setupLocalBinSymlinks() {
|
|
|
396
396
|
'claude-all-mcp': path.join(PKG_DIR, 'bin', 'mcp-install.js'),
|
|
397
397
|
'claude-all-update': path.join(PKG_DIR, 'update.sh'),
|
|
398
398
|
'gemini-all': path.join(PKG_DIR, 'gemini-all'),
|
|
399
|
+
// 'gemini' shim shadows the real `gemini` binary so plain `gemini` runs
|
|
400
|
+
// in YOLO mode by default with .env loaded. Opt out with --no-yolo.
|
|
401
|
+
'gemini': path.join(PKG_DIR, 'gemini'),
|
|
399
402
|
};
|
|
400
403
|
|
|
401
404
|
let created = 0;
|
|
402
405
|
for (const [name, target] of Object.entries(bins)) {
|
|
403
406
|
if (!fs.existsSync(target)) continue;
|
|
404
407
|
const linkPath = path.join(localBin, name);
|
|
408
|
+
|
|
409
|
+
// Safety: don't overwrite a real binary that belongs to a different
|
|
410
|
+
// package. If linkPath exists and is NOT pointing to our package, skip.
|
|
405
411
|
try {
|
|
406
|
-
|
|
407
|
-
if (
|
|
412
|
+
const lst = fs.lstatSync(linkPath, { throwIfNoEntry: false });
|
|
413
|
+
if (lst) {
|
|
414
|
+
if (lst.isSymbolicLink()) {
|
|
415
|
+
const resolved = fs.realpathSync(linkPath);
|
|
416
|
+
if (!resolved.startsWith(PKG_DIR)) {
|
|
417
|
+
// Symlink points elsewhere — could be a different version of the
|
|
418
|
+
// real binary (e.g., the actual @google/gemini-cli installed via
|
|
419
|
+
// the same prefix). Leave it alone.
|
|
420
|
+
console.log(` ⏭ ${name}: ~/.local/bin/${name} already points to ${resolved}, skipping shim install.`);
|
|
421
|
+
continue;
|
|
422
|
+
}
|
|
423
|
+
} else if (lst.isFile()) {
|
|
424
|
+
// Real file (not a symlink). Almost certainly a different package.
|
|
425
|
+
console.log(` ⏭ ${name}: ~/.local/bin/${name} is a real file (not our symlink), skipping.`);
|
|
426
|
+
continue;
|
|
427
|
+
}
|
|
428
|
+
// Otherwise (our own stale symlink), unlink and recreate.
|
|
408
429
|
fs.unlinkSync(linkPath);
|
|
409
430
|
}
|
|
410
431
|
} catch {}
|
|
432
|
+
|
|
411
433
|
try {
|
|
412
434
|
fs.symlinkSync(target, linkPath);
|
|
413
435
|
try { fs.chmodSync(target, 0o755); } catch {}
|