@sebastienrousseau/dotfiles 0.2.519 → 0.2.521

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 (306) hide show
  1. package/CHANGELOG.md +200 -0
  2. package/LICENSE-APACHE +190 -0
  3. package/{LICENSE → LICENSE-MIT} +1 -1
  4. package/README.md +1172 -166
  5. package/install.sh +77 -11
  6. package/package.json +8 -8
  7. package/tools/README.md +49 -0
  8. package/tools/ci/install-chezmoi-verified.sh +68 -0
  9. package/docs/.vitepress/reports/localization-readability-audit.md +0 -73
  10. package/docs/AI.md +0 -179
  11. package/docs/CNAME +0 -1
  12. package/docs/CONFIG_STRATEGY.md +0 -124
  13. package/docs/COPYRIGHT +0 -7
  14. package/docs/GOVERNANCE.md +0 -98
  15. package/docs/MAINTAINERS.md +0 -41
  16. package/docs/NAMING_CONVENTIONS.md +0 -102
  17. package/docs/OPENCODE.md +0 -127
  18. package/docs/README.md +0 -84
  19. package/docs/STRUCTURE.md +0 -102
  20. package/docs/adr/ADR-001-ci-cd-pipeline.md +0 -118
  21. package/docs/adr/ADR-002-shell-performance.md +0 -130
  22. package/docs/adr/ADR-003-security-first.md +0 -158
  23. package/docs/adr/ADR-004-cli-architecture.md +0 -171
  24. package/docs/adr/ADR-005-chezmoi-choice.md +0 -99
  25. package/docs/adr/ADR-006-shell-selection.md +0 -124
  26. package/docs/adr/ADR-007-multi-shell-parity.md +0 -62
  27. package/docs/adr/ADR-008-alias-system-architecture.md +0 -95
  28. package/docs/adr/ADR-009-wallpaper-driven-theming.md +0 -131
  29. package/docs/adr/ADR-010-starship-transient-prompt.md +0 -144
  30. package/docs/adr/ADR-011-nushell-tier3-keep.md +0 -144
  31. package/docs/adr/ADR-012-ai-fleet-local-proxy.md +0 -79
  32. package/docs/adr/README.md +0 -40
  33. package/docs/architecture/AI_COST_OPTIMIZATION.md +0 -144
  34. package/docs/architecture/ARCHITECTURE.md +0 -117
  35. package/docs/architecture/INTEROP.md +0 -44
  36. package/docs/architecture/REPO_LAYOUT.md +0 -241
  37. package/docs/architecture/WALKTHROUGH.md +0 -86
  38. package/docs/architecture/fleet-deployment.md +0 -77
  39. package/docs/archive/EUXIS_2026_REVIEW.md +0 -127
  40. package/docs/archive/LEGACY_ROADMAP.md +0 -6
  41. package/docs/archive/MILESTONE_v0.2.493.md +0 -47
  42. package/docs/archive/PLAN.md +0 -199
  43. package/docs/archive/REPO_AUDIT.md +0 -31
  44. package/docs/articles/.pages +0 -6
  45. package/docs/articles/2026-07-05-custom-mkdocs-material-dark-theme.md +0 -216
  46. package/docs/articles/2026-07-05-fish-startup-abbr.md +0 -153
  47. package/docs/articles/2026-07-05-master-to-main-rename-runbook.md +0 -128
  48. package/docs/articles/index.md +0 -36
  49. package/docs/guides/INSTALL.md +0 -144
  50. package/docs/guides/NEOVIM_IDE_GUIDE.md +0 -61
  51. package/docs/guides/THEMING.md +0 -230
  52. package/docs/guides/TROUBLESHOOTING.md +0 -176
  53. package/docs/guides/WSL2_NIX_TROUBLESHOOTING.md +0 -792
  54. package/docs/index.md +0 -132
  55. package/docs/interop/A2A.md +0 -39
  56. package/docs/interop/POWERSHELL.md +0 -102
  57. package/docs/manual/00-introduction.md +0 -89
  58. package/docs/manual/01-concepts/01-architecture.md +0 -138
  59. package/docs/manual/01-concepts/02-trust-model.md +0 -183
  60. package/docs/manual/01-concepts/03-theme-engine.md +0 -186
  61. package/docs/manual/01-concepts/04-fleet.md +0 -148
  62. package/docs/manual/01-concepts/05-self-healing.md +0 -204
  63. package/docs/manual/02-tutorials/01-first-install.md +0 -197
  64. package/docs/manual/02-tutorials/02-add-wallpaper.md +0 -216
  65. package/docs/manual/02-tutorials/03-create-profile.md +0 -244
  66. package/docs/manual/02-tutorials/04-encrypt-secret.md +0 -281
  67. package/docs/manual/02-tutorials/05-deploy-fleet.md +0 -283
  68. package/docs/manual/03-reference/01-dot-cli.md +0 -450
  69. package/docs/manual/03-reference/02-config-files.md +0 -265
  70. package/docs/manual/03-reference/03-environment.md +0 -124
  71. package/docs/manual/03-reference/04-templates.md +0 -190
  72. package/docs/manual/03-reference/05-feature-flags.md +0 -187
  73. package/docs/manual/04-cookbook/01-recipes.md +0 -285
  74. package/docs/manual/04-cookbook/02-troubleshooting.md +0 -351
  75. package/docs/manual/04-cookbook/03-faq.md +0 -175
  76. package/docs/manual/05-appendices/A-platform-matrix.md +0 -101
  77. package/docs/manual/05-appendices/B-security-checklist.md +0 -85
  78. package/docs/manual/05-appendices/C-glossary.md +0 -40
  79. package/docs/manual/05-appendices/D-bibliography.md +0 -58
  80. package/docs/manual/05-appendices/E-license.md +0 -38
  81. package/docs/manual/_toc.yml +0 -58
  82. package/docs/manual/command-index.md +0 -155
  83. package/docs/manual/concept-index.md +0 -168
  84. package/docs/manual/index.md +0 -66
  85. package/docs/operations/ARCHITECTURE_ROADMAP.md +0 -7
  86. package/docs/operations/ATTESTATION.md +0 -44
  87. package/docs/operations/CI_CADENCE.md +0 -107
  88. package/docs/operations/CI_COMPOSITES.md +0 -156
  89. package/docs/operations/COMPLETIONS.md +0 -123
  90. package/docs/operations/COVERAGE.md +0 -204
  91. package/docs/operations/DRIFT.md +0 -107
  92. package/docs/operations/HARD_AUDIT_2026.md +0 -631
  93. package/docs/operations/MAINTENANCE.md +0 -63
  94. package/docs/operations/MANIFEST.md +0 -127
  95. package/docs/operations/MIGRATION.md +0 -109
  96. package/docs/operations/OPERATIONS.md +0 -188
  97. package/docs/operations/PERFORMANCE.md +0 -133
  98. package/docs/operations/REGISTRY.md +0 -90
  99. package/docs/operations/RELEASE_PIPELINE.md +0 -128
  100. package/docs/operations/RELIABILITY.md +0 -122
  101. package/docs/operations/RFC_v0_2_503_reorganization.md +0 -280
  102. package/docs/operations/ROADMAP.md +0 -10
  103. package/docs/operations/ROADMAP_2026.md +0 -7
  104. package/docs/operations/ROADMAP_V0_2_503.md +0 -10
  105. package/docs/operations/TESTING.md +0 -216
  106. package/docs/operations/TRACEABILITY.md +0 -43
  107. package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +0 -65
  108. package/docs/operations/VERSION_SYNC.md +0 -393
  109. package/docs/reference/ALIASES.md +0 -131
  110. package/docs/reference/ALIASES_CHEATSHEET.md +0 -32
  111. package/docs/reference/ALIASES_DEPRECATIONS.md +0 -13
  112. package/docs/reference/FEATURES.md +0 -66
  113. package/docs/reference/FONTS.md +0 -112
  114. package/docs/reference/POWERSHELL_PARITY.md +0 -82
  115. package/docs/reference/PROFILES.md +0 -69
  116. package/docs/reference/SCREENSHOTS.md +0 -121
  117. package/docs/reference/SCRIPTS.md +0 -71
  118. package/docs/reference/SUPPORT_MATRIX.md +0 -80
  119. package/docs/reference/THEMES.md +0 -117
  120. package/docs/reference/TOOLS.md +0 -110
  121. package/docs/reference/UTILS.md +0 -242
  122. package/docs/registry.json +0 -6
  123. package/docs/schema/dot-env-v1.json +0 -110
  124. package/docs/schema/dot-registry-v1.json +0 -33
  125. package/docs/security/AI_ACT_COMPLIANCE.md +0 -94
  126. package/docs/security/AUDIT_BYPASS.md +0 -103
  127. package/docs/security/AUTOMATION_SECRETS.md +0 -26
  128. package/docs/security/CI_EGRESS_ALLOWLIST.md +0 -127
  129. package/docs/security/CI_PINNING.md +0 -129
  130. package/docs/security/COMMIT_SIGNING.md +0 -138
  131. package/docs/security/COMPLIANCE.md +0 -458
  132. package/docs/security/DEPS_DEV_EXCEPTIONS.md +0 -86
  133. package/docs/security/DISCLOSURE.md +0 -130
  134. package/docs/security/ENCRYPTION.md +0 -57
  135. package/docs/security/FMEA.md +0 -159
  136. package/docs/security/FUZZING.md +0 -114
  137. package/docs/security/HISTORY_FILTERING.md +0 -132
  138. package/docs/security/INCIDENT_RESPONSE.md +0 -579
  139. package/docs/security/INSTALL_VERIFICATION.md +0 -122
  140. package/docs/security/KEYS.md +0 -49
  141. package/docs/security/KEY_ROTATION.md +0 -303
  142. package/docs/security/MCP_POLICY.md +0 -78
  143. package/docs/security/POLICY_RELEASES.md +0 -37
  144. package/docs/security/README.md +0 -28
  145. package/docs/security/SCORECARD.md +0 -195
  146. package/docs/security/SECRETS.md +0 -158
  147. package/docs/security/SECURITY.md +0 -45
  148. package/docs/security/SECURITY_CHECKLIST.md +0 -55
  149. package/docs/security/SHELL_EXEMPTIONS.md +0 -145
  150. package/docs/security/SOUP_REGISTER.md +0 -36
  151. package/docs/security/THREAT_MODEL.md +0 -130
  152. package/docs/security/VERIFICATION_VALIDATION.md +0 -228
  153. package/docs/security/VERIFY_RELEASE.md +0 -201
  154. package/docs/security/security-pubkey.asc +0 -15
  155. package/docs/stylesheets/extra.css +0 -444
  156. package/docs/themes/README.md +0 -10
  157. package/docs/themes/VISUAL_INTEGRITY_REPORT.md +0 -30
  158. package/docs/themes/hero-shot.svg +0 -78
  159. package/scripts/README.md +0 -123
  160. package/scripts/ci/check-copyright-headers.sh +0 -8
  161. package/scripts/ci/check-shell-preamble.sh +0 -8
  162. package/scripts/ci/guard-gitleaks-checkout.sh +0 -8
  163. package/scripts/demo/record.sh +0 -43
  164. package/scripts/diagnostics/a2a-conformance.sh +0 -163
  165. package/scripts/diagnostics/alias-governance.sh +0 -138
  166. package/scripts/diagnostics/aliases-cheatsheet.sh +0 -74
  167. package/scripts/diagnostics/aliases-manifest.sh +0 -77
  168. package/scripts/diagnostics/benchmark.sh +0 -408
  169. package/scripts/diagnostics/conflicts.sh +0 -73
  170. package/scripts/diagnostics/doctor-unified.sh +0 -39
  171. package/scripts/diagnostics/doctor.sh +0 -751
  172. package/scripts/diagnostics/drift-dashboard.sh +0 -202
  173. package/scripts/diagnostics/health.sh +0 -623
  174. package/scripts/diagnostics/history-analysis.sh +0 -86
  175. package/scripts/diagnostics/mcp-doctor.sh +0 -582
  176. package/scripts/diagnostics/perf.sh +0 -453
  177. package/scripts/diagnostics/scorecard.sh +0 -119
  178. package/scripts/diagnostics/secret-governance.sh +0 -65
  179. package/scripts/diagnostics/security-score.sh +0 -467
  180. package/scripts/diagnostics/smoke-test.sh +0 -88
  181. package/scripts/diagnostics/snapshot.sh +0 -90
  182. package/scripts/diagnostics/verify.sh +0 -108
  183. package/scripts/diagnostics/verify_state.sh +0 -73
  184. package/scripts/diagnostics/version-locks.sh +0 -94
  185. package/scripts/diagnostics/workstation-attestation.sh +0 -187
  186. package/scripts/dot/commands/agent.sh +0 -485
  187. package/scripts/dot/commands/agents.sh +0 -336
  188. package/scripts/dot/commands/ai.sh +0 -587
  189. package/scripts/dot/commands/aliases.sh +0 -277
  190. package/scripts/dot/commands/appearance.sh +0 -110
  191. package/scripts/dot/commands/completion.sh +0 -134
  192. package/scripts/dot/commands/core.sh +0 -217
  193. package/scripts/dot/commands/diagnostics.sh +0 -265
  194. package/scripts/dot/commands/env-emit.sh +0 -203
  195. package/scripts/dot/commands/fleet.sh +0 -688
  196. package/scripts/dot/commands/init.sh +0 -185
  197. package/scripts/dot/commands/lint.sh +0 -208
  198. package/scripts/dot/commands/manual.sh +0 -169
  199. package/scripts/dot/commands/meta.sh +0 -333
  200. package/scripts/dot/commands/patterns.sh +0 -55
  201. package/scripts/dot/commands/registry.sh +0 -419
  202. package/scripts/dot/commands/restore.sh +0 -232
  203. package/scripts/dot/commands/secrets.sh +0 -296
  204. package/scripts/dot/commands/security.sh +0 -102
  205. package/scripts/dot/commands/tools.sh +0 -556
  206. package/scripts/dot/data/alias-deprecations.tsv +0 -2
  207. package/scripts/dot/powershell/Dot.psm1 +0 -319
  208. package/scripts/fonts/install-nerd-fonts.sh +0 -75
  209. package/scripts/fonts/patch-fonts.sh +0 -36
  210. package/scripts/git-hooks/install.sh +0 -12
  211. package/scripts/git-hooks/pre-commit +0 -12
  212. package/scripts/git-hooks/pre-commit-audit.sh +0 -146
  213. package/scripts/git-hooks/pre-push +0 -105
  214. package/scripts/git-hooks/prepare-commit-msg +0 -29
  215. package/scripts/lib/secrets_provider.sh +0 -185
  216. package/scripts/ops/ai-setup.sh +0 -71
  217. package/scripts/ops/bundle.sh +0 -104
  218. package/scripts/ops/chaos.sh +0 -50
  219. package/scripts/ops/chezmoi-apply.sh +0 -333
  220. package/scripts/ops/chezmoi-diff.sh +0 -16
  221. package/scripts/ops/chezmoi-remove.sh +0 -46
  222. package/scripts/ops/chezmoi-update.sh +0 -63
  223. package/scripts/ops/heal-chezmoi.sh +0 -87
  224. package/scripts/ops/heal-system.sh +0 -129
  225. package/scripts/ops/heal-tools.sh +0 -297
  226. package/scripts/ops/heal.sh +0 -223
  227. package/scripts/ops/post-apply-repair.sh +0 -107
  228. package/scripts/ops/prewarm.sh +0 -128
  229. package/scripts/ops/release.sh +0 -262
  230. package/scripts/ops/rollback.sh +0 -604
  231. package/scripts/ops/setup.sh +0 -138
  232. package/scripts/ops/teleport.sh +0 -34
  233. package/scripts/qa/check-version-consistency.sh +0 -124
  234. package/scripts/qa/coverage-baseline.sh +0 -61
  235. package/scripts/qa/docs-coverage.sh +0 -112
  236. package/scripts/qa/examples-coverage.sh +0 -94
  237. package/scripts/qa/powershell-contract.ps1 +0 -95
  238. package/scripts/qa/reliability-audit.sh +0 -139
  239. package/scripts/qa/scorecard-snapshot.sh +0 -128
  240. package/scripts/qa/traceability-coverage.sh +0 -117
  241. package/scripts/qa/validate-examples.sh +0 -27
  242. package/scripts/qa/wsl-contract.sh +0 -12
  243. package/scripts/secrets/age-init.sh +0 -82
  244. package/scripts/secrets/create-secrets-file.sh +0 -46
  245. package/scripts/secrets/encrypt-ssh-key.sh +0 -44
  246. package/scripts/security/backup.sh +0 -58
  247. package/scripts/security/check-disclosure-key-expiry.sh +0 -111
  248. package/scripts/security/dns-doh.sh +0 -52
  249. package/scripts/security/encryption-check.sh +0 -55
  250. package/scripts/security/enforce-policies.sh +0 -335
  251. package/scripts/security/firewall.sh +0 -91
  252. package/scripts/security/lock-configs.sh +0 -67
  253. package/scripts/security/lock-screen.sh +0 -56
  254. package/scripts/security/manage-secrets.sh +0 -429
  255. package/scripts/security/ssh-cert.sh +0 -204
  256. package/scripts/security/telemetry-kill.sh +0 -51
  257. package/scripts/security/usb-safety.sh +0 -52
  258. package/scripts/theme/apply-gnome-theme.sh +0 -333
  259. package/scripts/theme/extract-heic-frames.sh +0 -115
  260. package/scripts/theme/extract-theme.py +0 -742
  261. package/scripts/theme/install-boot-logo.sh +0 -63
  262. package/scripts/theme/install-catppuccin-themes.sh +0 -371
  263. package/scripts/theme/install-cursors.sh +0 -26
  264. package/scripts/theme/install-file-icons.sh +0 -27
  265. package/scripts/theme/install-grub-theme.sh +0 -62
  266. package/scripts/theme/install-lock-icon.sh +0 -31
  267. package/scripts/theme/merge-wallpaper.sh +0 -146
  268. package/scripts/theme/rebuild-themes.sh +0 -544
  269. package/scripts/theme/switch.sh +0 -449
  270. package/scripts/theme/wallpaper-rotate.sh +0 -137
  271. package/scripts/theme/wallpaper-sync.sh +0 -690
  272. package/scripts/tools/cmatrix.sh +0 -22
  273. package/scripts/tools/detect-collisions.py +0 -103
  274. package/scripts/tools/emoji-picker.sh +0 -49
  275. package/scripts/tools/figlet-banner.sh +0 -19
  276. package/scripts/tools/log-rotate.sh +0 -31
  277. package/scripts/tools/lolcat-wrap.sh +0 -20
  278. package/scripts/tools/pipes.sh +0 -49
  279. package/scripts/tuning/linux.sh +0 -186
  280. package/scripts/tuning/macos.sh +0 -56
  281. package/scripts/uninstall.sh +0 -86
  282. package/scripts/version-sync.sh +0 -654
  283. package/templates/chezmoi-data/geekom-a9.toml.example +0 -21
  284. package/templates/chezmoi-data/mac-m1.toml.example +0 -16
  285. package/templates/chezmoi-data/mac-t2-linux.toml.example +0 -21
  286. package/templates/chezmoi-data/surface-pro-7p.toml.example +0 -21
  287. package/templates/projects/go/.github/workflows/ci.yml +0 -31
  288. package/templates/projects/go/README.md +0 -7
  289. package/templates/projects/go/cmd/__PROJECT_NAME__/main.go +0 -8
  290. package/templates/projects/go/go.mod +0 -3
  291. package/templates/projects/go/go.sum +0 -0
  292. package/templates/projects/molecule/README.md +0 -7
  293. package/templates/projects/molecule/converge.yml +0 -7
  294. package/templates/projects/molecule/molecule.yml +0 -16
  295. package/templates/projects/node/.github/workflows/ci.yml +0 -30
  296. package/templates/projects/node/README.md +0 -7
  297. package/templates/projects/node/package-lock.json +0 -12
  298. package/templates/projects/node/package.json +0 -10
  299. package/templates/projects/node/src/index.js +0 -3
  300. package/templates/projects/packer/README.md +0 -15
  301. package/templates/projects/packer/main.pkr.hcl +0 -15
  302. package/templates/projects/python/.github/workflows/ci.yml +0 -34
  303. package/templates/projects/python/README.md +0 -7
  304. package/templates/projects/python/pyproject.toml +0 -25
  305. package/templates/projects/python/src/__PROJECT_NAME__/__init__.py +0 -2
  306. package/templates/projects/python/tests/test_basic.py +0 -3
@@ -1,199 +0,0 @@
1
- ---
2
- render_with_liquid: false
3
- ---
4
-
5
- # Universal Configuration Plan (Chezmoi)
6
-
7
- ... [Previous Sections Unchanged] ...
8
-
9
- # Phase 15: Operational Documentation [COMPLETED]
10
-
11
- - [x] **Guide**: Created `OPERATIONS.md`.
12
-
13
- # Phase 16: Final Release Verification [COMPLETED]
14
-
15
- - [x] **Verification**: All systems passed.
16
-
17
- # Phase 17: Structural Optimizations (v0.3.0)
18
-
19
- ## Goal
20
-
21
- Implement structural improvements for better organization and maintainability, anticipating v0.3.0.
22
-
23
- ## Proposed Changes
24
-
25
- ### [REFACTOR] Semantic Organization
26
-
27
- - **Move**: `dot_config/dotfiles` -> `dot_config/shell`.
28
- - **Reason**: `dotfiles` is redundant inside a dotfiles repo. `shell` describes the content (aliases, paths, functions).
29
- - **Update**: Update references in `dot_zshrc.tmpl` and install scripts.
30
-
31
- ### [REFACTOR] Script Installation
32
-
33
- - **Move**: `bin/` -> `dot_local/bin/`.
34
- - **Reason**: Ensures scripts are automatically installed to `~/.local/bin` (user PATH).
35
-
36
- ### [CLEANUP] Remove Legacy Files
37
-
38
- - **Delete**: `Makefile`, `package.json`.
39
- - **Reason**: Replaced by `chezmoi` and GitHub Actions.
40
-
41
- ### [REFACTOR] Script Segregation
42
-
43
- - **Split**: `run_onchange_install_packages.sh.tmpl` into:
44
- - `run_onchange_darwin_install-packages.sh.tmpl` (Homebrew)
45
- - `run_onchange_linux_install-packages.sh.tmpl` (Apt)
46
- - `run_onchange_after_install-vim-plug.sh.tmpl` (Universal)
47
- - **Reason**: Improves readability and maintainability.
48
-
49
- # Phase 18: Component Documentation Polish [COMPLETED]
50
-
51
- ## Goal
52
-
53
- Update component documentation (`aliases`, `functions`, `paths`) to match the new `chezmoi` architecture and ensure accuracy.
54
-
55
- ## Changes
56
-
57
- - **Aliases**: Updated `aliases/README.md` to explain modular `*.aliases.sh` loading.
58
- - **Functions**: Updated `functions/README.md` to remove legacy install instructions.
59
- - **Paths**: Updated `paths/README.md` to clarify precedence and `chezmoi` integration.
60
- - **Cleanup**: Standardized all nested alias READMEs to remove legacy HTML artifacts and restore banners.
61
-
62
- # Phase 19: Toolchain Expansion [COMPLETED]
63
-
64
- ## Goal
65
-
66
- Add comprehensive support for modern DevOps/Cloud engineering tools.
67
-
68
- ## Proposed Changes
69
-
70
- ### [NEW] Aliases
71
-
72
- - **Kubernetes**: `kubectl` shortcuts (`k`), `helm`, `k9s`.
73
- - **IaC**: `terraform` (`tf`), `opentofu`, `ansible`.
74
- - **Languages**: `go` (`g`), `yarn`, `uv` (modern Python).
75
- - **Diagnostics**: `jq`, `yq`, `nc`, `curlie`.
76
- - **Structure**: Each component gets its own directory in `.chezmoitemplates/aliases/` with a standard `README.md`.
77
-
78
- # Phase 20: Intelligent Assistance [COMPLETED]
79
-
80
- ## Goal
81
-
82
- Integrate AI capabilities and improved help systems.
83
-
84
- ## Proposed Changes
85
-
86
- ### [NEW] Functions
87
-
88
- - **`dothelp`**: Index and search all aliases/functions with descriptions.
89
- - **AI Wrappers**: Aliases for `gh copilot`, `fabric`, or generic LLM CLI tools.
90
-
91
- # Phase 22: Automated Testing [COMPLETED]
92
-
93
- ## Goal
94
-
95
- Verify the dotfiles work on clean Linux environments.
96
-
97
- ## Proposed Changes
98
-
99
- ### [CI] GitHub Actions
100
-
101
- - **Container Job**: Run `chezmoi init --apply` inside a localized Docker container (Ubuntu/Fedora) to prove universal compatibility.
102
-
103
- # Phase 23: Enterprise Core & Security (The Trust Layer) [COMPLETED]
104
-
105
- ## Goal
106
-
107
- Establish a "Trust Layer" for the dotfiles ecosystem, ensuring supply chain security and configuration integrity.
108
-
109
- ## Changes
110
-
111
- - **SLSA & SBOM**: Implemented `security-release.yml` for provenance and SBOM generation.
112
- - **Signing**: Created `enable-signing` wizard alias for streamlined GPG/SSH configuration.
113
- - **Immutability**: Created `lock-configs.sh` script and `lock-configs`/`unlock-configs` aliases.
114
-
115
- - **Immutability**: Created `lock-configs.sh` script and `lock-configs`/`unlock-configs` aliases.
116
-
117
- # Phase 27: Self-Healing & Diagnostics [COMPLETED]
118
-
119
- ## Goal
120
-
121
- Enable the system to self-diagnose and repair configuration drift.
122
-
123
- ## Changes
124
-
125
- - **Scripts**: Created `scripts/diagnostics/doctor.sh` for system health checks.
126
- - **Aliases**: Added `dot doctor`, `dot drift` (`chezmoi verify`), and `dot heal` (`chezmoi apply`).
127
-
128
- # Phase 51: Regulatory Compliance [COMPLETED]
129
-
130
- ## Goal
131
-
132
- Document and enforce compliance with SOC2, ISO, and GDPR standards.
133
-
134
- ## Changes
135
-
136
- - **Documentation**: Created `COMPLIANCE.md` with control mappings.
137
- - **Privacy**: Added `privacy-mode` alias to disable CLI telemetry.
138
- - **Audit**: Added `dot audit` alias for tracking changes.
139
-
140
- # Phase 54: macOS Deep Integration [COMPLETED]
141
-
142
- ## Goal
143
-
144
- Harden and optimize the macOS environment via code.
145
-
146
- ## Changes
147
-
148
- - **Defaults**: Created `run_onchange_darwin_defaults.sh.tmpl` to apply secure/optimized `defaults`.
149
- - **Hardening**: Enabled screensaver passwords, firewall settings, and disabled guest access.
150
-
151
- ## Goal
152
-
153
- Ensure legal compliance and proper attribution for the open-source project.
154
-
155
- ## Changes
156
-
157
- - **Licensing**: Added `scan-licenses` alias (Trivy/FOSSology).
158
- - **Headers**: Added `add-headers` alias for automated copyright insertion.
159
- - **Compliance**: Added `check-cla` and `gen-notice` tools.
160
-
161
- # Phase 59: Font Typography [COMPLETED]
162
-
163
- ## Goal
164
-
165
- Standardize typography and ensure high-quality font rendering across all environments.
166
-
167
- ## Proposed Changes
168
-
169
- - **Nerd Fonts**: Automate installation of `JetBrainsMono Nerd Font` and `Symbols Nerd Font`.
170
- - **Fontconfig**: Deploy XML configuration for Linux font rendering (antialiasing, hinting).
171
- - **Aliases**: `update-fonts` to refresh font caches (`fc-cache`).
172
-
173
- # Phase 26: OS Bundling & Compliance [COMPLETED]
174
-
175
- ## Goal
176
-
177
- Prepare the dotfiles for system-wide deployment and ensure strict adherence to standards.
178
-
179
- ## Proposed Changes
180
-
181
- - **XDG Compliance**: Audit `00-default.paths.sh` to ensure all standard XDG variables are exported.
182
- - **Vendor Hooks**: Update `dot_zshrc.tmpl` to source system-level overrides from `/etc/dotfiles/defaults.d/` (Simulates "site-local" config).
183
- - **Bundling**: Create `scripts/core/package.sh` to create a distributable tarball and scaffold `.deb`/`.pkg` generation logic.
184
-
185
- # Phase 24: The Universal Installer (Zero-Dependency) [COMPLETED]
186
-
187
- ## Goal
188
-
189
- Provide a frictionless, "one-curl" onboarding experience and capabilities to deploy configurations remotely.
190
-
191
- ## Proposed Changes
192
-
193
- - **install.sh**: A standalone, zero-dependency bash script that:
194
- 1. Detects OS/Arch.
195
- 2. Installs `chezmoi` (binary or via package manager).
196
- 3. Initializes the dotfiles repo.
197
- 4. Runs `chezmoi apply`.
198
- 5. Uses ANSI colors for a polished "TUI" feel.
199
- - **Teleportation**: `scripts/ops/teleport.sh` using `chezmoi archive` piped to SSH to ephemeralize configs on remote servers (e.g., `dot teleport user@server`).
@@ -1,31 +0,0 @@
1
- ---
2
- render_with_liquid: false
3
- ---
4
-
5
- # Repo Audit
6
-
7
- ## Source of truth
8
-
9
- - `~/.dotfiles` (chezmoi source directory)
10
-
11
- ## Key directories
12
-
13
- - `.chezmoitemplates/` - templated aliases, functions, paths
14
- - `dot_config/` - configs mapped into `~/.config`
15
- - `dot_local/` - binaries and local data (e.g., `dot` CLI)
16
- - `scripts/` - diagnostics, tests, tooling
17
- - `tests/` - sandbox Dockerfile
18
- - `nix/` - optional Nix toolchain
19
-
20
- ## Notable dependencies
21
-
22
- - `chezmoi`
23
- - `zsh`, `starship`
24
- - `neovim`
25
- - `ripgrep`, `fd`, `bat`, `fzf`, `zoxide`
26
- - `lazygit`
27
-
28
- ## Notes
29
-
30
- - Repo-only files excluded via `.chezmoiignore`.
31
- - Secrets are handled via `age` + `dot secrets` (see `docs/SECRETS.md`).
@@ -1,6 +0,0 @@
1
- title: Articles
2
- nav:
3
- - index.md
4
- - 2026-07-05-fish-startup-abbr.md
5
- - 2026-07-05-master-to-main-rename-runbook.md
6
- - 2026-07-05-custom-mkdocs-material-dark-theme.md
@@ -1,216 +0,0 @@
1
- ---
2
- title: "Custom Documentation Sites in 2026: Building a Distinctive Dark-Themed Developer Reference on MkDocs Material Without Forking"
3
- description: A three-file recipe for a bespoke MkDocs Material theme — terminal-green on near-black, custom hero + card grid, hash-locked build. No custom_dir, no fork.
4
- date: 2026-07-05
5
- ---
6
-
7
- # Custom Documentation Sites in 2026: Building a Distinctive Dark-Themed Developer Reference on MkDocs Material Without Forking
8
-
9
- *Documentation is the public API surface of an open-source project; the difference between the default Material theme and a bespoke palette is the difference between "reads like every other project" and "reads like this specific project".*
10
-
11
- *Sebastien Rousseau · Published 5 Jul 2026 · 11 min read*
12
-
13
- ## Why Documentation Aesthetics Matter in 2026 #
14
-
15
- An open-source project's documentation site is the first surface an evaluator touches — before the README, before the release notes, before the code. In 2026, the density of developer-tool competition means that visual differentiation carries measurable weight: does the site feel like a curated product, or does it feel like a Jekyll-Cayman default from 2019? The felt distinction shapes adoption decisions before the reader has read a single sentence.
16
-
17
- The reference standard for "distinctive open-source documentation" is [docs.n8n.io](https://docs.n8n.io) — dark, polished, opinionated, immediately identifiable as n8n's. n8n runs on GitBook, a commercial SaaS. Most open-source projects, [.dotfiles](https://doc.dotfiles.io) included, cannot justify GitBook's licensing but can invest in MkDocs Material customisation to achieve equivalent visual distinction on an open-source stack.
18
-
19
- This article documents the migration of [doc.dotfiles.io](https://doc.dotfiles.io) from Jekyll's Cayman theme (the default when GitHub Pages serves markdown without a MkDocs configuration) to a fully customised MkDocs Material theme with a terminal-green-on-near-black palette, custom typography, and a hero + card-grid landing page.
20
-
21
- ## The Custom Docs Theme 2026 Architecture Lens #
22
-
23
- MkDocs Material's customisation surface has four distinct layers, each with different capabilities and constraints:
24
-
25
- | Layer | Design Decision | Why It Matters | Risk if Mishandled |
26
- |---|---|---|---|
27
- | **Palette declaration** | `mkdocs.yml` `theme.palette.primary: custom` + `accent: custom` | Signals to MkDocs Material that CSS custom properties will drive the palette rather than a named preset (green, teal, indigo, etc.) | Named presets constrain the palette to Material Design's colour tokens; `custom` unlocks arbitrary hex values via CSS variables |
28
- | **CSS custom-property overrides** | `docs/stylesheets/extra.css` sets `--md-primary-fg-color`, `--md-accent-fg-color`, `--md-default-bg-color`, `--md-code-bg-color` under `[data-md-color-scheme="slate"]` | The single source of truth for the palette. Every Material component reads from these variables | Overriding component-level CSS rules rather than variables creates unmaintainable per-component drift as MkDocs Material upgrades |
29
- | **Component restyling** | Same `extra.css` overrides selectors like `.md-header`, `.md-nav__link`, `.grid.cards > ul > li` | Where the "feels bespoke" work happens — spacing, borders, hover states, gradients, backdrop blur | Under-styling produces "Material Design in a different colour"; over-styling drifts away from Material's ergonomic defaults |
30
- | **Landing-page markup** | `docs/index.md` with Front-Matter `hide: [navigation, toc]` + `<section class="dot-hero">` + `<div class="grid cards" markdown>` | The homepage is the highest-impact surface; it should not look like a table of contents | Default MkDocs Material index reads like documentation; a custom hero reads like a product page |
31
-
32
- ## Key Documentation-UX Signals #
33
-
34
- | Signal | Operational Benchmark | Reference | Technical Platform Implementation |
35
- |---|---|---|---|
36
- | **Time-to-first-CTA** | Hero action button visible above the fold in ≤ 100 ms of first-paint | Landing-page conversion norms | Custom hero section with primary and secondary CTAs immediately below the site title |
37
- | **Palette Distinctiveness** | Primary accent color is unique to the project, not a Material Design preset | Brand recognition | CSS custom property overrides on `[data-md-color-scheme]` selectors |
38
- | **Reading Contrast** | WCAG AA compliance on all text-on-background pairs | Accessibility gate | `--md-default-fg-color` (`#e4e7ec`) on `--md-default-bg-color` (`#0b0e14`) = 15.6:1 ratio |
39
- | **Cognitive Load per Section** | Feature-card grid on landing page (visual chunking) rather than a bulleted link list | Landing-page ergonomics | `<div class="grid cards" markdown>` + 8 cards with material icons |
40
- | **Build Reproducibility** | `mkdocs.yml` + `docs/stylesheets/extra.css` under version control; hashes locked in `requirements-docs.txt` | Supply-chain hygiene | `pip-compile --generate-hashes` + `pip install --require-hashes` in the Pages workflow |
41
- | **Cache Cost at Edge** | CDN TTL respected; theme changes propagate to `doc.<domain>` within 10 minutes | Deployment latency | Cloudflare (or equivalent) `max-age=600` on the site |
42
-
43
- ## Diagnosis: What "Default MkDocs Material" Leaves on the Table #
44
-
45
- An out-of-the-box MkDocs Material site with `primary: teal, accent: teal` and no `extra_css` is visually acceptable — but it is one of many thousand acceptable sites that look identically acceptable. The named presets are constrained to Google's Material Design palette; the sidebar, header, and content surface all read as "Material default".
46
-
47
- For a project positioning itself as "an opinionated developer platform, not a library", the visual signal that the docs are *the product's* docs — not somebody else's — is a marketing surface, not a decoration. The lift is contained to three files:
48
-
49
- - `mkdocs.yml` — palette selector configuration
50
- - `docs/stylesheets/extra.css` — the actual palette + typography + component overrides
51
- - `docs/index.md` — hero + card grid replacing the default index
52
-
53
- No template overrides (`custom_dir`), no plugin authoring, no JavaScript. All the customisation lives in files MkDocs Material is explicitly designed to consume.
54
-
55
- ## Remediation: The Three-File Custom Theme #
56
-
57
- ### `mkdocs.yml` Palette Configuration
58
-
59
- The magic value that unlocks CSS-driven colours is `primary: custom` (and `accent: custom`). Under `[data-md-color-scheme="slate"]`, MkDocs Material's dark variant, every component reads its colours from CSS custom properties that we get to define.
60
-
61
- ```yaml
62
- theme:
63
- name: material
64
- font:
65
- text: Inter
66
- code: JetBrains Mono
67
- palette:
68
- - media: "(prefers-color-scheme: dark)"
69
- scheme: slate
70
- primary: custom
71
- accent: custom
72
- - media: "(prefers-color-scheme: light)"
73
- scheme: default
74
- primary: custom
75
- accent: custom
76
- features:
77
- - navigation.tabs
78
- - navigation.tabs.sticky
79
- - navigation.footer
80
- - content.code.copy
81
-
82
- extra_css:
83
- - stylesheets/extra.css
84
- ```
85
-
86
- The `navigation.tabs.sticky` feature keeps the top-level navigation visible on scroll, which pairs with the hero + card grid to keep the site feeling like a product page rather than a scrolling article.
87
-
88
- ### `docs/stylesheets/extra.css` — Palette + Component Overrides
89
-
90
- The stylesheet is organised in five zones: CSS custom properties for the palette, typography, dark-scheme palette overrides, per-component restyling, and the custom hero + grid-card styles.
91
-
92
- ```css
93
- :root {
94
- --dot-green: #7ee787; /* terminal green — primary */
95
- --dot-green-bright: #b0f5b7; /* hover / focused */
96
- --dot-green-dim: #4a9153; /* muted */
97
- --dot-bg: #0b0e14; /* near-black base */
98
- --dot-bg-elev: #111621; /* elevated card */
99
- --dot-fg: #e4e7ec;
100
- --dot-fg-muted: #94a3b8;
101
- --dot-border: #1f2937;
102
- }
103
-
104
- [data-md-color-scheme="slate"] {
105
- --md-default-bg-color: var(--dot-bg);
106
- --md-default-fg-color: var(--dot-fg);
107
- --md-primary-fg-color: var(--dot-green);
108
- --md-accent-fg-color: var(--dot-green-bright);
109
- --md-typeset-a-color: var(--dot-green);
110
- --md-code-bg-color: #161b26;
111
- }
112
- ```
113
-
114
- The choice of `#7ee787` (GitHub's terminal green) as the accent is deliberate: it reads as "developer tool" to the target audience without being GitHub-branded, and the WCAG contrast on the `#0b0e14` background exceeds 12:1 for text and 4.5:1 for the accent-on-background — comfortably above AA thresholds.
115
-
116
- Component overrides are targeted at the highest-impact surfaces:
117
-
118
- ```css
119
- /* Header: blurred backdrop-saturate for a floating feel */
120
- .md-header {
121
- background-color: rgba(11, 14, 20, 0.92);
122
- backdrop-filter: saturate(180%) blur(12px);
123
- border-bottom: 1px solid var(--dot-border);
124
- }
125
-
126
- /* Grid cards on landing page — hover lift + accent glow */
127
- .md-typeset .grid.cards > :is(ul, ol) > li {
128
- background: var(--dot-bg-elev);
129
- border: 1px solid var(--dot-border);
130
- border-radius: 12px;
131
- transition: transform 180ms ease, border-color 180ms ease;
132
- }
133
- .md-typeset .grid.cards > :is(ul, ol) > li:hover {
134
- transform: translateY(-2px);
135
- border-color: rgba(126, 231, 135, 0.35);
136
- box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
137
- }
138
- ```
139
-
140
- ### `docs/index.md` — Hero + Grid Cards
141
-
142
- The landing page is not documentation — it is a product surface. MkDocs Material's `md_in_html` extension allows Markdown to nest inside a custom HTML section:
143
-
144
- ```markdown
145
- ---
146
- hide:
147
- - navigation
148
- - toc
149
- ---
150
-
151
- <section class="dot-hero" markdown>
152
-
153
- # .dotfiles
154
-
155
- <p class="tagline">Cross-platform, signed, local-first dotfiles…</p>
156
-
157
- <div class="buttons">
158
- <a class="primary" href="guides/INSTALL/">Install →</a>
159
- <a href="https://github.com/sebastienrousseau/dotfiles">GitHub</a>
160
- </div>
161
-
162
- </section>
163
-
164
- ## What's inside
165
-
166
- <div class="grid cards" markdown>
167
-
168
- - :material-console:{ .lg .middle } **Multi-shell parity**
169
-
170
- ---
171
-
172
- Bash, Zsh, Fish, Nushell — same aliases, functions, prompt, and completions.
173
-
174
- [→ Shell hub](https://doc.dotfiles.io/reference/UTILS/)
175
-
176
- </div>
177
- ```
178
-
179
- The `hide: [navigation, toc]` front-matter removes the sidebar and right-column table-of-contents on this page only — the landing page gets the full canvas, sub-pages retain the standard docs layout.
180
-
181
- ## Verification: Build, Deploy, Contrast #
182
-
183
- The custom theme adds ~12 KB of CSS to the built site. Local `mkdocs build --clean` completes in ~2 seconds. The Pages workflow uses hash-locked dependencies (`pip install --require-hashes -r requirements-docs.txt`) to keep the build reproducible across MkDocs Material and its 30+ transitive dependencies.
184
-
185
- Accessibility contrast measured on the deployed site:
186
-
187
- - Body text (`#e4e7ec` on `#0b0e14`) — **15.6:1** (WCAG AAA)
188
- - Accent (`#7ee787` on `#0b0e14`) — **12.4:1** (WCAG AAA)
189
- - Muted text (`#94a3b8` on `#0b0e14`) — **7.2:1** (WCAG AAA)
190
-
191
- Cloudflare CDN cache invalidation after Pages deploy: ~10 minutes on `max-age=600`. Fetching the GitHub Pages origin (`sebastienrousseau.github.io/dotfiles/`) reflects the new theme immediately; the CDN-fronted custom domain propagates within one cache TTL.
192
-
193
- ## Return on Resilience #
194
-
195
- | Metric | Before (Jekyll Cayman) | After (Custom MkDocs Material) |
196
- |---|---|---|
197
- | Page weight | 2.9 KB | 14.8 KB (compressed 4.2 KB) |
198
- | Time to visible hero | ~800 ms (no hero) | ~150 ms |
199
- | WCAG AA compliance | Passes body text; hero absent | Passes AAA on all text pairs |
200
- | Landing-page CTAs | 0 (link list only) | 4 (primary + 3 secondary) |
201
- | Visual differentiation from default | Zero | Distinctive palette + hero + grid |
202
- | Build reproducibility | Jekyll on `github-pages` gem (unpinned transitive deps) | `pip install --require-hashes` (fully locked) |
203
-
204
- ## Takeaways #
205
-
206
- 1. **`primary: custom` + `extra_css` beats theme forking.** No `custom_dir`, no Jinja templates, no plugin authoring. All the customisation lives in files MkDocs Material is explicitly designed to consume.
207
-
208
- 2. **CSS custom properties are the maintainable seam.** Overriding `--md-primary-fg-color` scales; overriding `.md-header a.md-header__button:not(...)` selectors doesn't.
209
-
210
- 3. **Treat the landing page as a product surface, not documentation.** Front-matter `hide: [navigation, toc]` unlocks the full canvas. Hero + card grid + tabbed quick-start reads as a product page.
211
-
212
- 4. **Lock the docs-build supply chain.** `pip-compile --generate-hashes` + `pip install --require-hashes` closes the Scorecard `PinnedDependenciesID` alert and prevents transitive-dep drift in Pages deploys.
213
-
214
- 5. **Measure contrast, not just aesthetics.** WCAG AAA on body text is achievable with the right palette; it's not a tradeoff against distinctiveness.
215
-
216
- The reference implementation landed as [PR #960](https://github.com/sebastienrousseau/dotfiles/pull/960) and is live at [doc.dotfiles.io](https://doc.dotfiles.io); the theme source lives at [`docs/stylesheets/extra.css`](https://github.com/sebastienrousseau/dotfiles/blob/main/docs/stylesheets/extra.css).
@@ -1,153 +0,0 @@
1
- ---
2
- title: "Fish Startup in 2026: Cutting Interactive Shell Latency by Half with abbr on Multi-Shell Dotfiles"
3
- description: Diagnosing and remediating a 232 ms fish cold-start on the .dotfiles multi-shell bridge — one printf format change, one chezmoi hook, half the latency.
4
- date: 2026-07-05
5
- ---
6
-
7
- # Fish Startup in 2026: Cutting Interactive Shell Latency by Half with `abbr` on Multi-Shell Dotfiles
8
-
9
- *Interactive shells have become the primary interface for AI-augmented development; the difference between a 120 ms and a 230 ms first prompt compounds into measurable engineering-hour loss across a global fleet.*
10
-
11
- *Sebastien Rousseau · Published 5 Jul 2026 · 10 min read*
12
-
13
- ## Why Interactive Shell Latency Matters in 2026 #
14
-
15
- The AI-augmented developer opens a terminal dozens of times a day. In fleets running Claude Code, Codex CLI, GitHub Copilot CLI, or agentic frameworks that spawn subshells for every tool call, shell startup latency stops being a personal-comfort metric and becomes a **platform-engineering signal**.
16
-
17
- The [.dotfiles reference framework](https://github.com/sebastienrousseau/dotfiles) treats sub-second shell startup as an SLO alongside SLSA-signed releases and MCP boundary enforcement. When a shell exceeds its budget, the framework's `dot health` command reports it as a failing check, not a warning — because a slow prompt on a workstation running 18 concurrent AI agents is a supply-chain-throughput problem, not an aesthetic one.
18
-
19
- This article walks through the diagnosis and fix that took Fish cold-start latency from **231 ms → 119 ms** — a 48% reduction — on a workstation carrying ~900 bridged bash aliases into Fish for cross-shell parity. The remediation is a one-line change to a code-generation printf statement, plus a chezmoi hook that moves the cost out of the interactive path.
20
-
21
- ## The Multi-Shell Bridge 2026 Architecture Lens #
22
-
23
- Cross-shell parity — the same aliases, functions, environment, and completions across bash, Zsh, Fish, and Nushell — is a distinct architectural property of a mature dotfiles framework. Each layer of that bridge carries its own performance tax:
24
-
25
- | Layer | Design Decision | Why It Matters | Risk if Mishandled |
26
- |---|---|---|---|
27
- | **Source of truth** | Bash-hosted alias library (~900 entries) sourced by `zsh` and `bash` natively | Single canonical location prevents drift; matches how most upstream tooling assumes aliases live | Duplication across shells silently diverges; users on Fish or Nushell get a subtly different alias set |
28
- | **Fish bridge** | `bash --norc --noprofile` subshell dumps `alias -p`, output translated and cached to `~/.cache/fish/bash-aliases.fish` | Fish has no `bash`-sourcing primitive; the bridge is unavoidable | Bridge runs at every shell start unless cached; cache invalidation timing determines the felt cost |
29
- | **Cache format** | `abbr --add NAME -- VALUE` (this article's change) instead of `alias NAME=VALUE` | Fish's `alias` builtin allocates a function per entry (~183 µs each × 900 entries = ~165 ms); `abbr` is a command-line-time expansion at ~40 µs | Choosing `alias` for the cache format silently caps Fish cold-start at ~230 ms even on a warm cache |
30
- | **Cache invalidation** | Compare source mtime + first-line format marker | Alias sources change on every `chezmoi apply`, invalidating the cache and forcing regen on the next shell — the exact moment the user opens a terminal to try their changes | Cache regen on the interactive path punishes the shell that opens right after configuration changes |
31
- | **Pre-warm hook** | `run_onchange_after_` chezmoi hook rebuilds the cache during apply | Moves the ~200 ms regen cost off the user's first prompt into the apply step | Absence of a pre-warm hook makes the first post-apply shell feel broken |
32
-
33
- ## Key Interactive Shell Performance Signals #
34
-
35
- | Signal | Operational Benchmark | Reference | Technical Platform Implementation |
36
- |---|---|---|---|
37
- | **Fish cold-start** | ≤ 200 ms first-prompt latency | Interactive-response threshold (Nielsen 1993, still the industry norm) | `hyperfine --warmup 2 'fish -i -c exit'` in CI; regression fails a PR if the median crosses threshold |
38
- | **Fish warm-start** | ≤ 130 ms after cache is populated | Delta between cold/warm reveals cache-invalidation cost | Same command with `--warmup 3`; the mean tracks the fully-cached shell path |
39
- | **First-post-apply latency** | Warm-shell parity — no cliff after `chezmoi apply` | Signals that regeneration lives outside the shell hot path | `chezmoi apply && hyperfine 'fish -i -c exit'` — cold and warm should be within noise |
40
- | **Cache-format compatibility** | Auto-heal path when upgrading between cache formats | Ensures long-lived workstations don't inherit stale caches on framework upgrade | Staleness check compares first line of cache to expected format marker |
41
- | **Bridge throughput** | ~40 µs per abbreviated entry, ~183 µs per aliased entry | Fish internals — measured, not documented | Choice of `abbr` over `alias` in the cache-emission format string |
42
-
43
- ## Diagnosis: Where the Milliseconds Went #
44
-
45
- `fish --profile-startup=/tmp/f.prof -i -c 'exit'` emits a per-command trace with self-time and cumulative time. Sorted by cumulative time descending, one line dominated the warm-start budget:
46
-
47
- ```
48
- Time (µs) Sum (µs) Command
49
- 1687 132211 ----> source "$_alias_cache"
50
- ```
51
-
52
- **132 ms of a 231 ms budget** — 57% — spent sourcing a single cache file. Everything else (starship prompt initialisation, mise activation, atuin history bindings, direnv hooks) added up cleanly to the remaining ~85 ms.
53
-
54
- The cache file itself was well-formed and cache-invalidation was working correctly. The problem lived at the primitive level: what does `alias name='value'` cost when Fish parses and installs it? Ran in isolation:
55
-
56
- ```
57
- $ hyperfine --warmup 2 "fish -c 'source ~/.cache/fish/bash-aliases.fish'"
58
- Time (mean ± σ): 170.8 ms ± 11.3 ms
59
- ```
60
-
61
- **170 ms just to source 878 alias lines.** Fish's `alias` isn't a shell-level string substitution — it's a function factory. The invocation `alias ll='eza -la --icons'` roughly desugars to:
62
-
63
- ```fish
64
- function ll --wraps='eza -la --icons' --description 'alias ll=eza -la --icons'
65
- eza -la --icons $argv
66
- end
67
- ```
68
-
69
- Every call parses the definition, allocates a function object, installs it in the function table, records the description, and wires the `--wraps` for tab completion. Approximately 183 µs per entry. At 878 entries, the maths is uncompromising: 878 × 183 µs = 161 ms.
70
-
71
- The cost is O(1) per call, but the call count is the problem, and there is no batching path in Fish's `alias` implementation.
72
-
73
- ## Remediation: `abbr --add` as a Cross-Shell-Bridge Primitive #
74
-
75
- Fish exposes two ways to give a short name to a longer command:
76
-
77
- - **`alias`** — function factory. Available in interactive shells, scripts, pipes, subshells, and inside other functions. Costs a function allocation on every source.
78
- - **`abbr --add`** — abbreviation. Expanded at the interactive command line the moment the user types the abbreviation and hits space or enter. Not available in scripts (they need functions). No function allocation on installation.
79
-
80
- For bash-alias bridges, the tradeoff is invisible: users don't call `ll` from inside a Fish script — they'd write a proper Fish function for that use case. Abbreviations for this workload are a strict upgrade: identical interactive UX, no function-table pressure, and — as a side benefit — they show the user what actually runs when they type the abbreviation, which improves shell literacy.
81
-
82
- The code change is a single printf format string in the cache-generator:
83
-
84
- ```diff
85
- - printf "alias %s=%s\n" "$name" "$val"
86
- + printf "abbr --add %s -- %s\n" "$name" "$val"
87
- ```
88
-
89
- Measured in isolation:
90
-
91
- ```
92
- Benchmark 1: fish -c 'source alias-cache.fish'
93
- Time (mean ± σ): 170.8 ms ± 11.3 ms
94
-
95
- Benchmark 2: fish -c 'source abbr-cache.fish'
96
- Time (mean ± σ): 34.0 ms ± 0.9 ms
97
-
98
- Summary
99
- abbr-cache.fish ran 5.02 ± 0.36 times faster than alias-cache.fish
100
- ```
101
-
102
- **5× faster. 137 ms saved on every warm shell start.** End-to-end Fish latency dropped from 231 ms → 119 ms.
103
-
104
- ## The Second-Order Bug: Cache Invalidation Timing #
105
-
106
- Solving the warm case revealed a distinct failure mode: the *first* Fish shell opened after `chezmoi apply` still measured ~306 ms. The apply step writes new versions of the underlying bash alias source files (updated mtimes). The staleness check inside the Fish bridge sees `source.mtime > cache.mtime`, throws the cache away, and rebuilds it — spawning a subshell, sourcing 40 KB of bash, iterating 878 lines. **~200 ms.**
107
-
108
- The shell that pays this cost is whichever one the user opens first, which is almost always the shell they opened *because* they wanted to see the effect of the apply.
109
-
110
- The remediation is architectural, not algorithmic. The regeneration is moved off the interactive path and onto the apply itself via a chezmoi `run_onchange_after_` script:
111
-
112
- ```bash
113
- #!/usr/bin/env bash
114
- # Source-hash retrigger keys — script re-runs when any of these change:
115
- # 90-ux-aliases.sh.tmpl: {{ include "…/90-ux-aliases.sh.tmpl" | sha256sum }}
116
- # 91-ux-aliases-lazy.sh.tmpl: {{ include "…/91-ux-aliases-lazy.sh.tmpl" | sha256sum }}
117
- # aliases.fish.tmpl: {{ include "…/aliases.fish.tmpl" | sha256sum }}
118
-
119
- command -v fish >/dev/null 2>&1 || exit 0
120
-
121
- rm -f "${HOME}/.cache/fish/bash-aliases.fish"
122
- fish -i -c 'exit' >/dev/null 2>&1 || true
123
- ```
124
-
125
- The hook invalidates the cache, spawns a throwaway interactive Fish so the bridge's existing regen path fires, then exits. The user's next actual shell finds a valid, up-to-date cache. The 200 ms cost lands where the user expects "compilation work" to happen — during the apply — not on the terminal they open ten seconds later.
126
-
127
- Cold-start Fish after apply: **306 ms → 120 ms.**
128
-
129
- ## Return on Resilience #
130
-
131
- At a workstation opening 40 shells per day, saving 112 ms per shell reclaims 4.5 seconds daily; 22 minutes annually. At a small engineering org of 50 developers with the same profile, that's 18 engineering-hours reclaimed per year — measurable but modest.
132
-
133
- The stronger case is qualitative. Interactive-latency perception is nonlinear: at ~200 ms the user consciously notices lag; at ~120 ms the shell feels immediate. Once the felt lag is gone, the developer stops flinching before opening a terminal — which changes the frequency and length of exploratory shell work, which changes the shape of what they do at the CLI.
134
-
135
- | Metric | Before | After | Delta |
136
- |---|---|---|---|
137
- | Fish warm-start (median) | 231 ms | 119 ms | −112 ms (−48%) |
138
- | Fish cold-start after apply | 306 ms | 120 ms | −186 ms (−61%) |
139
- | Cache source cost | 170 ms | 34 ms | −136 ms (−80%) |
140
- | CI regression threshold | ✗ 231 > 200 | ✓ 119 ≤ 200 | Now under budget |
141
- | Full test suite | 4703 tests, 0 fail | 4703 tests, 0 fail | Zero regressions |
142
-
143
- ## Takeaways #
144
-
145
- 1. **Profile every interactive shell in CI.** Fish, Zsh, Nushell, Bash — each has its own primitives with different costs. Treat first-prompt latency as a signal with a threshold, not a comfort metric.
146
-
147
- 2. **Prefer `abbr` for interactive-only bridged aliases in Fish.** The distinction between `abbr` (line-time expansion) and `alias` (function factory) is documented; the 5× cost distinction is not. If your users don't call the alias from inside a Fish script — and for bridged bash aliases they don't — `abbr` is a strict upgrade.
148
-
149
- 3. **Move cache regeneration off the interactive path.** Any cache invalidated by a configuration-management action (chezmoi, ansible, dotbot) should be regenerated by that same action, not by whichever shell opens next.
150
-
151
- 4. **Version the cache format itself, not just the source.** The staleness check should include a format marker so upgrading users don't inherit stale caches by mtime luck.
152
-
153
- The reference implementation lives on `main` at [sebastienrousseau/dotfiles](https://github.com/sebastienrousseau/dotfiles); the change landed as [PR #963](https://github.com/sebastienrousseau/dotfiles/pull/963) and [PR #964](https://github.com/sebastienrousseau/dotfiles/pull/964), shipped in [v0.2.510](https://github.com/sebastienrousseau/dotfiles/releases/tag/v0.2.510).