@sebastienrousseau/dotfiles 0.2.503 → 0.2.505

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/CHANGELOG.md +86 -1
  2. package/README.md +5 -5
  3. package/docs/COPYRIGHT +1 -1
  4. package/docs/OPENCODE.md +1 -1
  5. package/docs/index.md +2 -2
  6. package/docs/interop/A2A.md +2 -2
  7. package/docs/manual/00-introduction.md +1 -1
  8. package/docs/manual/02-tutorials/01-first-install.md +1 -1
  9. package/docs/operations/RELEASE_PIPELINE.md +3 -3
  10. package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +6 -6
  11. package/docs/security/AUTOMATION_SECRETS.md +1 -1
  12. package/docs/security/MCP_POLICY.md +4 -4
  13. package/docs/security/SECURITY_CHECKLIST.md +1 -1
  14. package/docs/security/SOUP_REGISTER.md +4 -4
  15. package/install.sh +98 -6
  16. package/package.json +1 -1
  17. package/scripts/README.md +3 -3
  18. package/scripts/ci/check-copyright-headers.sh +3 -2
  19. package/scripts/ci/check-shell-preamble.sh +3 -2
  20. package/scripts/ci/guard-gitleaks-checkout.sh +3 -2
  21. package/scripts/demo/record.sh +2 -1
  22. package/scripts/diagnostics/a2a-conformance.sh +2 -1
  23. package/scripts/diagnostics/alias-governance.sh +2 -1
  24. package/scripts/diagnostics/aliases-cheatsheet.sh +2 -1
  25. package/scripts/diagnostics/aliases-manifest.sh +2 -1
  26. package/scripts/diagnostics/benchmark.sh +3 -2
  27. package/scripts/diagnostics/conflicts.sh +2 -1
  28. package/scripts/diagnostics/doctor-unified.sh +3 -2
  29. package/scripts/diagnostics/doctor.sh +2 -1
  30. package/scripts/diagnostics/drift-dashboard.sh +2 -1
  31. package/scripts/diagnostics/health.sh +2 -1
  32. package/scripts/diagnostics/history-analysis.sh +2 -1
  33. package/scripts/diagnostics/mcp-doctor.sh +2 -1
  34. package/scripts/diagnostics/perf.sh +3 -2
  35. package/scripts/diagnostics/scorecard.sh +2 -1
  36. package/scripts/diagnostics/secret-governance.sh +2 -1
  37. package/scripts/diagnostics/security-score.sh +25 -5
  38. package/scripts/diagnostics/smoke-test.sh +2 -1
  39. package/scripts/diagnostics/snapshot.sh +2 -1
  40. package/scripts/diagnostics/verify.sh +2 -1
  41. package/scripts/diagnostics/verify_state.sh +2 -1
  42. package/scripts/diagnostics/version-locks.sh +13 -2
  43. package/scripts/diagnostics/workstation-attestation.sh +2 -1
  44. package/scripts/dot/commands/agent.sh +2 -1
  45. package/scripts/dot/commands/agents.sh +2 -1
  46. package/scripts/dot/commands/ai.sh +19 -33
  47. package/scripts/dot/commands/aliases.sh +2 -1
  48. package/scripts/dot/commands/appearance.sh +2 -1
  49. package/scripts/dot/commands/core.sh +2 -1
  50. package/scripts/dot/commands/diagnostics.sh +2 -1
  51. package/scripts/dot/commands/env-emit.sh +2 -1
  52. package/scripts/dot/commands/fleet.sh +12 -6
  53. package/scripts/dot/commands/init.sh +2 -1
  54. package/scripts/dot/commands/lint.sh +2 -1
  55. package/scripts/dot/commands/manual.sh +2 -1
  56. package/scripts/dot/commands/meta.sh +2 -1
  57. package/scripts/dot/commands/patterns.sh +2 -1
  58. package/scripts/dot/commands/registry.sh +2 -1
  59. package/scripts/dot/commands/restore.sh +2 -1
  60. package/scripts/dot/commands/secrets.sh +2 -1
  61. package/scripts/dot/commands/security.sh +2 -1
  62. package/scripts/dot/commands/tools.sh +2 -1
  63. package/scripts/fonts/install-nerd-fonts.sh +2 -1
  64. package/scripts/fonts/patch-fonts.sh +2 -1
  65. package/scripts/git-hooks/install.sh +2 -1
  66. package/scripts/git-hooks/pre-commit-audit.sh +4 -3
  67. package/scripts/lib/secrets_provider.sh +2 -1
  68. package/scripts/ops/ai-setup.sh +2 -1
  69. package/scripts/ops/bundle.sh +3 -2
  70. package/scripts/ops/chaos.sh +2 -1
  71. package/scripts/ops/chezmoi-apply.sh +19 -5
  72. package/scripts/ops/chezmoi-diff.sh +2 -1
  73. package/scripts/ops/chezmoi-remove.sh +2 -1
  74. package/scripts/ops/chezmoi-update.sh +2 -1
  75. package/scripts/ops/heal-chezmoi.sh +2 -1
  76. package/scripts/ops/heal-system.sh +2 -1
  77. package/scripts/ops/heal-tools.sh +2 -1
  78. package/scripts/ops/heal.sh +2 -1
  79. package/scripts/ops/post-apply-repair.sh +2 -1
  80. package/scripts/ops/prewarm.sh +2 -1
  81. package/scripts/ops/release.sh +2 -1
  82. package/scripts/ops/rollback.sh +2 -1
  83. package/scripts/ops/setup.sh +2 -1
  84. package/scripts/ops/teleport.sh +2 -1
  85. package/scripts/qa/check-version-consistency.sh +2 -1
  86. package/scripts/qa/coverage-baseline.sh +2 -1
  87. package/scripts/qa/docs-coverage.sh +2 -1
  88. package/scripts/qa/reliability-audit.sh +2 -1
  89. package/scripts/qa/scorecard-snapshot.sh +2 -1
  90. package/scripts/qa/traceability-coverage.sh +2 -1
  91. package/scripts/qa/validate-examples.sh +2 -1
  92. package/scripts/qa/wsl-contract.sh +2 -1
  93. package/scripts/secrets/age-init.sh +2 -1
  94. package/scripts/secrets/create-secrets-file.sh +2 -1
  95. package/scripts/secrets/encrypt-ssh-key.sh +2 -1
  96. package/scripts/security/backup.sh +2 -1
  97. package/scripts/security/check-disclosure-key-expiry.sh +2 -1
  98. package/scripts/security/dns-doh.sh +2 -1
  99. package/scripts/security/encryption-check.sh +2 -1
  100. package/scripts/security/enforce-policies.sh +2 -1
  101. package/scripts/security/firewall.sh +2 -1
  102. package/scripts/security/lock-configs.sh +2 -1
  103. package/scripts/security/lock-screen.sh +2 -1
  104. package/scripts/security/manage-secrets.sh +2 -1
  105. package/scripts/security/ssh-cert.sh +2 -1
  106. package/scripts/security/telemetry-kill.sh +2 -1
  107. package/scripts/security/usb-safety.sh +2 -1
  108. package/scripts/theme/apply-gnome-theme.sh +2 -1
  109. package/scripts/theme/extract-heic-frames.sh +2 -1
  110. package/scripts/theme/extract-theme.py +2 -1
  111. package/scripts/theme/install-boot-logo.sh +2 -1
  112. package/scripts/theme/install-catppuccin-themes.sh +2 -1
  113. package/scripts/theme/install-cursors.sh +2 -1
  114. package/scripts/theme/install-file-icons.sh +2 -1
  115. package/scripts/theme/install-grub-theme.sh +2 -1
  116. package/scripts/theme/install-lock-icon.sh +2 -1
  117. package/scripts/theme/merge-wallpaper.sh +2 -1
  118. package/scripts/theme/rebuild-themes.sh +26 -3
  119. package/scripts/theme/switch.sh +3 -2
  120. package/scripts/theme/wallpaper-rotate.sh +2 -1
  121. package/scripts/theme/wallpaper-sync.sh +3 -2
  122. package/scripts/tools/cmatrix.sh +2 -1
  123. package/scripts/tools/detect-collisions.py +2 -1
  124. package/scripts/tools/emoji-picker.sh +2 -1
  125. package/scripts/tools/figlet-banner.sh +2 -1
  126. package/scripts/tools/log-rotate.sh +2 -1
  127. package/scripts/tools/lolcat-wrap.sh +2 -1
  128. package/scripts/tools/pipes.sh +2 -1
  129. package/scripts/tuning/linux.sh +2 -1
  130. package/scripts/tuning/macos.sh +2 -1
  131. package/scripts/uninstall.sh +2 -1
  132. package/scripts/version-sync.sh +21 -4
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  ## Shell Performance Benchmark.
4
5
  ##
5
6
  ## Measures shell startup time with per-component profiling. Uses hyperfine
@@ -41,7 +42,7 @@
41
42
  set -euo pipefail
42
43
 
43
44
  _cleanup_files=()
44
- trap 'rm -f "${_cleanup_files[@]}"' EXIT
45
+ trap 'set +u; rm -f "${_cleanup_files[@]}" 2>/dev/null; set -u' EXIT
45
46
 
46
47
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
47
48
  # shellcheck source=../../lib/dot/ui.sh
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Alias/Command Conflicts Report
4
5
  # Usage: dot conflicts
5
6
 
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Unified doctor orchestrator — parses flags and dispatches to existing scripts.
4
5
  set -euo pipefail
5
6
 
6
7
  _cleanup_files=()
7
- trap 'rm -f "${_cleanup_files[@]}"' EXIT
8
+ trap 'set +u; rm -f "${_cleanup_files[@]}" 2>/dev/null; set -u' EXIT
8
9
 
9
10
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10
11
  REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  ## Dotfiles Doctor.
4
5
  ##
5
6
  ## Diagnoses dotfiles environment health by checking dependencies, paths,
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # =============================================================================
4
5
  # drift-dashboard.sh — Consolidated drift report.
5
6
  #
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles Health Check Dashboard
4
5
  # Usage: dot health [--verbose|-v] [--json|-j] [--fix|-f] [--force|-F]
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  set -euo pipefail
4
5
 
5
6
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  ## MCP configuration diagnostics and hardening checks.
4
5
  ##
5
6
  ## Validates MCP (Model Context Protocol) server configurations for security
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Shell Performance Profiling
4
5
  # Usage: dot perf [--json|-j] [--profile|-p] [--runs|-r N] [--target|-t MS]
5
6
 
6
7
  set -euo pipefail
7
8
 
8
9
  _cleanup_files=()
9
- trap 'rm -f "${_cleanup_files[@]}"' EXIT
10
+ trap 'set +u; rm -f "${_cleanup_files[@]}" 2>/dev/null; set -u' EXIT
10
11
 
11
12
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12
13
  # shellcheck source=../../lib/dot/ui.sh
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles Scorecard
4
5
  # Usage: dot scorecard [--json|-j]
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  set -euo pipefail
4
5
 
5
6
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  ## Security Score Assessment.
4
5
  ##
5
6
  ## Evaluates system security posture across encryption, SSH, Git, system
@@ -64,7 +65,25 @@ YELLOW="${YELLOW:-}"
64
65
  # Scoring
65
66
  TOTAL_POINTS=0
66
67
  MAX_POINTS=0
67
- declare -A CATEGORY_SCORES
68
+ # Parallel indexed arrays instead of `declare -A` (bash 4+; macOS ships
69
+ # bash 3.2). CAT_NAMES[i] holds a category name, CAT_SCORES[i] its running
70
+ # total. Category names can contain spaces, so an emulation via dynamic
71
+ # variable names wouldn't work — a linear scan over the handful of
72
+ # categories is fine.
73
+ CAT_NAMES=()
74
+ CAT_SCORES=()
75
+
76
+ _cat_add() {
77
+ local name="$1" pts="$2" i
78
+ for ((i = 0; i < ${#CAT_NAMES[@]}; i++)); do
79
+ if [[ "${CAT_NAMES[$i]}" == "$name" ]]; then
80
+ CAT_SCORES[i]=$((CAT_SCORES[i] + pts))
81
+ return 0
82
+ fi
83
+ done
84
+ CAT_NAMES+=("$name")
85
+ CAT_SCORES+=("$pts")
86
+ }
68
87
 
69
88
  add_points() {
70
89
  local category="$1"
@@ -74,7 +93,7 @@ add_points() {
74
93
 
75
94
  TOTAL_POINTS=$((TOTAL_POINTS + points))
76
95
  MAX_POINTS=$((MAX_POINTS + max))
77
- CATEGORY_SCORES["$category"]=$((${CATEGORY_SCORES[$category]:-0} + points))
96
+ _cat_add "$category" "$points"
78
97
 
79
98
  if ! $JSON_OUTPUT && $VERBOSE; then
80
99
  local icon
@@ -339,10 +358,11 @@ print_summary() {
339
358
  echo " \"grade\": \"$(get_grade $score)\","
340
359
  echo " \"categories\": {"
341
360
  local first=true
342
- for cat in "${!CATEGORY_SCORES[@]}"; do
361
+ local _ci
362
+ for ((_ci = 0; _ci < ${#CAT_NAMES[@]}; _ci++)); do
343
363
  $first || echo ","
344
364
  first=false
345
- printf " \"%s\": %d" "$cat" "${CATEGORY_SCORES[$cat]}"
365
+ printf " \"%s\": %d" "${CAT_NAMES[$_ci]}" "${CAT_SCORES[$_ci]}"
346
366
  done
347
367
  echo ""
348
368
  echo " }"
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Smoke tests to quickly verify toolchain health after installation/updates.
4
5
 
5
6
  set -euo pipefail
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Snapshot current system/tooling state
4
5
  # Usage: dot snapshot [--baseline|-b] [--force|-f]
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles post-merge verification checks
4
5
  # Runs doctor + status + diff checks and exits non-zero on issues.
5
6
 
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
  # MIT License
3
- # Copyright (c) 2026
3
+ # SPDX-License-Identifier: MIT
4
+ # Copyright (c) 2015-2026 Sebastien Rousseau
4
5
  # See LICENSE file for details.
5
6
 
6
7
  # Script: verify_state.sh
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Version Locks Summary
4
5
  # Usage: dot locks
5
6
 
@@ -30,10 +31,20 @@ resolve_source_dir() {
30
31
 
31
32
  src_dir=$(resolve_source_dir)
32
33
 
34
+ # resolve_source_dir returns the repo root, but since the defaults/ reorg the
35
+ # deployable tree lives under the .chezmoiroot subdir (defaults/). Descend
36
+ # into it so paths like dot_config/... resolve. (Without this the mise lookup
37
+ # below silently reported "config not found" on every run.)
38
+ cm_src="$src_dir"
39
+ if [[ -f "$src_dir/.chezmoiroot" ]]; then
40
+ _cm_root="$(tr -d '[:space:]' <"$src_dir/.chezmoiroot")"
41
+ [[ -n "$_cm_root" && -d "$src_dir/$_cm_root" ]] && cm_src="$src_dir/$_cm_root"
42
+ fi
43
+
33
44
  ui_header "Version Locks"
34
45
 
35
46
  ui_section "mise toolchain"
36
- mise_config="$src_dir/dot_config/mise/config.toml"
47
+ mise_config="$cm_src/dot_config/mise/conf.d/00-dotfiles.toml"
37
48
  if [[ -f "$mise_config" ]]; then
38
49
  awk -F= '
39
50
  /^\[tools\]/ {in_tools=1; next}
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  ## Workstation attestation export.
4
5
  ##
5
6
  ## Produces a machine-readable evidence record for the current dotfiles
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles CLI - Agent Mode Commands (extracted from meta.sh)
4
5
  # mode list|current|show|set|run|doctor|card|log|checkpoint|conformance
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # shellcheck shell=bash
4
5
  #
5
6
  # scripts/dot/commands/agents.sh
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  ## Dotfiles AI Commands.
4
5
  ##
5
6
  ## Provides AI CLI status, setup, RAG query, and bridge commands.
@@ -53,7 +54,8 @@ _ai_extract_version() {
53
54
  }
54
55
 
55
56
  _ai_refresh_status_cache() {
56
- local -n ai_entries=$1
57
+ # Entries passed by value (not a `local -n` nameref — bash 4.3+; macOS bash is 3.2).
58
+ local ai_entries=("$@")
57
59
  local tmp_file
58
60
  tmp_file="$(mktemp)"
59
61
  mkdir -p "$AI_CACHE_DIR"
@@ -134,27 +136,14 @@ _ai_get_cached_status() {
134
136
  cat "$AI_STATUS_CACHE_FILE"
135
137
  }
136
138
 
137
- # binary -> mise package mapping
138
- _ai_mise_pkg() {
139
- case "$1" in
140
- claude) echo "npm:@anthropic-ai/claude-code" ;;
141
- codex) echo "npm:@openai/codex" ;;
142
- copilot) echo "npm:@github/copilot" ;;
143
- goose) echo "pipx:goose-ai" ;;
144
- aider) echo "pipx:aider-chat" ;;
145
- opencode) echo "npm:opencode-ai" ;;
146
- sgpt) echo "pipx:shell-gpt" ;;
147
- gemini) echo "npm:@google/gemini-cli" ;;
148
- ollama) echo "aqua:ollama/ollama" ;;
149
- kiro-cli) echo "kiro-cli" ;;
150
- autohand) echo "npm:autohand-cli" ;;
151
- vibe) echo "pipx:mistral-vibe" ;;
152
- qwen) echo "npm:@qwen-code/qwen-code" ;;
153
- zai) echo "npm:@guizmo-ai/zai-cli" ;;
154
- *) echo "" ;;
155
- esac
139
+ # Look up field $2 (2=present 0/1, 3=version) for binary $1 from the
140
+ # cached TSV. Replaces a bash-4 associative array for macOS bash 3.2.
141
+ _ai_status_field() {
142
+ awk -F'\t' -v b="$1" -v f="$2" '$1==b{print $f;exit}' "$AI_STATUS_CACHE_FILE" 2>/dev/null
156
143
  }
157
144
 
145
+ # _ai_mise_pkg (binary -> mise package map) is defined in lib/dot/ai-install.sh.
146
+
158
147
  cmd_ai_status() {
159
148
  ui_header "AI CLI Status"
160
149
 
@@ -177,17 +166,9 @@ cmd_ai_status() {
177
166
  )
178
167
 
179
168
  if ! _ai_cache_fresh "$AI_STATUS_CACHE_FILE"; then
180
- _ai_refresh_status_cache ai_clis
169
+ _ai_refresh_status_cache "${ai_clis[@]}"
181
170
  fi
182
171
 
183
- declare -A ai_present=()
184
- declare -A ai_version=()
185
- local cached_bin cached_present cached_version
186
- while IFS=$'\t' read -r cached_bin cached_present cached_version; do
187
- ai_present["$cached_bin"]="$cached_present"
188
- ai_version["$cached_bin"]="$cached_version"
189
- done < <(_ai_get_cached_status)
190
-
191
172
  local -a installed=()
192
173
  local -a missing=()
193
174
  local current_category=""
@@ -199,8 +180,9 @@ cmd_ai_status() {
199
180
  ui_section "$category"
200
181
  current_category="$category"
201
182
  fi
202
- if [[ "${ai_present[$bin]:-0}" == "1" ]]; then
203
- ver="${ai_version[$bin]:-installed}"
183
+ if [[ "$(_ai_status_field "$bin" 2)" == "1" ]]; then
184
+ ver="$(_ai_status_field "$bin" 3)"
185
+ [[ -z "$ver" ]] && ver="installed"
204
186
  [[ "$bin" == "claude" ]] && ver="${ver%% *}"
205
187
  ui_ok "$name" "$ver — $desc"
206
188
  installed+=("$name|$bin|$role")
@@ -254,6 +236,10 @@ cmd_ai_status() {
254
236
  echo ""
255
237
  for entry in "${_ai_to_install[@]}"; do
256
238
  IFS='|' read -r name bin <<<"$entry"
239
+ if [[ "$bin" == "claude" ]]; then
240
+ install_claude_native "$name"
241
+ continue
242
+ fi
257
243
  local pkg
258
244
  pkg=$(_ai_mise_pkg "$bin")
259
245
  if [[ -n "$pkg" ]]; then
@@ -334,7 +320,7 @@ cmd_ai_delegate() {
334
320
  # Usage: dot ai delegate "<prompt>" [max-turns] [agent] [timeout]
335
321
  if [[ $# -lt 1 ]]; then
336
322
  ui_err "Usage" "dot ai delegate \"<prompt>\" [max-turns] [agent] [timeout-secs]"
337
- ui_info "Example" "dot ai delegate \"add a CHANGELOG entry for v0.2.504\""
323
+ ui_info "Example" "dot ai delegate \"add a CHANGELOG entry for v0.2.505\""
338
324
  return 1
339
325
  fi
340
326
  local prompt="$1"
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles CLI - Aliases Commands (extracted from tools.sh)
4
5
  # aliases list|search|why|stats|cheatsheet|tiers, alias-check
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles CLI - Appearance Commands
4
5
  # theme, wallpaper, fonts, tune
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  ## Dotfiles Core Commands — Core chezmoi operations for the dot CLI.
4
5
  ##
5
6
  ## Provides apply, sync, update, add, diff, status, remove, cd, and edit
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles CLI - Diagnostics Commands
4
5
  # doctor, heal, health, rollback, drift, history, benchmark, verify, perf,
5
6
  # scorecard, conflicts, locks, snapshot, load-bench, chaos, bundle, attest
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  #
4
5
  # `dot env emit` — render a portable workstation-environment
5
6
  # manifest. The output is the canonical "what is installed on this
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles CLI - Fleet Commands
4
5
  # fleet status|nodes|drift|events|namespace
5
6
 
@@ -583,16 +584,21 @@ EOF
583
584
  fi
584
585
  }
585
586
 
586
- local running=0
587
+ # Throttle to `jobs` concurrent workers. `wait -n` (wait for the next
588
+ # job to finish) is bash 4.3+, but macOS ships bash 3.2 — there it
589
+ # silently fails and the throttle collapses to unbounded parallelism.
590
+ # Track PIDs and block on the oldest when at capacity instead; works on
591
+ # bash 3.2 and 4+ alike.
592
+ local _pids=()
587
593
  while IFS=$'\t' read -r name ssh profile; do
588
594
  [[ -n "$name" && -n "$ssh" ]] || continue
589
595
  total=$((total + 1))
590
- while ((running >= jobs)); do
591
- wait -n 2>/dev/null || break
592
- running=$((running - 1))
596
+ while ((${#_pids[@]} >= jobs)); do
597
+ wait "${_pids[0]}" 2>/dev/null || true
598
+ _pids=("${_pids[@]:1}")
593
599
  done
594
600
  _fleet_apply_one "$name" "$ssh" "$effective_cmd" "$tmpdir" &
595
- running=$((running + 1))
601
+ _pids+=("$!")
596
602
  done <<<"$entries"
597
603
  wait
598
604
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # shellcheck shell=bash
4
5
  #
5
6
  # scripts/dot/commands/init.sh
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles CLI - Lint Command
4
5
  # Wraps shellcheck and shfmt with project-specific flags
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # dot manual — open or download the dotfiles manual in multiple formats.
4
5
  #
5
6
  # Usage:
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles CLI - Meta Commands
4
5
  # upgrade, prewarm, docs, learn, keys, sandbox, mcp, mode, agent
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # AI Steering Patterns Management.
4
5
  # Usage: dot patterns [list|view|edit] [name]
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # shellcheck shell=bash
4
5
  #
5
6
  # scripts/dot/commands/registry.sh
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # dot restore - Restore dotfiles from backup or previous state
4
5
  # Usage: dot restore [--list|-l|--latest|-L|<backup-id>]
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles CLI - Secrets/Env Commands
4
5
  # secrets-init, secrets, secrets-create, ssh-key, env load
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles CLI - Security Commands
4
5
  # backup, encrypt-check, firewall, telemetry, dns-doh, lock-screen, usb-safety
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles CLI - Tools Commands
4
5
  # tools, new, packages, log-rotate, aliases, alias-check, env, profile
5
6
 
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  set -euo pipefail
4
5
 
5
6
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  set -euo pipefail
4
5
 
5
6
  if [[ $# -lt 1 ]]; then
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  set -euo pipefail
4
5
 
5
6
  repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Dotfiles Pre-Commit Sentinel (Audit Hook)
4
5
  # Prevents secrets, hardcoded paths, and shell hygiene violations.
5
6
 
6
7
  set -euo pipefail
7
8
 
8
9
  _cleanup_files=()
9
- trap 'rm -f "${_cleanup_files[@]}"' EXIT
10
+ trap 'set +u; rm -f "${_cleanup_files[@]}" 2>/dev/null; set -u' EXIT
10
11
 
11
12
  # ANSI Colors
12
13
  RED='\033[0;31m'
@@ -140,6 +141,6 @@ if [[ $FAILED -eq 1 ]]; then
140
141
  printf '%b\\n' " (Use --no-verify to bypass if absolutely necessary)"
141
142
  exit 1
142
143
  else
143
- printf '%b\n' "${GREEN}${BOLD}✅ Audit passed.${NC} v0.2.503 standards maintained."
144
+ printf '%b\n' "${GREEN}${BOLD}✅ Audit passed.${NC} v0.2.505 standards maintained."
144
145
  exit 0
145
146
  fi
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Provider-agnostic secrets bridge for dotfiles.
4
5
 
5
6
  set -euo pipefail
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Universal AI Toolchain Setup & Authentication.
4
5
 
5
6
  set -euo pipefail
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env bash
2
- # Copyright (c) 2015-2026 Dotfiles. All rights reserved.
2
+ # SPDX-License-Identifier: MIT
3
+ # Copyright (c) 2015-2026 Sebastien Rousseau
3
4
  # Create an offline bundle of the dotfiles environment for air-gapped systems.
4
5
 
5
6
  set -euo pipefail
6
7
 
7
8
  _cleanup_files=()
8
- trap 'rm -f "${_cleanup_files[@]}"' EXIT
9
+ trap 'set +u; rm -f "${_cleanup_files[@]}" 2>/dev/null; set -u' EXIT
9
10
 
10
11
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
11
12
  # shellcheck disable=SC1091