-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·924 lines (831 loc) · 45.1 KB
/
install.sh
File metadata and controls
executable file
·924 lines (831 loc) · 45.1 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
#!/bin/bash
# ulk — Install / Uninstall / Check / Verify
#
# Usage: ./install.sh [OPTIONS]
#
# Options:
# --with-vps Include VPS agents
# --with-teams Enable Agent Teams (experimental)
# --with-addy-skills Install addyosmani community skills
# --with-a11y-skills Install Luxembourg accessibility skills (RAWeb/RAAM)
# --with-nothing-design Install Nothing design system skill
# --with-hue-skill Install Hue design language generator (dominikmartn)
# --with-logo-generator-skill Install logo generator skill via Gemini API (op7418, requiert GEMINI_API_KEY)
# --with-memory-loop Install memory loop hooks
# --with-xavier-hook Install Xavier context check hook (SessionStart, 0 tokens)
# --with-claude-design-skills Enable Claude Design export support (beta)
# --with-caveman-skill Install caveman-compress (token compression, MIT)
# --profile <name> Skill profile: web|ios|mobile|full (default: full)
# web = figma only (no swift, no flutter)
# ios = figma + swift (no flutter)
# mobile = figma + swift + flutter
# full = everything (default)
# --dry-run Simulate without making changes
# --uninstall Remove ulk installation
# --check Diagnose CLI tools and skills
# --verify Verify current installation
# --no-color Disable colors
# -h, --help Show this help
set -euo pipefail
# ── Go binary delegation (v5.x) ────────────────────────────────────────────────
# If the ulk Go binary is installed, delegate all operations to it.
# This wrapper will be removed in v5.1 once the Go binary is the sole entry point.
if command -v ulk >/dev/null 2>&1; then
exec ulk install "$@"
fi
# ── Version ────────────────────────────────────────────────────────────────────
REPO="izo/ulk"
# ── Colors ─────────────────────────────────────────────────────────────────────
setup_colors() {
if [ -n "${NO_COLOR+x}" ] || [ "${TERM:-}" = "dumb" ] || [ ! -t 1 ]; then
G=""; Y=""; R=""; C=""; D=""; B=""; NC=""
else
G='\033[0;32m'; Y='\033[0;33m'; R='\033[0;31m'
C='\033[0;36m'; D='\033[2m'; B='\033[1m'; NC='\033[0m'
fi
OK="${G}✓${NC}"; WARN="${Y}○${NC}"; ERR="${R}✗${NC}"; ARR="${D}→${NC}"
}
setup_colors
# ── Paths ──────────────────────────────────────────────────────────────────────
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# Read version from package.json (single source of truth)
VERSION="$(sed -n 's/.*"version": *"\([^"]*\)".*/\1/p' "$SCRIPT_DIR/package.json")"
[ -z "$VERSION" ] && VERSION="0.0.0"
CLAUDE_DIR="$HOME/.claude"
COMMANDS_DIR="$CLAUDE_DIR/commands"
AGENTS_DIR="$CLAUDE_DIR/agents"
SKILLS_DIR="$CLAUDE_DIR/skills"
ULK_DIR="$COMMANDS_DIR/ulk"
# ── Flags ──────────────────────────────────────────────────────────────────────
OPT_VPS=false
OPT_TEAMS=false
OPT_ADDY=false
OPT_A11Y=false
OPT_MEMORY=false
OPT_XAVIER=false
OPT_NOTHING=false
OPT_HUE=false
OPT_OBSIDIAN=false
OPT_FIGMA_MCP=false
OPT_STITCH_MCP=false
OPT_CAVEMAN=false
OPT_CLI_TELEMETRY=false
OPT_CWB_APP_ICON=false
OPT_LOGO_GENERATOR=false
OPT_DRY=false
OPT_NO_INTERACTIVE=false
OPT_WIZARD_DONE=false
OPT_PROFILE="full"
MODE=install
while [ $# -gt 0 ]; do
case "$1" in
--with-vps) OPT_VPS=true ;;
--with-teams) OPT_TEAMS=true ;;
--with-addy-skills) OPT_ADDY=true ;;
--with-a11y-skills) OPT_A11Y=true ;;
--with-memory-loop) OPT_MEMORY=true ;;
--with-xavier-hook) OPT_XAVIER=true ;;
--with-nothing-design) OPT_NOTHING=true ;;
--with-hue-skill) OPT_HUE=true ;;
--with-obsidian-skills) OPT_OBSIDIAN=true ;;
--with-figma-mcp) OPT_FIGMA_MCP=true ;;
--with-stitch-mcp) OPT_STITCH_MCP=true ;;
--with-caveman-skill) OPT_CAVEMAN=true ;;
--with-cwb-app-icon) OPT_CWB_APP_ICON=true ;;
--with-logo-generator-skill) OPT_LOGO_GENERATOR=true ;;
--with-cli-telemetry) OPT_CLI_TELEMETRY=true ;;
--profile)
shift
case "${1:-full}" in
web|ios|mobile|full) OPT_PROFILE="${1:-full}" ;;
*) echo "Unknown profile: ${1:-}. Valid: web|ios|mobile|full" >&2; exit 1 ;;
esac
;;
--dry-run) OPT_DRY=true ;;
--uninstall) MODE=uninstall ;;
--check) MODE=check ;;
--verify) MODE=verify ;;
--install-deps)
MODE=install-deps
if [ $# -gt 1 ] && [ "${2#-}" = "$2" ] && [ -d "$2" ]; then
DEPS_DIR="$2"; shift
else
DEPS_DIR="$PWD"
fi
;;
--status) MODE=status ;;
--impact) OPT_IMPACT=true ;;
--no-color) export NO_COLOR=1; setup_colors ;;
--no-interactive) OPT_NO_INTERACTIVE=true ;;
-h|--help) MODE=help ;;
*) echo "Unknown option: $1" >&2; exit 1 ;;
esac
shift
done
# Export vars used in sourced install/*.sh files (shellcheck can't follow sources)
export DEPS_DIR OPT_IMPACT
# ── Helpers ────────────────────────────────────────────────────────────────────
# shellcheck disable=SC2059 # ANSI color vars in printf format strings — never contain %
header() {
echo
if _gum_ok; then
local _l1 _l2 _l3 _l4 _l5 _l6 _logo _info
_l1="$(gum style --bold --foreground "#FF5F87" "██╗ ██╗██╗ ██╗ ██╗")"
_l2="$(gum style --bold --foreground "#E05FAF" "██║ ██║██║ ██║ ██╔╝")"
_l3="$(gum style --bold --foreground "#AF5FFF" "██║ ██║██║ █████╔╝ ")"
_l4="$(gum style --bold --foreground "#875FFF" "██║ ██║██║ ██╔═██╗ ")"
_l5="$(gum style --bold --foreground "#5F87FF" "╚██████╔╝███████╗██║ ██╗")"
_l6="$(gum style --bold --foreground "#5FAFFF" " ╚═════╝ ╚══════╝╚═╝ ╚═╝")"
_logo="$(gum join --vertical "$_l1" "$_l2" "$_l3" "$_l4" "$_l5" "$_l6")"
_info="$(gum style --padding "0 3" \
"$(gum style --bold --foreground "#FFFDF5" "AI Development Toolkit")" \
"" \
"$(gum style --foreground "#AF5FFF" "v${VERSION} · github.com/${REPO}")" \
"$(gum style --foreground "#626880" "79 agents · skills · orchestration")")"
gum join --horizontal --align center "$_logo" " " "$_info"
else
printf " ${C}${B}██╗ ██╗██╗ ██╗ ██╗${NC}\n"
printf " ${C}${B}██║ ██║██║ ██║ ██╔╝${NC}\n"
printf " ${C}${B}██║ ██║██║ █████╔╝ ${NC}\n"
printf " ${C}${B}██║ ██║██║ ██╔═██╗ ${NC}\n"
printf " ${C}${B}╚██████╔╝███████╗██║ ██╗${NC}\n"
printf " ${C}${B} ╚═════╝ ╚══════╝╚═╝ ╚═╝${NC}\n"
printf "\n ${B}AI Development Toolkit${NC} ${D}v%s · github.com/%s${NC}\n" "$VERSION" "$REPO"
fi
echo
}
# Log a warning (visible but non-fatal)
warn() { printf " ${WARN} %s${NC}\n" "$*" >&2; }
# Wrap a command for dry-run mode
run() {
if [ "$OPT_DRY" = true ]; then
printf " ${D}[dry-run] %s${NC}\n" "$*" >&2
else
"$@"
fi
}
# ── Help ───────────────────────────────────────────────────────────────────────
# shellcheck disable=SC2059 # ANSI color vars in printf format strings — never contain %
cmd_help() {
header
printf " ${B}Usage:${NC} ./install.sh [OPTIONS]\n\n"
printf " ${B}Bundled by default:${NC}\n"
printf " Figma skills (7) figma-use · figma-implement-design · figma-code-connect\n"
printf " figma-generate-library · figma-generate-design\n"
printf " figma-create-design-system-rules · figma-create-new-file\n"
printf " Swift skills (7) SwiftUI Pro · SwiftData · Concurrency · Testing · A11y · Architecture · Security\n"
printf " Flutter skills (2) Flutter Tester · OWASP Mobile Security\n"
printf " context-audit (1) /context-audit — health score 0-100 · MCP · CLAUDE.md · settings\n"
printf " arch-diagram (1) /architecture-diagram — HTML+SVG, \$0, no API (Cocoon-AI, MIT)\n"
echo
printf " ${B}What's new in v4.1.0:${NC}\n"
printf " + 7 new agents : Tony (50) engineer · ED-209 (52) security · Routine (53) cron\n"
printf " CI Guard (54) · Context Audit (55) · Killbill (56) · Xavier (57)\n"
printf " + LLM local : apfel + ollama gemma3:1b — micro-tasks, 0 Claude tokens\n"
printf " + Notion CLI : brew install notion-cli — CLI-first, replaces MCP\n"
printf " + Vault loop : lovecraft memory capture/distribute — cross-session memory\n"
printf " + Cloud routines: /schedule agents — autonomous scheduled runs (agent 53)\n"
echo
printf " ${B}Design system format:${NC}\n"
printf " DESIGN.md uses the ${C}google-labs-code/design.md${NC} format\n"
printf " (YAML tokens + Markdown rationale, 8 canonical sections)\n"
printf " Agamotto (17) produces it · Brique (01) consumes it\n"
printf " Optional CLI: ${D}npx @google-labs-code/design.md lint DESIGN.md${NC}\n"
printf " Ref: ${D}https://github.com/google-labs-code/design.md${NC}\n"
echo
printf " ${B}Interactive wizard:${NC}\n"
printf " ${D}./install.sh${NC} (no args, requires gum) — scan env + select modules + confirm\n"
printf " Install gum: ${D}brew install gum${NC} or ${D}go install github.com/charmbracelet/gum@latest${NC}\n"
echo
printf " ${B}Install options:${NC}\n"
printf " ${C}--with-vps${NC} Include VPS agents\n"
printf " ${C}--with-teams${NC} Enable Agent Teams (experimental)\n"
printf " ${C}--with-figma-mcp${NC} Configure Figma MCP server (claude mcp add)\n"
printf " ${C}--with-stitch-mcp${NC} Configure Stitch MCP server (optionnel — clé API demandée à l'install)\n"
printf " ${C}--with-addy-skills${NC} Install addyosmani community skills\n"
printf " ${C}--with-a11y-skills${NC} Install accessibility skills (RAWeb/RAAM)\n"
printf " ${C}--with-nothing-design${NC} Install Nothing design system skill\n"
printf " ${C}--with-obsidian-skills${NC} Install kepano Obsidian skills\n"
printf " ${C}--with-memory-loop${NC} Install memory loop hooks\n"
printf " ${C}--with-xavier-hook${NC} Install Xavier context check hook (SessionStart, 0 Claude tokens)\n"
printf " ${C}--with-cli-telemetry${NC} Track CLI usage via PostToolUse hook → ./tools/cli-report.sh\n"
printf " ${C}--with-cwb-app-icon${NC} Install cwb-app-icon skill (SnapAI → native AppIcon, requires OpenAI key)\n"
printf " ${C}--with-hue-skill${NC} Install Hue design language generator (dominikmartn, MIT)\n"
printf " ${C}--with-logo-generator-skill${NC} Install logo generator (op7418 — Gemini API, requires GEMINI_API_KEY)\n"
printf " ${C}--with-caveman-skill${NC} Install caveman-compress skill (token compression, MIT)\n"
printf " ${C}--with-claude-design-skills${NC} Enable Claude Design export support (beta)\n"
printf " ${C}--profile${NC} web|ios|mobile|full Skill profile (default: full)\n"
printf " web=figma only · ios=figma+swift · mobile=figma+swift+flutter · full=all\n"
printf " ${C}--no-interactive${NC} Force non-interactive mode (skip wizard)\n"
printf " ${C}--dry-run${NC} Simulate without making changes\n"
echo
printf " ${B}Official plugins (recommend installing via marketplace):${NC}\n"
printf " feature-dev · code-simplifier · commit-commands · pr-review-toolkit\n"
printf " frontend-design · claude-md-management · claude-code-setup\n"
echo
printf " ${B}Commands:${NC}\n"
printf " ${C}--uninstall${NC} Remove ulk installation\n"
printf " ${C}--check${NC} Diagnose CLI tools and skills\n"
printf " ${C}--install-deps${NC} Install missing recommended CLIs (brew/npm)\n"
printf " ${C}--verify${NC} Verify current installation\n"
printf " ${C}--no-color${NC} Disable colors\n"
printf " ${C}-h, --help${NC} Show this help\n"
echo
printf " ${B}Examples:${NC}\n"
printf " ${D}./install.sh${NC} # Wizard interactif (si gum installé)\n"
printf " ${D}./install.sh --no-interactive${NC} # Install direct sans wizard\n"
printf " ${D}./install.sh --with-teams --with-vps${NC} # With VPS + Agent Teams\n"
printf " ${D}./install.sh --check${NC} # Diagnose tools\n"
printf " ${D}./install.sh --install-deps${NC} # Install CLIs recommandés manquants\n"
printf " ${D}./install.sh --install-deps --dry-run${NC} # Aperçu sans modifier\n"
printf " ${D}./install.sh --check --impact${NC} # Impact des CLIs manquants sur les agents\n"
printf " ${D}./install.sh --verify${NC} # Verify install\n"
printf " ${D}./install.sh --uninstall${NC} # Remove\n"
echo
printf " Update: ${D}git pull && ./install.sh${NC}\n"
echo
}
# ── Interactive Wizard (requires gum) ─────────────────────────────────────────
_gum_ok() {
command -v gum >/dev/null 2>&1 && { [ -t 1 ] || test -r /dev/tty; }
}
_has_explicit_opts() {
[ "$OPT_VPS" = true ] || [ "$OPT_TEAMS" = true ] || [ "$OPT_ADDY" = true ] ||
[ "$OPT_A11Y" = true ] || [ "$OPT_MEMORY" = true ] || [ "$OPT_OBSIDIAN" = true ] ||
[ "$OPT_FIGMA_MCP" = true ] || [ "$OPT_NOTHING" = true ] || [ "$OPT_STITCH_MCP" = true ]
}
_should_wizard() {
[ "$MODE" = "install" ] && \
[ "$OPT_NO_INTERACTIVE" = false ] && \
! _has_explicit_opts && \
[ -t 1 ] && \
_gum_ok
}
_wizard_steps() {
local current="$1" b1 b2 b3 label
b1="$(gum style --foreground "#3D3D5C" "██████████")"
b2="$(gum style --foreground "#3D3D5C" "██████████")"
b3="$(gum style --foreground "#3D3D5C" "██████████")"
[ "$current" -ge 1 ] && b1="$(gum style --foreground "#FF5F87" "██████████")"
[ "$current" -ge 2 ] && b2="$(gum style --foreground "#AF5FFF" "██████████")"
[ "$current" -ge 3 ] && b3="$(gum style --foreground "#5FAFFF" "██████████")"
case "$current" in
1) label="$(gum style --bold --foreground "#FF5F87" " 1 / 3 — Environnement")" ;;
2) label="$(gum style --bold --foreground "#AF5FFF" " 2 / 3 — Modules")" ;;
3) label="$(gum style --bold --foreground "#5FAFFF" " 3 / 3 — Confirmation")" ;;
esac
gum join --horizontal "$b1" "$b2" "$b3" "$label"
echo
}
cmd_wizard() {
# ── Header / Logo ──────────────────────────────────────────────────────────
echo
local _wolf _logo _info
_wolf="$(gum style --foreground "#FF5F87" --bold \
" /\ /\ " \
" ( ö ö ) " \
" =( Y )= " \
" )'--'( " \
" ( ulk )" \
" \_____/ ")"
local _l1 _l2 _l3 _l4 _l5 _l6
_l1="$(gum style --bold --foreground "#FF5F87" "██╗ ██╗██╗ ██╗ ██╗")"
_l2="$(gum style --bold --foreground "#E05FAF" "██║ ██║██║ ██║ ██╔╝")"
_l3="$(gum style --bold --foreground "#AF5FFF" "██║ ██║██║ █████╔╝ ")"
_l4="$(gum style --bold --foreground "#875FFF" "██║ ██║██║ ██╔═██╗ ")"
_l5="$(gum style --bold --foreground "#5F87FF" "╚██████╔╝███████╗██║ ██╗")"
_l6="$(gum style --bold --foreground "#5FAFFF" " ╚═════╝ ╚══════╝╚═╝ ╚═╝")"
_logo="$(gum join --vertical "$_l1" "$_l2" "$_l3" "$_l4" "$_l5" "$_l6")"
_info="$(gum style --padding "1 3" \
"$(gum style --bold --foreground "#FFFDF5" "AI Development Toolkit")" \
"" \
"$(gum style --foreground "#AF5FFF" "v${VERSION} · github.com/${REPO}")" \
"$(gum style --foreground "#626880" "79 agents · skills · orchestration")" \
"" \
"$(gum style --italic --foreground "#626880" "Charmant, non ?")")"
gum join --horizontal --align center "$_wolf" " " "$_logo" "$_info"
echo
# ── Step 1 : Environment ─────────────────────────────────────────────────────
_wizard_steps 1
local node_v claude_v gh_v py_v figma_configured ulk_v
local _env_cache
_env_cache="$(mktemp)"
gum spin --spinner pulse --title "$(gum style --foreground "#AF5FFF" "✦") Scan de l'environnement…" -- sh -c "
printf 'node_v=%s\n' \"\$(node --version 2>/dev/null || true)\" > '$_env_cache'
printf 'claude_v=%s\n' \"\$(claude --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)\" >> '$_env_cache'
printf 'gh_v=%s\n' \"\$(gh --version 2>/dev/null | awk 'NR==1 {print \$3}' || true)\" >> '$_env_cache'
printf 'py_v=%s\n' \"\$(python3 --version 2>/dev/null | awk '{print \$2}' || true)\" >> '$_env_cache'
printf 'figma_configured=%s\n' \"\$(command -v claude >/dev/null 2>&1 && claude mcp list 2>/dev/null | grep -q figma && echo true || echo false)\" >> '$_env_cache'
" || true
# Read cached results (single execution, no double-run)
node_v="$(sed -n 's/^node_v=//p' "$_env_cache")"
claude_v="$(sed -n 's/^claude_v=//p' "$_env_cache")"
gh_v="$(sed -n 's/^gh_v=//p' "$_env_cache")"
py_v="$(sed -n 's/^py_v=//p' "$_env_cache")"
figma_configured="$(sed -n 's/^figma_configured=//p' "$_env_cache")"
[ -z "$figma_configured" ] && figma_configured=false
rm -f "$_env_cache"
ulk_v="$(cat "$ULK_DIR/.version" 2>/dev/null || true)"
# Build environment table
local _n_s _c_s _gh_s _py_s _fig_s _fig_v _ulk_s _ulk_v_line
[ -n "$node_v" ] && _n_s="✓" || _n_s="✗"
[ -n "$claude_v" ] && _c_s="✓" || _c_s="✗"
[ -n "$gh_v" ] && _gh_s="✓" || _gh_s="○"
[ -n "$py_v" ] && _py_s="✓" || _py_s="○"
[ "$figma_configured" = true ] && { _fig_s="✓"; _fig_v="configuré"; } \
|| { _fig_s="○"; _fig_v="— (→ option étape 2)"; }
[ -n "$ulk_v" ] && { _ulk_s="↑"; _ulk_v_line="v${ulk_v} → v${VERSION}"; } \
|| { _ulk_s="+"; _ulk_v_line="v${VERSION} (première install)"; }
local tbl
tbl=" |Outil|Version|Usage"
tbl="$tbl"$'\n'"${_n_s}|Node.js|${node_v:----}|compilation des agents [requis]"
tbl="$tbl"$'\n'"${_c_s}|Claude CLI|${claude_v:----}|point d'entrée ulk [requis]"
tbl="$tbl"$'\n'"${_gh_s}|gh CLI|${gh_v:----}|commandes GitHub (PR, issues)"
tbl="$tbl"$'\n'"${_py_s}|Python 3|${py_v:----}|diagnostic --check"
tbl="$tbl"$'\n'"${_fig_s}|Figma MCP|${_fig_v}|design → code"
tbl="$tbl"$'\n'"${_ulk_s}|ulk|${_ulk_v_line}|"
echo "$tbl" | gum table -p -s "|" \
--border rounded \
--border.foreground 8 \
--header.foreground 6
echo
# ── Step 2 : Module selection ─────────────────────────────────────────────────
_wizard_steps 2
printf " ${D}Inclus par défaut : Figma (7) · Swift (7) · Flutter (2) · context-audit · architecture-diagram${NC}\n\n"
local figma_label="Figma MCP Configurer le serveur MCP Figma"
[ "$figma_configured" = true ] && figma_label="${figma_label} (déjà configuré)"
local CHOICES
CHOICES="$(gum choose --no-limit \
--header " ↑↓ naviguer espace sélectionner entrée confirmer" \
--cursor.foreground 212 \
--selected.foreground 212 \
--height 10 \
"VPS agents Serveurs distants · déploiement · SSH" \
"Agent Teams Orchestration multi-agents (expérimental)" \
"$figma_label" \
"Stitch MCP Design system AI Google (clé API requise)" \
"Memory loop Hooks mémoire cross-session (Obsidian-compatible)" \
"Nothing design Système de design minimaliste · dominikmartn" \
"Hue Générateur de design language · dominikmartn" \
"Logo generator SVG+PNG logos via Gemini API · op7418 (requiert GEMINI_API_KEY)" \
"Addy skills Web performance · Core Web Vitals · addyosmani" \
"A11y skills Accessibilité RAWeb/RAAM (Luxembourg)" \
"Obsidian skills Markdown + defuddle · kepano")" || {
printf "\n ${WARN} Annulé.\n\n"
exit 0
}
echo "$CHOICES" | grep -q "^VPS" && OPT_VPS=true
echo "$CHOICES" | grep -q "^Agent" && OPT_TEAMS=true
echo "$CHOICES" | grep -q "^Figma" && OPT_FIGMA_MCP=true
echo "$CHOICES" | grep -q "^Stitch" && OPT_STITCH_MCP=true
echo "$CHOICES" | grep -q "^Memory" && OPT_MEMORY=true
echo "$CHOICES" | grep -q "^Nothing design" && OPT_NOTHING=true
echo "$CHOICES" | grep -q "^Hue" && OPT_HUE=true
echo "$CHOICES" | grep -q "^Logo" && OPT_LOGO_GENERATOR=true
echo "$CHOICES" | grep -q "^Addy" && OPT_ADDY=true
echo "$CHOICES" | grep -q "^A11y" && OPT_A11Y=true
echo "$CHOICES" | grep -q "^Obsidian" && OPT_OBSIDIAN=true
echo
# ── Résumé avant install ──────────────────────────────────────────────────────
_wizard_steps 3
local skills_v="Figma(7) · Swift(7) · Flutter(2) · context-audit · arch-diagram"
[ "$OPT_ADDY" = true ] && skills_v="${skills_v} · Addy"
[ "$OPT_A11Y" = true ] && skills_v="${skills_v} · A11y"
[ "$OPT_OBSIDIAN" = true ] && skills_v="${skills_v} · Obsidian"
[ "$OPT_NOTHING" = true ] && skills_v="${skills_v} · Nothing"
[ "$OPT_HUE" = true ] && skills_v="${skills_v} · Hue"
local opts_v="aucun"
[ "$OPT_VPS" = true ] && { [ "$opts_v" = "aucun" ] && opts_v="VPS" || opts_v="${opts_v} · VPS"; }
[ "$OPT_TEAMS" = true ] && { [ "$opts_v" = "aucun" ] && opts_v="Teams" || opts_v="${opts_v} · Teams"; }
[ "$OPT_FIGMA_MCP" = true ] && { [ "$opts_v" = "aucun" ] && opts_v="FigmaMCP" || opts_v="${opts_v} · FigmaMCP"; }
[ "$OPT_STITCH_MCP" = true ] && { [ "$opts_v" = "aucun" ] && opts_v="StitchMCP" || opts_v="${opts_v} · StitchMCP"; }
[ "$OPT_MEMORY" = true ] && { [ "$opts_v" = "aucun" ] && opts_v="Memory" || opts_v="${opts_v} · Memory"; }
local summary_tbl
summary_tbl="Composant|Contenu"
summary_tbl="$summary_tbl"$'\n'"Agents|79 commandes · 8 subagents"
summary_tbl="$summary_tbl"$'\n'"Skills|${skills_v}"
summary_tbl="$summary_tbl"$'\n'"Modules optionnels|${opts_v}"
echo "$summary_tbl" | gum table -p -s "|" \
--border rounded \
--border.foreground 8 \
--header.foreground 6
echo
# ── Confirm ───────────────────────────────────────────────────────────────────
if ! gum confirm " Lancer l'installation ?" --default=yes; then
printf "\n ${WARN} Annulé.\n\n"
exit 0
fi
echo
printf " ${D}────────────────────────────────────────────────${NC}\n"
echo
# ── Lancer l'install ──────────────────────────────────────────────────────────
OPT_WIZARD_DONE=true
cmd_install
}
# ── Install step reporter ──────────────────────────────────────────────────────
_step_ok() {
local label="$1" detail="${2:-}"
if _gum_ok; then
gum style \
" $(gum style --bold --foreground "#A9DC76" "✓") $(gum style --bold --foreground "#FFFDF5" "$(printf "%-20s" "$label")") $(gum style --foreground "#626880" "$detail")"
else
printf " ${OK} %-20s ${D}%s${NC}\n" "$label" "$detail"
fi
}
_step_warn() {
local label="$1" detail="${2:-}"
if _gum_ok; then
gum style \
" $(gum style --foreground "#FFB86C" "○") $(gum style --foreground "#626880" "$(printf "%-20s" "$label")") $(gum style --faint "$detail")"
else
printf " ${WARN} %-20s ${D}%s${NC}\n" "$label" "$detail"
fi
}
# Print a styled section header
_section() {
if _gum_ok; then
echo
gum style \
--background "#313244" --foreground "#CDD6F4" \
--bold --padding "0 2" --margin "0 2" \
" $* "
echo
else
printf "\n ${B}%s${NC}\n\n" "$*"
fi
}
# ── Install ────────────────────────────────────────────────────────────────────
cmd_install() {
if [ "$OPT_WIZARD_DONE" = false ]; then
header
if [ -t 1 ] && ! command -v gum >/dev/null 2>&1; then
printf " ${D}Tip: brew install gum pour l'expérience complète${NC}\n\n"
fi
else
gum style \
--bold --foreground 6 --margin "0 2" \
" 3 / 3 — Installation"
echo
fi
if _gum_ok; then
gum style --foreground 8 --margin "0 2" \
"$(gum style --faint "→") $(gum style --bold --foreground 6 "$ULK_DIR")"
echo
else
printf " ${ARR} Installing to ${D}%s/${NC}\n\n" "$ULK_DIR"
fi
local src="$SCRIPT_DIR/framework/commands"
# Regenerate commands/ from agents/ source of truth
if command -v node >/dev/null 2>&1 && [ -f "$SCRIPT_DIR/framework/cheatheet/generate-commands.cjs" ]; then
if [ "$OPT_DRY" = true ]; then
printf " ${D}[dry-run] node cheatheet/generate-commands.cjs${NC}\n" >&2
elif _gum_ok; then
gum spin --spinner pulse --title "$(gum style --foreground "#FF5F87" "✦") Compilation des agents…" -- \
node "$SCRIPT_DIR/framework/cheatheet/generate-commands.cjs" || warn "Agent compilation failed (non-fatal)"
else
node "$SCRIPT_DIR/framework/cheatheet/generate-commands.cjs" > /dev/null || warn "Agent compilation failed (non-fatal)"
fi
fi
if [ ! -d "$src" ]; then
printf " ${ERR} commands/ not found in %s\n" "$SCRIPT_DIR" >&2
printf " ${D} Run from the ulk repository root.${NC}\n" >&2
exit 1
fi
# Create target dirs
run mkdir -p "$COMMANDS_DIR" "$AGENTS_DIR" "$SKILLS_DIR"
# Remove legacy dirs
local legacy_n=0
for legacy in "$COMMANDS_DIR/woodman" "$COMMANDS_DIR/wm" "$COMMANDS_DIR/ulk-old"; do
if [ -e "$legacy" ] || [ -L "$legacy" ]; then
run rm -rf "$legacy"
legacy_n=$((legacy_n + 1))
fi
done
# Commands
run rm -rf "$ULK_DIR"
run cp -r "$src" "$ULK_DIR"
[ "$OPT_VPS" = false ] && [ -d "$ULK_DIR/vps" ] && run rm -rf "$ULK_DIR/vps"
if _gum_ok; then
echo
gum style --bold --foreground 6 --margin "0 2" " Composants"
echo
fi
local n_cmds
n_cmds=$(find "$src" -name "*.md" | wc -l | tr -d ' ')
_step_ok "Agents" "${n_cmds} commandes"
# Subagents
local n_agents=0
if [ -d "$SCRIPT_DIR/.claude/agents" ]; then
for f in "$SCRIPT_DIR/.claude/agents"/*.md; do
[ -f "$f" ] || continue
local dest
dest="$AGENTS_DIR/ulk-$(basename "$f")"
{ [ -e "$dest" ] || [ -L "$dest" ]; } && run rm -f "$dest"
run cp "$f" "$dest"
n_agents=$((n_agents + 1))
done
fi
_step_ok "Subagents" "${n_agents} memory agents"
# Skills
local n_skills=0
if [ -d "$SCRIPT_DIR/framework/skills" ]; then
for skill_dir in "$SCRIPT_DIR/framework/skills"/*/; do
[ -f "${skill_dir}SKILL.md" ] || continue
local name
name="$(basename "$skill_dir")"
run rm -rf "$SKILLS_DIR/ulk-$name"
run cp -r "$skill_dir" "$SKILLS_DIR/ulk-$name"
n_skills=$((n_skills + 1))
done
fi
_step_ok "Skills ulk" "${n_skills} skills"
# Addyosmani community skills
if [ "$OPT_ADDY" = true ]; then
local n_addy=0
local addy_src="$SCRIPT_DIR/framework/community-skills/addy"
if [ -d "$addy_src" ]; then
for skill_dir in "$addy_src"/*/; do
[ -f "${skill_dir}SKILL.md" ] || continue
local name
name="$(basename "$skill_dir")"
run rm -rf "$SKILLS_DIR/addy-$name"
run cp -r "$skill_dir" "$SKILLS_DIR/addy-$name"
n_addy=$((n_addy + 1))
done
fi
_step_ok "Addy skills" "${n_addy} skills"
fi
# Luxembourg accessibility skills (RAWeb / RAAM)
# Source: geoffreycrofte/luxembourg-accessibility-skillset
if [ "$OPT_A11Y" = true ]; then
local n_a11y=0
local a11y_src="$SCRIPT_DIR/framework/community-skills/a11y"
if [ -d "$a11y_src" ]; then
# Install skill folders (prefixed a11y-)
for skill_dir in "$a11y_src"/*/; do
[ -f "${skill_dir}SKILL.md" ] || continue
local name
name="$(basename "$skill_dir")"
run rm -rf "$SKILLS_DIR/a11y-$name"
run cp -r "$skill_dir" "$SKILLS_DIR/a11y-$name"
n_a11y=$((n_a11y + 1))
done
# Shared references + scripts (must be siblings for CLAUDE_SKILL_DIR/../ paths)
if [ -d "$a11y_src/references" ]; then
run rm -rf "$SKILLS_DIR/references"
run cp -r "$a11y_src/references" "$SKILLS_DIR/references"
fi
if [ -d "$a11y_src/scripts" ]; then
run rm -rf "$SKILLS_DIR/scripts"
run cp -r "$a11y_src/scripts" "$SKILLS_DIR/scripts"
run chmod +x "$SKILLS_DIR/scripts"/*.sh
fi
fi
_step_ok "A11y skills" "${n_a11y} skills (RAWeb + RAAM)"
fi
# Context audit skill (Vesely/skills)
# Source: community-skills/context-audit/ — health score + token-waste analysis for Claude Code setups
_install_context_audit_skill
# Architecture diagram skill (Cocoon-AI) — bundled by default, zero cost, no API
# Source: community-skills/architecture-diagram/ — vendored from github.com/Cocoon-AI/architecture-diagram-generator (MIT)
_install_architecture_diagram_skill
# Figma MCP skills (officiel Figma)
# Source: community-skills/figma/ — vendored from github.com/figma/mcp-server-guide (Figma Terms)
_install_figma_skills
# Optional: configure Figma MCP server
if [ "$OPT_FIGMA_MCP" = true ]; then
_configure_figma_mcp
fi
# Optional: configure Stitch MCP server (Google design AI)
if [ "$OPT_STITCH_MCP" = true ]; then
_configure_stitch_mcp
fi
# Swift/Apple developer skills — skip on --profile web
# Source: community-skills/swift/ — vendored from respective GitHub repos (MIT/Apache)
if [ "$OPT_PROFILE" != "web" ]; then
_install_swift_skills
fi
# Flutter/Dart developer skills — only on --profile mobile|full
# Source: community-skills/flutter/ — vendored from github.com/Harishwarrior/flutter-claude-skills (MIT)
if [ "$OPT_PROFILE" = "mobile" ] || [ "$OPT_PROFILE" = "full" ]; then
_install_flutter_skills
fi
# Kepano/Obsidian skills (obsidian-markdown + defuddle)
# Source: community-skills/kepano/ — MIT licence, crédits Steph Ango (kepano)
if [ "$OPT_OBSIDIAN" = true ]; then
local n_obsidian=0
local kepano_src="$SCRIPT_DIR/framework/community-skills/kepano"
if [ -d "$kepano_src" ]; then
for skill_dir in "$kepano_src"/*/; do
[ -f "${skill_dir}SKILL.md" ] || continue
local name
name="$(basename "$skill_dir")"
run rm -rf "$SKILLS_DIR/kepano-$name"
run cp -r "$skill_dir" "$SKILLS_DIR/kepano-$name"
n_obsidian=$((n_obsidian + 1))
done
fi
_step_ok "Obsidian skills" "${n_obsidian} skills (obsidian-markdown + defuddle)"
fi
# Nothing design skill (dominikmartn)
# Source: community-skills/nothing/ — vendored from github.com/dominikmartn/nothing-design-skill (MIT)
if [ "$OPT_NOTHING" = true ]; then
_install_nothing_skills
fi
# Hue design language generator (dominikmartn)
# Source: community-skills/hue/ — vendored from github.com/dominikmartn/hue (MIT)
if [ "$OPT_HUE" = true ]; then
_install_hue_skill
fi
# Caveman compress skill (JuliusBrussee)
# Source: community-skills/caveman/ — MIT licence, crédits Julius Brussee
if [ "$OPT_CAVEMAN" = true ]; then
_install_caveman_skill
fi
# Logo generator skill (op7418) — Gemini API, opt-in (coût API)
# Source: community-skills/logo-generator/ — vendored from github.com/op7418/logo-generator-skill (MIT)
if [ "$OPT_LOGO_GENERATOR" = true ]; then
_install_logo_generator_skill
fi
# cwb-app-icon skill (Code with Beto) — native Apple adaptation
# Source: community-skills/cwb-app-icon/ — MIT licence, crédits Beto (codewithbeto.dev)
if [ "$OPT_CWB_APP_ICON" = true ]; then
local cwb_src="$SCRIPT_DIR/framework/community-skills/cwb-app-icon"
if [ -d "$cwb_src" ] && [ -f "$cwb_src/SKILL.md" ]; then
run rm -rf "$SKILLS_DIR/cwb-app-icon"
run cp -r "$cwb_src" "$SKILLS_DIR/cwb-app-icon"
_step_ok "cwb-app-icon skill" "SnapAI → native AppIcon (iOS/macOS/watchOS)"
else
_step_warn "cwb-app-icon skill" "community-skills/cwb-app-icon/ introuvable"
fi
fi
# Agent Teams
if [ "$OPT_TEAMS" = true ]; then
_enable_teams
fi
# Memory loop hooks
if [ "$OPT_MEMORY" = true ]; then
_enable_memory_loop
fi
# Xavier context check hook
if [ "$OPT_XAVIER" = true ]; then
_enable_xavier_hook
fi
# CLI telemetry hook
if [ "$OPT_CLI_TELEMETRY" = true ]; then
_enable_cli_telemetry
fi
# Write version + source
run sh -c "printf '%s' '$VERSION' > '$ULK_DIR/.version'"
run sh -c "printf 'https://github.com/%s' '$REPO' > '$ULK_DIR/.source'"
# Legacy cleanup note
[ $legacy_n -gt 0 ] && _step_ok "Cleanup" "${legacy_n} legacy dirs removed"
# ── Options summary ────────────────────────────────────────────────────────────
echo
if _gum_ok; then
local tbl=" |Module|Info"
tbl="$tbl"$'\n'"✓|Figma skills|7 skills — figma-use · implement · code-connect…"
tbl="$tbl"$'\n'"✓|Swift skills|SwiftUI · SwiftData · Concurrency · Testing · A11y…"
tbl="$tbl"$'\n'"✓|Flutter skills|Flutter Tester · OWASP Security"
tbl="$tbl"$'\n'"✓|context-audit|/context-audit — health score 0-100"
tbl="$tbl"$'\n'"✓|arch-diagram|/architecture-diagram — HTML+SVG, \$0, no API"
tbl="$tbl"$'\n'"$([ "$OPT_FIGMA_MCP" = true ] && echo "✓|Figma MCP|configuré" || echo "○|Figma MCP|--with-figma-mcp")"
tbl="$tbl"$'\n'"$([ "$OPT_STITCH_MCP" = true ] && echo "✓|Stitch MCP|configuré" || echo "○|Stitch MCP|--with-stitch-mcp")"
tbl="$tbl"$'\n'"$([ "$OPT_VPS" = true ] && echo "✓|VPS agents|inclus" || echo "○|VPS agents|--with-vps")"
tbl="$tbl"$'\n'"$([ "$OPT_TEAMS" = true ] && echo "✓|Agent Teams|activé" || echo "○|Agent Teams|--with-teams")"
tbl="$tbl"$'\n'"$([ "$OPT_A11Y" = true ] && echo "✓|A11y skills|RAWeb + RAAM" || echo "○|A11y skills|--with-a11y-skills")"
tbl="$tbl"$'\n'"$([ "$OPT_NOTHING" = true ] && echo "✓|Nothing design|inclus" || echo "○|Nothing design|--with-nothing-design")"
tbl="$tbl"$'\n'"$([ "$OPT_HUE" = true ] && echo "✓|Hue|design language generator" || echo "○|Hue|--with-hue-skill")"
tbl="$tbl"$'\n'"$([ "$OPT_LOGO_GENERATOR" = true ] && echo "✓|logo-generator|SVG+PNG logos via Gemini API" || echo "○|logo-generator|--with-logo-generator-skill")"
tbl="$tbl"$'\n'"$([ "$OPT_OBSIDIAN" = true ] && echo "✓|Obsidian skills|obsidian-markdown + defuddle" || echo "○|Obsidian skills|--with-obsidian-skills")"
tbl="$tbl"$'\n'"$([ "$OPT_MEMORY" = true ] && echo "✓|Memory loop|hooks installés" || echo "○|Memory loop|--with-memory-loop")"
tbl="$tbl"$'\n'"$([ "$OPT_XAVIER" = true ] && echo "✓|Xavier hook|SessionStart context check" || echo "○|Xavier hook|--with-xavier-hook")"
tbl="$tbl"$'\n'"$([ "$OPT_CLI_TELEMETRY" = true ] && echo "✓|CLI telemetry|hook installé → ./tools/cli-report.sh" || echo "○|CLI telemetry|--with-cli-telemetry")"
tbl="$tbl"$'\n'"$([ "$OPT_CWB_APP_ICON" = true ] && echo "✓|cwb-app-icon|SnapAI → native AppIcon (iOS/macOS)" || echo "○|cwb-app-icon|--with-cwb-app-icon")"
local _apfel_v="" _ollama_v=""
_apfel_v="$(command -v apfel >/dev/null 2>&1 && apfel --version 2>/dev/null || true)"
_ollama_v="$(command -v ollama >/dev/null 2>&1 && ollama --version 2>/dev/null | awk '{print $NF}' || true)"
if [ -n "$_apfel_v" ] || [ -n "$_ollama_v" ]; then
local _llm_detail=""
[ -n "$_apfel_v" ] && _llm_detail="apfel"
[ -n "$_ollama_v" ] && { [ -n "$_llm_detail" ] && _llm_detail="${_llm_detail} · ollama gemma3:1b" || _llm_detail="ollama gemma3:1b"; }
tbl="$tbl"$'\n'"✓|LLM local|${_llm_detail} — micro-tasks, 0 Claude tokens"
else
tbl="$tbl"$'\n'"○|LLM local|brew install Arthur-Ficial/tap/apfel · brew install ollama"
fi
echo "$tbl" | gum table -p -s "|" \
--border rounded \
--border.foreground 8 \
--header.foreground 6
else
printf " ${D}Options:${NC}\n"
printf " ${OK} Figma skills 7 skills — figma-use · implement · code-connect…\n"
[ "$OPT_PROFILE" != "web" ] && \
printf " ${OK} Swift skills SwiftUI · SwiftData · Testing · A11y…\n" || \
printf " ${WARN} Swift skills ${D}skipped (profile: web)${NC}\n"
{ [ "$OPT_PROFILE" = "mobile" ] || [ "$OPT_PROFILE" = "full" ]; } && \
printf " ${OK} Flutter skills Testing · OWASP Security\n" || \
printf " ${WARN} Flutter skills ${D}skipped (profile: %s)${NC}\n" "$OPT_PROFILE"
printf " ${OK} context-audit /context-audit — health score 0-100\n"
printf " ${OK} arch-diagram /architecture-diagram — HTML+SVG, \$0, no API\n"
[ "$OPT_FIGMA_MCP" = true ] \
&& printf " ${OK} Figma MCP configuré\n" \
|| printf " ${WARN} Figma MCP ${D}--with-figma-mcp${NC}\n"
[ "$OPT_STITCH_MCP" = true ] \
&& printf " ${OK} Stitch MCP configuré\n" \
|| printf " ${WARN} Stitch MCP ${D}--with-stitch-mcp${NC}\n"
[ "$OPT_VPS" = true ] && printf " ${OK} VPS agents inclus\n" || printf " ${WARN} VPS agents ${D}--with-vps${NC}\n"
[ "$OPT_TEAMS" = true ] && printf " ${OK} Agent Teams activé\n" || printf " ${WARN} Agent Teams ${D}--with-teams${NC}\n"
[ "$OPT_A11Y" = true ] && printf " ${OK} A11y skills RAWeb + RAAM\n" || printf " ${WARN} A11y skills ${D}--with-a11y-skills${NC}\n"
[ "$OPT_NOTHING" = true ] && printf " ${OK} Nothing design inclus\n" || printf " ${WARN} Nothing design ${D}--with-nothing-design${NC}\n"
[ "$OPT_HUE" = true ] && printf " ${OK} Hue inclus\n" || printf " ${WARN} Hue ${D}--with-hue-skill${NC}\n"
[ "$OPT_OBSIDIAN" = true ] && printf " ${OK} Obsidian skills inclus\n" || printf " ${WARN} Obsidian skills ${D}--with-obsidian-skills${NC}\n"
[ "$OPT_MEMORY" = true ] && printf " ${OK} Memory loop installé\n" || printf " ${WARN} Memory loop ${D}--with-memory-loop${NC}\n"
[ "$OPT_XAVIER" = true ] && printf " ${OK} Xavier hook SessionStart context check\n" || printf " ${WARN} Xavier hook ${D}--with-xavier-hook${NC}\n"
[ "$OPT_CLI_TELEMETRY" = true ] && printf " ${OK} CLI telemetry hook installé → ./tools/cli-report.sh\n" || printf " ${WARN} CLI telemetry ${D}--with-cli-telemetry${NC}\n"
[ "$OPT_CWB_APP_ICON" = true ] && printf " ${OK} cwb-app-icon SnapAI → native AppIcon (iOS/macOS)\n" || printf " ${WARN} cwb-app-icon ${D}--with-cwb-app-icon${NC}\n"
[ "$OPT_LOGO_GENERATOR" = true ] && printf " ${OK} logo-generator SVG+PNG logos via Gemini API\n" || printf " ${WARN} logo-generator ${D}--with-logo-generator-skill${NC}\n"
if command -v apfel >/dev/null 2>&1 || command -v ollama >/dev/null 2>&1; then
printf " ${OK} LLM local micro-tasks, 0 Claude tokens\n"
else
printf " ${WARN} LLM local ${D}brew install Arthur-Ficial/tap/apfel · brew install ollama${NC}\n"
fi
fi
if [ "$OPT_DRY" = true ]; then
echo
printf " ${Y}${B}Dry-run — nothing was changed.${NC}\n"
echo
return
fi
# ── Success box ───────────────────────────────────────────────────────────────
local n_total_skills
n_total_skills=$(ls -d "$SKILLS_DIR"/*/ 2>/dev/null | wc -l | tr -d ' ')
echo
if _gum_ok; then
local _mods=""
[ "$OPT_FIGMA_MCP" = true ] && _mods="${_mods}$(gum style --foreground "#AF5FFF" " ✦ Figma MCP")\n"
[ "$OPT_TEAMS" = true ] && _mods="${_mods}$(gum style --foreground "#AF5FFF" " ✦ Agent Teams")\n"
[ "$OPT_VPS" = true ] && _mods="${_mods}$(gum style --foreground "#AF5FFF" " ✦ VPS agents")\n"
[ "$OPT_MEMORY" = true ] && _mods="${_mods}$(gum style --foreground "#AF5FFF" " ✦ Memory loop")\n"
[ "$OPT_A11Y" = true ] && _mods="${_mods}$(gum style --foreground "#AF5FFF" " ✦ A11y skills")\n"
[ "$OPT_NOTHING" = true ] && _mods="${_mods}$(gum style --foreground "#AF5FFF" " ✦ Nothing design")\n"
[ "$OPT_OBSIDIAN" = true ] && _mods="${_mods}$(gum style --foreground "#AF5FFF" " ✦ Obsidian skills")\n"
[ -z "$_mods" ] && _mods="$(gum style --faint --foreground "#626880" " installation de base")\n"
gum style \
--border double \
--border-foreground "#FF5F87" \
--padding "1 5" \
--margin "1 2" \
--align center \
"$(gum style --bold --foreground "#FF5F87" "✨ Vous êtes prêt ✨")" \
"$(gum style --foreground "#626880" "v${VERSION} · $(date +%Y-%m-%d)")" \
"" \
"$(gum style --foreground "#FFFDF5" "$(printf "%-10s" "Agents") $(gum style --foreground "#5FAFFF" "${n_cmds} commandes") · $(gum style --foreground "#5FAFFF" "${n_agents} subagents")")" \
"$(gum style --foreground "#FFFDF5" "$(printf "%-10s" "Skills") $(gum style --foreground "#5FAFFF" "${n_total_skills} installées")")" \
"" \
"$(printf "%b" "$_mods")" \
"" \
"$(gum style --bold --foreground "#AF5FFF" "/ulk:bruce")$(gum style --foreground "#626880" " — commencez ici")" \
"$(gum style --faint --foreground "#626880" "./install.sh --status · git pull && ./install.sh")"
else
echo
printf " ${G}${B}✓ Vous êtes prêt${NC} ${D}v%s${NC}\n\n" "$VERSION"
printf " Agents : %s commandes · %s subagents\n" "$n_cmds" "$n_agents"
printf " Skills : %s installées\n\n" "$n_total_skills"
printf " ${C}/ulk:bruce${NC} — commencez ici\n"
fi
echo
# ── Git hooks ─────────────────────────────────────────────────────────────────
if [ -d "$SCRIPT_DIR/.git" ] && [ -f "$SCRIPT_DIR/.hooks/pre-commit" ]; then
cp "$SCRIPT_DIR/.hooks/pre-commit" "$SCRIPT_DIR/.git/hooks/pre-commit"
chmod +x "$SCRIPT_DIR/.git/hooks/pre-commit"
_step_ok "Git hooks" "pre-commit shellcheck installé"
fi
# ── Post-install CLI hint ─────────────────────────────────────────────────────
local registry="$SCRIPT_DIR/framework/tools/cli-registry.json"
local check_script="$SCRIPT_DIR/framework/tools/check-tools.py"
if [ -f "$registry" ] && command -v python3 >/dev/null 2>&1 && [ -f "$check_script" ]; then
python3 "$check_script" "$registry" --missing-recommended ${NO_COLOR+--no-color} || true
echo
fi
}
# ── Modules ───────────────────────────────────────────────────────────────────
source "${SCRIPT_DIR}/framework/install/skills.sh"
source "${SCRIPT_DIR}/framework/install/uninstall.sh"
source "${SCRIPT_DIR}/framework/install/check.sh"
# ── Dispatch ───────────────────────────────────────────────────────────────────
case "$MODE" in
install)
if _should_wizard; then
cmd_wizard
else
cmd_install
fi
;;
uninstall) cmd_uninstall ;;
check) cmd_check ;;
verify) cmd_verify ;;
install-deps) cmd_install_deps ;;
status) cmd_status ;;
help) cmd_help ;;
esac