-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·971 lines (868 loc) · 37.4 KB
/
install.sh
File metadata and controls
executable file
·971 lines (868 loc) · 37.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
#!/usr/bin/env bash
set -euo pipefail
# Upgraded OpenCode Stack Installer
# PURELY ADDITIVE — überschreibt NIEMALS bestehende Configs
# Usage: ./install.sh [--dry-run] [--skip-bun]
# ===== BANNED PLUGIN GUARD =====
# Diese Plugins bündeln Zod v4 und verursachen TypeError: n._zod.def Crash.
# NIEMALS installieren! Siehe banned.md + Issue #68.
BANNED_PLUGINS=("oh-my-opencode" "oh-my-openagent" "opencode-antigravity-auth" "opencode-openrouter-auth" "opencode-qwen-auth" "opencode-modal-pool-auth")
BANNED_FILES=("oh-my-opencode.json" "oh-my-openagent.json" "oh-my-sin.json")
for pkg in "${BANNED_PLUGINS[@]}"; do
if npm ls -g "$pkg" 2>/dev/null | grep -q "$pkg" || bun pm ls -g 2>/dev/null | grep -q "$pkg"; then
echo "🚫 BANNED PLUGIN DETECTED: $pkg"
echo " Dieses Plugin bündelt Zod v4 und zerstört OpenCode."
echo " Entfernen: npm uninstall -g $pkg && bun remove -g $pkg"
echo " Details: banned.md + Issue #68"
exit 1
fi
done
for f in "${BANNED_FILES[@]}"; do
if [ -f "$HOME/.config/opencode/$f" ] || [ -f "$OPENCODE_DIR/$f" ]; then
echo "🚫 BANNED FILE DETECTED: $f"
echo " Diese Datei enthält Zod v4 Referenzen."
echo " Löschen: rm $HOME/.config/opencode/$f"
echo " Details: banned.md + Issue #68"
exit 1
fi
done
# ===== END BANNED GUARD =====
DRY_RUN=false
SKIP_BUN=false
OPENCODE_DIR="$HOME/.config/opencode"
BIN_DIR="$HOME/.local/bin"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REQUIRED_OPENCODE_VERSION="${REQUIRED_OPENCODE_VERSION:-1.14.24}"
OPENCODE_CANONICAL_BIN="$HOME/.opencode/bin/opencode"
export REQUIRED_OPENCODE_VERSION
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
log_info() { echo -e "${BLUE}[INFO]${NC} $1"; }
log_ok() { echo -e "${GREEN}[OK]${NC} $1"; }
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
log_skip() { echo -e "${YELLOW}[SKIP]${NC} $1 (bereits vorhanden)"; }
version_lt() {
python3 - "$1" "$2" <<'PYEOF'
import re, sys
def normalize(value: str) -> list[int]:
parts = [int(x) for x in re.findall(r"\d+", value)]
return (parts + [0, 0, 0])[:3]
sys.exit(0 if normalize(sys.argv[1]) < normalize(sys.argv[2]) else 1)
PYEOF
}
resolve_opencode_bin() {
if [ -x "$OPENCODE_CANONICAL_BIN" ]; then
printf '%s\n' "$OPENCODE_CANONICAL_BIN"
return 0
fi
if command -v opencode >/dev/null 2>&1; then
command -v opencode
return 0
fi
return 1
}
install_or_upgrade_opencode_cli() {
log_info "Installing OpenCode CLI $REQUIRED_OPENCODE_VERSION via official installer..."
if [ "$DRY_RUN" = false ]; then
curl -fsSL https://opencode.ai/install | env VERSION="$REQUIRED_OPENCODE_VERSION" bash -s -- --no-modify-path
fi
}
ensure_opencode_cli() {
local opencode_bin=""
local current_version=""
if opencode_bin="$(resolve_opencode_bin 2>/dev/null)"; then
current_version="$("$opencode_bin" --version 2>/dev/null | tr -d 'v' | awk '{print $NF}')"
if [ -z "$current_version" ] || version_lt "$current_version" "$REQUIRED_OPENCODE_VERSION"; then
log_warn "OpenCode CLI ${current_version:-unbekannt} ist zu alt; benötige >= $REQUIRED_OPENCODE_VERSION"
install_or_upgrade_opencode_cli
else
log_ok "OpenCode CLI: $opencode_bin ($current_version)"
return 0
fi
else
log_warn "OpenCode CLI nicht gefunden — installiere kanonische Version $REQUIRED_OPENCODE_VERSION"
install_or_upgrade_opencode_cli
fi
opencode_bin="$(resolve_opencode_bin 2>/dev/null || true)"
if [ -z "$opencode_bin" ]; then
log_error "OpenCode CLI konnte nicht installiert werden"
exit 1
fi
current_version="$("$opencode_bin" --version 2>/dev/null | tr -d 'v' | awk '{print $NF}')"
log_ok "OpenCode CLI: $opencode_bin (${current_version:-$REQUIRED_OPENCODE_VERSION})"
}
ensure_local_opencode_plugin_sdk() {
log_info "Syncing local @opencode-ai/plugin runtime package..."
if [ "$DRY_RUN" = false ]; then
mkdir -p "$OPENCODE_DIR"
python3 <<'PYEOF'
import json, os
path = os.path.expanduser("~/.config/opencode/package.json")
required = os.environ["REQUIRED_OPENCODE_VERSION"]
data = {}
if os.path.exists(path):
with open(path) as f:
data = json.load(f)
deps = data.setdefault("dependencies", {})
deps["@opencode-ai/plugin"] = required
with open(path, "w") as f:
json.dump(data, f, indent=2)
f.write("\n")
PYEOF
npm install --save-exact --prefix "$OPENCODE_DIR" "@opencode-ai/plugin@$REQUIRED_OPENCODE_VERSION" >/dev/null
fi
log_ok "@opencode-ai/plugin auf $REQUIRED_OPENCODE_VERSION synchronisiert"
}
for arg in "$@"; do
case $arg in
--dry-run) DRY_RUN=true; log_info "Dry run mode" ;;
--skip-bun) SKIP_BUN=true ;;
esac
done
echo "============================================"
echo " Upgraded OpenCode Stack Installer"
echo " (Überschreibt NIEMALS bestehende Configs)"
echo "============================================"
echo ""
# 1. Prerequisites
log_info "Checking prerequisites..."
ensure_opencode_cli
command -v node &>/dev/null || { log_error "Node.js nicht gefunden"; exit 1; }
log_ok "Node.js: $(node --version)"
command -v bun &>/dev/null || { log_error "bun nicht gefunden"; exit 1; }
log_ok "bun: $(bun --version)"
echo ""
# 2. Create directories
mkdir -p "$OPENCODE_DIR" "$BIN_DIR"
log_ok "Verzeichnisse bereit"
if [ -x "$OPENCODE_CANONICAL_BIN" ]; then
[ "$DRY_RUN" = false ] && ln -sf "$OPENCODE_CANONICAL_BIN" "$BIN_DIR/opencode"
log_ok "Kanonischer opencode Wrapper nach $BIN_DIR/opencode verlinkt"
fi
ensure_local_opencode_plugin_sdk
echo ""
# 3. Install RTK (Reduced Token Kit) — 60-90% token savings on shell commands
log_info "Installing RTK token optimizer..."
RTK_NPM="rtk@latest"
if ! npm ls -g rtk &>/dev/null; then
if [ "$DRY_RUN" = false ]; then
npm install -g rtk 2>/dev/null && log_ok "RTK npm package installed" || log_warn "RTK npm install failed"
else
log_info "Would install RTK npm package"
fi
else
log_skip "RTK npm package"
fi
echo ""
# 3b. Install RTK OpenCode plugin (copies rtk.ts plugin into opencode plugins dir)
log_info "Installing RTK OpenCode plugin..."
if [ -f "$SCRIPT_DIR/plugins/rtk.ts" ]; then
mkdir -p "$OPENCODE_DIR/plugins"
if [ "$DRY_RUN" = false ]; then
cp "$SCRIPT_DIR/plugins/rtk.ts" "$OPENCODE_DIR/plugins/rtk.ts"
fi
log_ok "RTK plugin copied to $OPENCODE_DIR/plugins/rtk.ts"
else
log_warn "plugins/rtk.ts not found in infra repo — skipping RTK plugin copy"
fi
echo ""
# 3c. Install Graphify — AST-based project knowledge graph
log_info "Installing Graphify (AST knowledge graph)..."
if ! command -v graphify &>/dev/null; then
if [ "$DRY_RUN" = false ]; then
npm install -g graphify 2>/dev/null && log_ok "Graphify npm package installed" || log_warn "Graphify npm install failed"
else
log_info "Would install Graphify npm package"
fi
else
log_skip "Graphify CLI"
fi
# 3d. Install Graphify OpenCode plugin
log_info "Installing Graphify OpenCode plugin..."
if [ -f "$SCRIPT_DIR/.opencode/plugins/graphify.js" ]; then
mkdir -p "$OPENCODE_DIR/plugins"
if [ "$DRY_RUN" = false ]; then
cp "$SCRIPT_DIR/.opencode/plugins/graphify.js" "$OPENCODE_DIR/plugins/graphify.js"
fi
log_ok "Graphify plugin copied to $OPENCODE_DIR/plugins/graphify.js"
else
log_warn ".opencode/plugins/graphify.js not found in infra repo — skipping Graphify plugin copy"
fi
# 3e. Install GitNexus — code intelligence knowledge graph + MCP server
log_info "Installing GitNexus (code knowledge graph + MCP)..."
if ! command -v gitnexus &>/dev/null; then
if [ "$DRY_RUN" = false ]; then
npm install -g gitnexus 2>/dev/null && log_ok "GitNexus npm package installed" || log_warn "GitNexus npm install failed"
else
log_info "Would install GitNexus npm package"
fi
else
log_skip "GitNexus CLI"
fi
# 3g. Ensure GitNexus MCP server in opencode.json
log_info "Ensuring GitNexus MCP server is registered..."
if [ "$DRY_RUN" = false ]; then
python3 << 'PYEOF'
import json, os, shutil
config_path = os.path.expanduser("~/.config/opencode/opencode.json")
if not os.path.exists(config_path):
print(" No opencode.json yet — skipping GitNexus MCP registration")
exit(0)
with open(config_path) as f:
cfg = json.load(f)
mcps = cfg.setdefault("mcp", {})
gitnexus_cmd = shutil.which("gitnexus")
if "gitnexus" not in mcps:
if gitnexus_cmd:
mcps["gitnexus"] = {
"type": "local",
"command": [gitnexus_cmd, "mcp"]
}
with open(config_path, "w") as f:
json.dump(cfg, f, indent=2)
print(f" GitNexus MCP registered with command: {gitnexus_cmd} mcp")
else:
print(" gitnexus binary not found — skipping MCP registration")
else:
existing_cmd = mcps["gitnexus"].get("command", [])
if gitnexus_cmd and existing_cmd and existing_cmd[0] != gitnexus_cmd:
existing_cmd[0] = gitnexus_cmd
mcps["gitnexus"]["command"] = existing_cmd
with open(config_path, "w") as f:
json.dump(cfg, f, indent=2)
print(f" GitNexus MCP command updated to: {gitnexus_cmd} mcp")
else:
print(" GitNexus MCP already registered")
PYEOF
fi
echo ""
# 3h. Install Simone-MCP — LSP-grade code worker + MCP server
SIMONE_DIR="$HOME/.local/share/simone-mcp"
log_info "Installing Simone-MCP (LSP code worker + MCP)..."
if [ ! -d "$SIMONE_DIR" ]; then
if [ "$DRY_RUN" = false ]; then
git clone https://github.com/Delqhi/Simone-MCP.git "$SIMONE_DIR" 2>/dev/null && log_ok "Simone-MCP cloned to $SIMONE_DIR" || log_warn "Simone-MCP clone failed"
else
log_info "Would clone Simone-MCP to $SIMONE_DIR"
fi
else
log_skip "Simone-MCP repo (already at $SIMONE_DIR)"
fi
# Build Node.js MCP wrapper
if [ -d "$SIMONE_DIR" ] && [ -f "$SIMONE_DIR/.opencode/package.json" ]; then
log_info "Building Simone-MCP Node.js wrapper..."
if [ "$DRY_RUN" = false ]; then
(cd "$SIMONE_DIR" && bun install 2>/dev/null && bun run build 2>/dev/null) && log_ok "Simone-MCP Node.js build complete" || log_warn "Simone-MCP build failed — Python fallback available"
fi
fi
# Install Python dependencies
if [ -d "$SIMONE_DIR" ] && [ -f "$SIMONE_DIR/pyproject.toml" ]; then
log_info "Installing Simone-MCP Python dependencies..."
if [ "$DRY_RUN" = false ]; then
pip3 install --break-system-packages -e "$SIMONE_DIR" 2>/dev/null && log_ok "Simone-MCP Python deps installed" || log_warn "Simone-MCP pip install failed"
fi
fi
# Register Simone-MCP in opencode.json
log_info "Ensuring Simone-MCP MCP server is registered..."
if [ "$DRY_RUN" = false ]; then
python3 << 'SIMONEEOF'
import json, os, shutil
config_path = os.path.expanduser("~/.config/opencode/opencode.json")
if not os.path.exists(config_path):
exit(0)
with open(config_path) as f:
cfg = json.load(f)
mcps = cfg.setdefault("mcp", {})
simone_dir = os.path.expanduser("~/.local/share/simone-mcp")
simone_node_cli = os.path.join(simone_dir, "dist", "src", "cli.js")
simone_py_cli = os.path.join(simone_dir, "src", "cli.py")
if "simone-mcp" not in mcps:
if os.path.exists(simone_node_cli):
mcps["simone-mcp"] = {
"type": "local",
"command": ["node", simone_node_cli, "serve-mcp"]
}
with open(config_path, "w") as f:
json.dump(cfg, f, indent=2)
print(f" Simone-MCP MCP registered (Node.js): node {simone_node_cli} serve-mcp")
elif os.path.exists(simone_py_cli):
mcps["simone-mcp"] = {
"type": "local",
"command": ["python3", simone_py_cli, "serve-mcp"]
}
with open(config_path, "w") as f:
json.dump(cfg, f, indent=2)
print(f" Simone-MCP MCP registered (Python): python3 {simone_py_cli} serve-mcp")
else:
print(" Simone-MCP CLI not found — skipping MCP registration")
else:
existing_cmd = mcps["simone-mcp"].get("command", [])
if os.path.exists(simone_node_cli) and existing_cmd and existing_cmd[0] != "node":
mcps["simone-mcp"]["command"] = ["node", simone_node_cli, "serve-mcp"]
with open(config_path, "w") as f:
json.dump(cfg, f, indent=2)
print(f" Simone-MCP MCP command updated to Node.js build")
else:
print(" Simone-MCP MCP already registered")
SIMONEEOF
fi
echo ""
# 3i. Add RTK plugin to opencode.json if not already present
if [ -f "opencode.json" ]; then
log_info "Ensuring RTK plugin is registered in opencode.json..."
if [ "$DRY_RUN" = false ]; then
python3 << 'PYEOF'
import json, os
config_path = os.path.expanduser("~/.config/opencode/opencode.json")
if os.path.exists(config_path):
with open(config_path) as f: cfg = json.load(f)
plugins = cfg.get("plugin", [])
rtk_plugin = "file://$HOME/.config/opencode/plugins/rtk.ts"
if rtk_plugin not in plugins:
plugins.append(rtk_plugin)
print(" RTK plugin registered in opencode.json")
else:
print(" RTK plugin already registered")
graphify_plugin = "file://$HOME/.config/opencode/plugins/graphify.js"
if graphify_plugin not in plugins:
plugins.append(graphify_plugin)
print(" Graphify plugin registered in opencode.json")
else:
print(" Graphify plugin already registered")
PYEOF
fi
fi
echo ""
# 3d. Install Claude-Mem — Persistent Memory for OpenCode
log_info "Installing Claude-Mem (persistent cross-session memory)..."
CLAUDE_MEM_PLUGIN="$SCRIPT_DIR/plugins/claude-mem.js"
CLAUDE_MEM_DST="$OPENCODE_DIR/plugins/claude-mem.js"
if [ -f "$CLAUDE_MEM_PLUGIN" ]; then
mkdir -p "$OPENCODE_DIR/plugins"
if [ "$DRY_RUN" = false ]; then
cp "$CLAUDE_MEM_PLUGIN" "$CLAUDE_MEM_DST"
fi
log_ok "claude-mem plugin copied"
else
log_warn "plugins/claude-mem.js not found in infra repo"
fi
if [ -f "opencode.json" ] && [ -f "$CLAUDE_MEM_DST" ]; then
log_info "Registering Claude-Mem plugin in opencode.json..."
if [ "$DRY_RUN" = false ]; then
python3 << 'PYEOF'
import json, os
config_path = os.path.expanduser("~/.config/opencode/opencode.json")
if os.path.exists(config_path):
with open(config_path) as f: cfg = json.load(f)
plugins = cfg.get("plugin", [])
cmem_plugin = "file://$HOME/.config/opencode/plugins/claude-mem.js"
if cmem_plugin not in plugins:
plugins.append(cmem_plugin)
cfg["plugin"] = plugins
with open(config_path, "w") as f: json.dump(cfg, f, indent=2)
PYEOF
fi
fi
# Claude-Mem LaunchAgent
log_info "Setting up Claude-Mem auto-start (LaunchAgent)..."
CLAUDE_MEM_PLIST="$HOME/Library/LaunchAgents/com.claude-mem.worker.plist"
if [ "$DRY_RUN" = false ]; then
mkdir -p "$HOME/Library/LaunchAgents"
sed "s|__HOME__|$HOME|g" "$SCRIPT_DIR/plugins/com.claude-mem.worker.plist" > "$CLAUDE_MEM_PLIST"
launchctl unload "$CLAUDE_MEM_PLIST" 2>/dev/null || true
launchctl load "$CLAUDE_MEM_PLIST"
fi
log_ok "Claude-Mem LaunchAgent installed"
# Start claude-mem worker now
if [ "$DRY_RUN" = false ]; then
if pgrep -f "claude-mem.*start" >/dev/null 2>&1; then
log_skip "Claude-Mem worker already running"
else
log_info "Starting Claude-Mem worker..."
rm -rf "$HOME/.npm/_npx" 2>/dev/null
nohup npx --yes claude-mem@latest start > /tmp/claude-mem-install.log 2>&1 &
sleep 3
if curl -s http://localhost:37701/health >/dev/null 2>&1; then
log_ok "Claude-Mem worker started (Web UI: http://localhost:37701)"
else
log_warn "Claude-Mem worker may need manual start: npx --yes claude-mem@latest start"
fi
fi
fi
echo ""
# 3e. Install SIN-Pool-Router — Fireworks AI Proxy mit Auto-Failover
log_info "Installing SIN-Pool-Router (fireworks-ai → sinatorpool-router.delqhi.com → 10 Proxys)..."
if [ "$DRY_RUN" = false ]; then
curl -fsSL https://raw.githubusercontent.com/SIN-Hermes-Bundles/SIN-Hermes-Provider-Bundle/main/install.sh | bash 2>/dev/null && \
log_ok "Pool-Router installed (sinatorpool-router.delqhi.com, 10 Proxys)" || \
log_warn "Pool-Router install failed"
else
log_info "Would install SIN-Pool-Router"
fi
echo ""
# 3f. Install SINator-v0 — v0.dev API Proxy mit Auto-Start
log_info "Installing SINator-v0 (v0.dev API Proxy mit OpenAI Adapter)..."
SINATOR_V0_DIR="$HOME/dev/SINator-v0"
if [ "$DRY_RUN" = false ]; then
if [ ! -d "$SINATOR_V0_DIR" ]; then
git clone https://github.com/SIN-Rotator/SINator-v0.git "$SINATOR_V0_DIR" 2>/dev/null && \
log_ok "SINator-v0 cloned to $SINATOR_V0_DIR" || \
log_warn "SINator-v0 clone failed"
else
log_skip "SINator-v0 repo (already at $SINATOR_V0_DIR)"
fi
# Installiere Wrapper und LaunchAgent
if [ -d "$SINATOR_V0_DIR" ]; then
cd "$SINATOR_V0_DIR"
# Installiere opencode-sinator Wrapper
if [ -f "$SINATOR_V0_DIR/opencode-with-sinator" ]; then
mkdir -p "$HOME/.local/bin"
cp "$SINATOR_V0_DIR/opencode-with-sinator" "$HOME/.local/bin/opencode-sinator"
chmod +x "$HOME/.local/bin/opencode-sinator"
log_ok "opencode-sinator Wrapper installiert"
fi
# Installiere LaunchAgent
if [ -f "$SINATOR_V0_DIR/install/com.sinator.v0.plist" ]; then
cp "$SINATOR_V0_DIR/install/com.sinator.v0.plist" "$HOME/Library/LaunchAgents/"
launchctl unload "$HOME/Library/LaunchAgents/com.sinator.v0.plist" 2>/dev/null || true
launchctl load "$HOME/Library/LaunchAgents/com.sinator.v0.plist" 2>/dev/null || true
log_ok "SINator-v0 LaunchAgent installiert (com.sinator.v0)"
fi
# Starte SINator-v0
launchctl start com.sinator.v0 2>/dev/null || true
log_ok "SINator-v0 gestartet"
fi
else
log_info "Would install SINator-v0"
fi
echo ""
# 4. Helper: sync directory — NUR was fehlt wird kopiert
sync_dir_additive() {
local src="$1" dst="$2" label="$3"
if [ ! -d "$src" ] || [ ! "$(ls -A "$src" 2>/dev/null)" ]; then
return
fi
if [ "$DRY_RUN" = false ]; then
mkdir -p "$dst"
# rsync mit --ignore-existing = überschreibt NIE existierende Dateien
rsync -a --ignore-existing "$src/" "$dst/"
fi
local src_count=$(find "$src" -type f | wc -l | tr -d ' ')
local dst_count=$(find "$dst" -type f 2>/dev/null | wc -l | tr -d ' ')
if [ "$dst_count" -gt 0 ]; then
log_ok "$label: $src_count Dateien nach $dst (existierende wurden NICHT überschrieben)"
else
log_ok "$label: $src_count Dateien nach $dst"
fi
}
sync_dir_overlay() {
local src="$1" dst="$2" label="$3"
if [ ! -d "$src" ] || [ ! "$(ls -A "$src" 2>/dev/null)" ]; then
return
fi
if [ "$DRY_RUN" = false ]; then
mkdir -p "$dst"
rsync -a "$src/" "$dst/"
fi
log_ok "$label: kanonische Dateien nach $dst aktualisiert"
}
# 5. Install ALL directories — rein additiv, kein overwrite
log_info "Installing skills (inkl. ADHD + GSD)..."
sync_dir_additive "skills" "$OPENCODE_DIR/skills" "Skills"
if [ -d "$SCRIPT_DIR/skills/survey-runner" ]; then
log_ok "survey-runner skill (heypiggy.com NEMO automation) installiert"
fi
# ADHD (Parallel Divergent Ideation) — install per npx wenn nicht via skills/
if [ ! -f "$OPENCODE_DIR/skills/adhd/SKILL.md" ] && [ ! -d "$OPENCODE_DIR/skills/adhd" ]; then
log_info "ADHD skill: installing via npx skills..."
if [ "$DRY_RUN" = false ]; then
npx -y skills add UditAkhourii/adhd -y --global -a opencode 2>/dev/null && \
log_ok "ADHD skill installed" || log_warn "ADHD skill install failed"
fi
else
log_skip "ADHD skill (from repo)"
fi
# GSD (Get Shit Done) — falls nicht via repo skills/
if ! find "$OPENCODE_DIR/skills" -name "gsd-*" -maxdepth 1 -type d 2>/dev/null | grep -q .; then
log_info "GSD: installing spec-driven development framework..."
if [ "$DRY_RUN" = false ]; then
npx -y '@opengsd/get-shit-done-redux@latest' 2>/dev/null && \
log_ok "GSD installed (OpenCode)" || log_warn "GSD install failed"
fi
else
log_skip "GSD skills (from repo)"
fi
# Hermes skills (cross-agent)
if [ -d "$SCRIPT_DIR/hermes-skills" ]; then
log_info "Installing Hermes skills..."
HERMES_SKILLS_DIR="$HOME/.hermes/skills"
mkdir -p "$HERMES_SKILLS_DIR"
if [ "$DRY_RUN" = false ]; then
rsync -a --ignore-existing "$SCRIPT_DIR/hermes-skills/" "$HERMES_SKILLS_DIR/"
fi
log_ok "Hermes skills (ADHD etc.) nach $HERMES_SKILLS_DIR"
fi
log_info "Enforcing canonical create-flow..."
sync_dir_overlay "skills/create-flow" "$OPENCODE_DIR/skills/create-flow" "create-flow"
log_info "Installing commands..."
sync_dir_additive "commands" "$OPENCODE_DIR/commands" "Commands"
log_info "Installing scripts..."
sync_dir_additive "scripts" "$OPENCODE_DIR/scripts" "Scripts"
[ "$DRY_RUN" = false ] && chmod +x "$OPENCODE_DIR/scripts/"*.sh 2>/dev/null || true
log_info "Installing hooks..."
sync_dir_additive "hooks" "$OPENCODE_DIR/hooks" "Hooks"
[ "$DRY_RUN" = false ] && chmod +x "$OPENCODE_DIR/hooks/"* 2>/dev/null || true
log_info "Installing templates..."
sync_dir_additive "templates" "$OPENCODE_DIR/templates" "Templates"
log_info "Installing instructions..."
sync_dir_additive "instructions" "$OPENCODE_DIR/instructions" "Instructions"
log_info "Installing rules..."
sync_dir_additive "rules" "$OPENCODE_DIR/rules" "Rules"
log_info "Installing tools..."
sync_dir_additive "tools" "$OPENCODE_DIR/tools" "Tools"
log_info "Installing platforms..."
sync_dir_additive "platforms" "$OPENCODE_DIR/platforms" "Platforms"
log_info "Installing agents..."
sync_dir_additive "agents" "$OPENCODE_DIR/agents" "Agents"
log_info "Installing agents-instructions..."
sync_dir_additive "agents-instructions" "$OPENCODE_DIR/agents-instructions" "Agent Instructions"
if [ -f "$OPENCODE_DIR/agents-instructions/blueprint-mandates/MANDATE-0.34.md" ]; then
log_ok "Simone MCP + PCPM mandate aktiv"
else
log_warn "Simone MCP + PCPM mandate fehlt noch"
fi
log_info "Installing vendor..."
sync_dir_additive "vendor" "$OPENCODE_DIR/vendor" "Vendor"
log_info "Installing nodriver-profiles..."
sync_dir_additive "nodriver-profiles" "$OPENCODE_DIR/nodriver-profiles" "Nodriver Profiles"
log_info "Installing chrome_profile..."
sync_dir_additive "chrome_profile" "$OPENCODE_DIR/chrome_profile" "Chrome Profile"
echo ""
# 6. Install CLI tools — NUR wenn nicht bereits vorhanden
log_info "Installing CLI tools to $BIN_DIR..."
if [ -d "bin" ]; then
for tool in bin/*; do
[ -f "$tool" ] || continue
local_name=$(basename "$tool")
if [ -f "$BIN_DIR/$local_name" ]; then
log_skip "$local_name"
else
if [ "$DRY_RUN" = false ]; then
cp "$tool" "$BIN_DIR/$local_name"
chmod +x "$BIN_DIR/$local_name"
fi
log_ok "CLI tool: $local_name"
fi
done
fi
echo ""
# 6b. Doctor CLI — installiere ALLE 23 Tools
log_info "Installing Doctor CLI (23 Tools)..."
BREW_TOOLS="cloc tokei lizard plantuml doxygen pandoc vale git-cliff lychee trufflehog gitleaks"
NPM_TOOLS="dependency-cruiser typedoc terraform-docs standard-readme conventional-changelog-cli auto-changelog markdownlint-cli2"
PIP_TOOLS="pydeps gitingest sphinx mkdocs pdoc repomix pylint md-dead-link-check code2flow"
for t in $BREW_TOOLS; do
if ! command -v "$t" &>/dev/null; then
brew install "$t" 2>/dev/null && log_ok "brew: $t" || log_warn "brew: $t skipped"
else log_skip "$t"; fi
done
for t in $NPM_TOOLS; do
if ! command -v "$t" &>/dev/null; then
npm install -g "$t" 2>/dev/null && log_ok "npm: $t" || log_warn "npm: $t skipped"
else log_skip "$t"; fi
done
for t in $PIP_TOOLS; do
pip3 install --break-system-packages "$t" 2>/dev/null && log_ok "pip: $t" || log_warn "pip: $t skipped"
done
echo "✅ Doctor: 23 Tools installiert"
# 7. opencode.json — INTELLIGENT MERGE, NIEMALS overwrite
if [ -f "opencode.json" ]; then
log_info "Merging opencode.json..."
if [ -f "$OPENCODE_DIR/opencode.json" ]; then
if [ "$DRY_RUN" = false ]; then
python3 << 'PYEOF'
import json, os, sys
target = os.path.expanduser("~/.config/opencode/opencode.json")
source = "opencode.json"
with open(source) as f: src = json.load(f)
with open(target) as f: tgt = json.load(f)
# Backup existing config
import shutil, datetime
backup = target + f".backup-{datetime.datetime.now().strftime('%Y%m%d-%H%M%S')}"
shutil.copy2(target, backup)
print(f" Backup erstellt: {backup}")
# Merge plugins (deduplicate)
src_plugins = src.get("plugin", [])
tgt_plugins = tgt.get("plugin", [])
all_plugins, seen = [], set()
for p in tgt_plugins + src_plugins:
pkg_name = p.split("@")[0] if "@" in p else p
if pkg_name not in seen: all_plugins.append(p); seen.add(pkg_name)
tgt["plugin"] = all_plugins
# Merge providers — kanonische Model-Metadaten updaten, Benutzer-Overrides bewahren
src_providers = src.get("provider", {})
tgt_providers = tgt.get("provider", {})
for name, prov in src_providers.items():
if name not in tgt_providers:
tgt_providers[name] = prov
else:
# Modelle: kanonische Felder updaten
src_models = prov.get("models", {})
tgt_models = tgt_providers[name].get("models", {})
for mname, src_mconf in src_models.items():
if mname not in tgt_models:
# Neues Modell
tgt_models[mname] = src_mconf
else:
# Existierendes Modell: Kanonische Felder updaten, andere erhalten
tgt_mconf = tgt_models[mname]
# name
if "name" in src_mconf:
tgt_mconf["name"] = src_mconf["name"]
# id
if "id" in src_mconf:
tgt_mconf["id"] = src_mconf["id"]
# limit (context, output)
if "limit" in src_mconf and isinstance(src_mconf["limit"], dict):
if "limit" not in tgt_mconf or not isinstance(tgt_mconf.get("limit"), dict):
tgt_mconf["limit"] = {}
for k, v in src_mconf["limit"].items():
tgt_mconf["limit"][k] = v
# modalities
if "modalities" in src_mconf:
tgt_mconf["modalities"] = src_mconf["modalities"]
# attachment
if "attachment" in src_mconf:
tgt_mconf["attachment"] = src_mconf["attachment"]
tgt_providers[name]["models"] = tgt_models
# Provider-Optionen: kanonische Felder (baseURL, apiKey) updaten
src_opts = prov.get("options", {})
tgt_opts = tgt_providers[name].get("options", {})
# Force sync critical options from source for providers where stale
# local values are known to break auth or routing.
if name in {"modal", "qwen", "openai"}:
tgt_opts = src_opts
else:
# For others, only add new options
for k, v in src_opts.items():
if k not in tgt_opts:
tgt_opts[k] = v
tgt_providers[name]["options"] = tgt_opts
if name in {"modal", "qwen"}:
if "npm" in prov:
tgt_providers[name]["npm"] = prov["npm"]
if "name" in prov:
tgt_providers[name]["name"] = prov["name"]
elif "npm" in prov and "npm" not in tgt_providers[name]:
tgt_providers[name]["npm"] = prov["npm"]
tgt["provider"] = tgt_providers
# Merge agents
src_agents = src.get("agent", {})
tgt_agents = tgt.get("agent", {})
for aname, src_aconf in src_agents.items():
if aname not in tgt_agents:
tgt_agents[aname] = src_aconf
else:
if "model" in src_aconf:
tgt_agents[aname]["model"] = src_aconf["model"]
if "description" in src_aconf:
tgt_agents[aname]["description"] = src_aconf["description"]
if "fallback" in src_aconf:
tgt_agents[aname]["fallback"] = src_aconf["fallback"]
tgt["agent"] = tgt_agents
# Merge commands — NUR neue
src_cmds = src.get("command", {})
tgt_cmds = tgt.get("command", {})
for name, cconf in src_cmds.items():
if name not in tgt_cmds:
tgt_cmds[name] = cconf
tgt["command"] = tgt_cmds
# User's model choice BEWAHREN — NIEMALS überschreiben
# User's $schema BEWAHREN
if "$schema" not in tgt and "$schema" in src: tgt["$schema"] = src["$schema"]
with open(target, "w") as f: json.dump(tgt, f, indent=2)
print(f" Gemerged: {len(all_plugins)} plugins, {len(tgt_providers)} providers, {len(tgt_agents)} agents, {len(tgt_cmds)} commands")
print(f" Deine bestehenden Configs wurden NICHT überschrieben!")
PYEOF
fi
log_ok "opencode.json gemerged (Backup erstellt)"
else
# User hat noch keine config — dann kopieren
if [ "$DRY_RUN" = false ]; then
cp opencode.json "$OPENCODE_DIR/opencode.json"
fi
log_ok "opencode.json erstellt (erste Installation)"
fi
fi
# ============================================================================
# 7b. 🚨 ANTIGRAVITY PLUGIN ENFORCEMENT — OBERSTE SCHUTZREGEL
# ============================================================================
# WARUM: Der Python-Merge oben (Schritt 7) dedupliziert Plugins korrekt, aber
# er garantiert NICHT die Reihenfolge. opencode-antigravity-auth MUSS immer
# als ERSTES Plugin in der Liste stehen, weil opencode Plugins in Array-Reihenfolge
# lädt. Wenn ein anderes Plugin zuerst geladen wird und Google OAuth versucht,
# schlägt es fehl — weil der Antigravity-Token noch nicht injiziert wurde.
#
# KONSEQUENZ OHNE DIESE REGEL:
# - Google OAuth für Claude Sonnet/Opus/Gemini funktioniert NICHT
# - Alle antigravity-* Modelle sind nicht verfügbar
# - Der gesamte Fleet-Betrieb bricht zusammen
#
# DIESE REGEL DARF NIEMALS ENTFERNT WERDEN.
# Referenz: AGENTS.md Priority -10.0 — Antigravity Plugin Verbot
# ============================================================================
log_info "🚨 Enforcing antigravity plugin protection (Priority -10.0)..."
if [ -f "opencode.json" ] || [ -f "$OPENCODE_DIR/opencode.json" ]; then
if [ "$DRY_RUN" = false ]; then
python3 << 'PYEOF'
import json, sys, os
# Pfad zur globalen opencode.json — das ist die SSOT (Single Source of Truth)
# Diese Datei steuert ALLE Modelle, Plugins und Provider für den gesamten Fleet
target = os.path.expanduser("~/.config/opencode/opencode.json")
# Das Plugin das IMMER als ERSTES in der Plugin-Liste stehen MUSS.
# Es stellt Google OAuth für alle antigravity-Modelle bereit.
# Ohne diesen Plugin-Eintrag: kein Claude, kein Gemini — NICHTS.
# ACHTUNG: Beim Update auf neue Versionen muss dieser String angepasst werden!
ANTIGRAVITY_PLUGIN = "opencode-antigravity-auth@1.6.5-beta.0"
# Package-Name-Präfix zum Suchen/Erkennen (versionsunabhängig)
ANTIGRAVITY_PKG = "opencode-antigravity-auth"
# Sicherheitscheck: Existiert die Zieldatei?
if not os.path.exists(target):
print(f" ⚠️ opencode.json nicht gefunden unter {target} — überspringe Enforcement")
sys.exit(0)
# Config laden
with open(target, "r") as f:
cfg = json.load(f)
# Plugin-Array auslesen (kann auch fehlen bei frischer Installation)
plugins = cfg.get("plugin", [])
# Prüfen ob antigravity bereits als ERSTES Element in der Liste steht
if plugins and plugins[0].startswith(ANTIGRAVITY_PKG):
# ✅ Alles korrekt — kein Eingriff nötig
print(f" ✅ Antigravity plugin ist bereits an Position 0: {plugins[0]}")
else:
# 🚨 EINGRIFF NÖTIG: Plugin fehlt oder ist nicht an Position 0
old_first = plugins[0] if plugins else "(leer)"
# Alle bestehenden antigravity-Einträge entfernen (könnten an falscher Stelle sein)
# Wir entfernen sie zunächst alle und fügen dann den korrekten an Position 0 ein
plugins_without_antigravity = [p for p in plugins if not p.startswith(ANTIGRAVITY_PKG)]
# Antigravity-Plugin ZWINGEND an Index 0 einfügen — niemals anders
plugins_fixed = [ANTIGRAVITY_PLUGIN] + plugins_without_antigravity
# Gefixte Plugin-Liste zurückschreiben
cfg["plugin"] = plugins_fixed
# Config-Datei atomar überschreiben (json.dump schreibt vollständig oder gar nicht)
with open(target, "w") as f:
json.dump(cfg, f, indent=2)
# Laute Warnung ausgeben damit der User informiert ist
print(f" 🚨🚨🚨 ANTIGRAVITY PLUGIN ENFORCEMENT AUSGELÖST 🚨🚨🚨")
print(f" 🚨 Vorheriges erstes Plugin war: {old_first}")
print(f" 🚨 opencode-antigravity-auth wurde an Position 0 gesetzt!")
print(f" ✅ Plugin-Array jetzt (erste 3): {plugins_fixed[:3]}")
# ----------------------------------------------------------------
# ZUSÄTZLICHE SICHERHEITSPRÜFUNG: Google Provider Konfiguration
# ----------------------------------------------------------------
# Der 'google' Provider DARF KEINEN direkten apiKey in options haben!
# Wenn ein apiKey vorhanden ist, wird der Antigravity OAuth-Flow umgangen
# und Anfragen gehen direkt an generativelanguage.googleapis.com — VERBOTEN!
# Die einzige erlaubte Methode ist OAuth via das opencode-antigravity-auth Plugin.
providers = cfg.get("provider", {})
if "google" not in providers:
# Kein Google-Provider = keine antigravity-Modelle verfügbar
print(f" ⚠️ WARNUNG: 'google' Provider fehlt in opencode.json!")
print(f" ⚠️ Antigravity-Modelle (Claude/Gemini) werden NICHT verfügbar sein!")
elif "apiKey" in providers.get("google", {}).get("options", {}):
# apiKey im google-Provider = direkter API-Zugriff = VERBOTEN (PRIORITY -10.0)
print(f" 🚨 KRITISCH: google Provider hat apiKey in options — Antigravity-OAuth wird UMGANGEN!")
print(f" 🚨 PERMANENT VERBOTEN: generativelanguage.googleapis.com direkt nutzen!")
print(f" 🚨 Bitte apiKey aus google.options entfernen und nur das Antigravity Plugin nutzen!")
else:
# ✅ Korrekt konfiguriert: kein direkter apiKey, OAuth wird vom Plugin bereitgestellt
print(f" ✅ Google Provider korrekt konfiguriert (kein direkter apiKey, verwendet OAuth Plugin)")
PYEOF
log_ok "Antigravity Plugin Protection enforced (Priority -10.0)"
else
log_info "[DRY-RUN] Würde Antigravity Plugin Protection erzwingen"
fi
fi
# 8. AGENTS.md — IMMER aktualisieren (enthält kritische Fleet-Regeln wie Vision Gate Mandate)
# AGENTS.md ist die SSOT für globale Agenten-Regeln und MUSS immer auf dem neuesten Stand sein.
# Ein Backup der bestehenden wird erstellt, aber die neue Version wird IMMER installiert.
if [ -f "AGENTS.md" ]; then
if [ -f "$OPENCODE_DIR/AGENTS.md" ]; then
if [ "$DRY_RUN" = false ]; then
cp "$OPENCODE_DIR/AGENTS.md" "$OPENCODE_DIR/AGENTS.md.backup-$(date +%Y%m%d-%H%M%S)"
cp AGENTS.md "$OPENCODE_DIR/AGENTS.md"
fi
log_ok "AGENTS.md aktualisiert (Backup der alten Version erstellt)"
else
if [ "$DRY_RUN" = false ]; then
cp AGENTS.md "$OPENCODE_DIR/AGENTS.md"
fi
log_ok "AGENTS.md erstellt (erste Installation)"
fi
fi
# 9. .env.example als .env — NUR wenn keine existiert
if [ -f ".env.example" ]; then
if [ -f "$OPENCODE_DIR/.env" ]; then
log_skip ".env (existiert bereits)"
else
if [ "$DRY_RUN" = false ]; then
cp .env.example "$OPENCODE_DIR/.env"
fi
log_ok ".env erstellt — bitte API Keys eintragen!"
fi
fi
if [ -f "$OPENCODE_DIR/.env" ]; then
if ! grep -q '^MODAL_API_KEY=' "$OPENCODE_DIR/.env"; then
echo 'MODAL_API_KEY=' >> "$OPENCODE_DIR/.env"
log_ok "MODAL_API_KEY in .env ergänzt"
fi
fi
echo ""
echo "============================================"
echo " Installation Complete!"
echo "============================================"
echo ""
echo "Was passiert ist:"
echo " ✓ Neue Skills, Commands, Scripts hinzugefügt"
echo " ✓ Bestehende Dateien wurden NICHT überschrieben"
echo " ✓ opencode.json intelligent gemerged"
echo " ✓ Backup deiner alten opencode.json erstellt"
echo " ✓ CLI Tools nur installiert wenn noch nicht vorhanden"
echo " ✓ RTK (Reduced Token Kit) für Shell-Command-Optimierung installiert"
echo " ✓ Graphify (AST Knowledge Graph) installiert"
echo " ✓ GitNexus (Code Intelligence + MCP) installiert"
echo " ✓ Simone-MCP (LSP Code Worker + MCP) installiert"
echo " ✓ Claude-Mem (Persistent Cross-Session Memory) installiert + Auto-Start"
echo " ✓ SIN-Pool-Router (fireworks-ai → sinatorpool-router.delqhi.com → 10 Proxys Auto-Failover)"
echo " ✓ SINator-v0 (v0.dev API Proxy mit OpenAI Adapter + Auto-Start)"
echo " ✓ SINator-Vercel (Vercel AI Gateway Pool, 28+ Keys, M3/Grok/Gemini Image)"
echo " ✓ SIN-Image-Generator Agent (Gemini 3.1 Flash Image / Nano Banana 2)"
echo " ✓ ADHD (Parallel Divergent Ideation — Anti-Premature-Convergence)"
echo " ✓ GSD (Get Shit Done — Spec-Driven Context-Engineering Framework)"
echo ""
echo "Was du noch tun musst:"
echo " 1. ~/.config/opencode/.env mit API Keys befüllen"
echo " 2. opencode --version testen"
echo " 3. RTK (Reduced Token Kit) ist automatisch installiert — Shell Commands werden"
echo " automatisch optimiert (60-90% Token Ersparnis, z.B. git status ~200 statt ~2000)"
echo " 4. Claude-Mem läuft automatisch — Web UI: http://localhost:37701"
echo " Persistent Memory, Context-Injection ab Session #2"
echo " 5. Pool-Router läuft auf sinatorpool-router.delqhi.com — Auto-Failover über 10 Proxys"
echo " Check: curl -s https://sinatorpool-router.delqhi.com/inference/v1/models | head -5"
echo " 6. SINator-v0 läuft auf localhost:27399-27401 — v0.dev API mit OpenAI Adapter"
echo " Check: curl -s http://localhost:27401/v1/models | head -5"
echo " Auto-Start: opencode-sinator (statt opencode) oder launchctl start com.sinator.v0"
echo " 6b. SINator-Vercel Pool läuft auf localhost:8001 — M3/Grok/Gemini-Image mit LRU-Rotation"
echo " Check: curl -s http://localhost:8001/pool/status | python3 -m json.tool"
echo " Setup: git clone https://github.com/SIN-Rotator/SINator-Vercel.git ~/dev/SINator-Vercel"
echo " Image-Gen: opencode run \"Generate logo\" --agent SIN-Image-Generator"
echo " 7. ADHD nutzen: /adhd \"architektur-entscheidung beschreiben\" — 10 LLM-Calls, 30-90s"
echo " Use-Case: Design-Entscheidungen, Fuzzy-Debugging, Naming, API-Design"
echo " 8. GSD nutzen: /gsd-new-project — Spec-Driven Dev mit Context-Engineering"
echo " Flow: discuss → plan → execute → verify → ship pro Phase"
echo ""
echo "Docs: https://github.com/OpenSIN-Code/Infra-SIN-OpenCode-Stack"