@sebastienrousseau/dotfiles 0.2.518 → 0.2.520

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 (163) hide show
  1. package/CHANGELOG.md +191 -0
  2. package/README.md +1164 -164
  3. package/docs/ARCHITECTURE.md +117 -0
  4. package/docs/COPYRIGHT +1 -1
  5. package/docs/ECOSYSTEM.md +220 -0
  6. package/docs/GOLD-STANDARD-AUDIT.md +352 -0
  7. package/docs/GOVERNANCE.md +1 -1
  8. package/docs/MAINTAINERS.md +1 -1
  9. package/docs/MINIMUM-TOOLCHAIN.md +100 -0
  10. package/docs/README.md +1 -1
  11. package/docs/STRUCTURE.md +1 -1
  12. package/docs/architecture/ARCHITECTURE.md +11 -108
  13. package/docs/architecture/REPO_LAYOUT.md +4 -4
  14. package/docs/guides/MACOS_ICLOUD_SYMLINKS.md +121 -0
  15. package/docs/index.md +3 -3
  16. package/docs/manual/00-introduction.md +1 -1
  17. package/docs/manual/03-reference/01-dot-cli.md +28 -3
  18. package/docs/manual/command-index.md +24 -4
  19. package/docs/manual/concept-index.md +2 -0
  20. package/docs/migration/README.md +81 -0
  21. package/docs/migration/from-bare-git-repo.md +156 -0
  22. package/docs/migration/from-gnu-stow.md +165 -0
  23. package/docs/migration/from-plain-chezmoi.md +148 -0
  24. package/docs/migration/from-yadm.md +187 -0
  25. package/docs/operations/PERFORMANCE_BUDGETS.md +196 -0
  26. package/docs/operations/REGISTRY.md +1 -1
  27. package/docs/operations/RELEASE_PIPELINE.md +4 -4
  28. package/docs/operations/TESTING.md +3 -3
  29. package/docs/operations/TRACEABILITY.md +1 -0
  30. package/docs/packaging.md +222 -0
  31. package/docs/reference/FEATURE-MATRIX.md +646 -0
  32. package/docs/reference/TOOLS.md +1 -1
  33. package/docs/reference/UTILS.md +1 -0
  34. package/docs/security/COMPLIANCE.md +1 -1
  35. package/docs/security/DISCLOSURE.md +4 -4
  36. package/docs/security/FUZZING.md +113 -18
  37. package/docs/security/KEY_ROTATION.md +1 -1
  38. package/docs/security/SCORECARD.md +3 -3
  39. package/docs/security/VERIFY_RELEASE.md +2 -2
  40. package/install.sh +6 -6
  41. package/package.json +2 -2
  42. package/scripts/ci/check-copyright-headers.sh +1 -1
  43. package/scripts/ci/check-shell-preamble.sh +1 -1
  44. package/scripts/ci/guard-gitleaks-checkout.sh +1 -1
  45. package/scripts/demo/record.sh +1 -1
  46. package/scripts/diagnostics/a2a-conformance.sh +1 -1
  47. package/scripts/diagnostics/alias-governance.sh +30 -3
  48. package/scripts/diagnostics/aliases-cheatsheet.sh +1 -1
  49. package/scripts/diagnostics/aliases-manifest.sh +1 -1
  50. package/scripts/diagnostics/attest-verify.sh +147 -0
  51. package/scripts/diagnostics/benchmark.sh +1 -1
  52. package/scripts/diagnostics/conflicts.sh +1 -1
  53. package/scripts/diagnostics/doctor-unified.sh +6 -2
  54. package/scripts/diagnostics/doctor.sh +56 -10
  55. package/scripts/diagnostics/drift-dashboard.sh +3 -2
  56. package/scripts/diagnostics/health.sh +43 -10
  57. package/scripts/diagnostics/history-analysis.sh +1 -1
  58. package/scripts/diagnostics/mcp-doctor.sh +2 -2
  59. package/scripts/diagnostics/perf.sh +1 -1
  60. package/scripts/diagnostics/scorecard.sh +3 -2
  61. package/scripts/diagnostics/secret-governance.sh +1 -1
  62. package/scripts/diagnostics/security-score.sh +1 -1
  63. package/scripts/diagnostics/smoke-test.sh +1 -1
  64. package/scripts/diagnostics/snapshot.sh +1 -1
  65. package/scripts/diagnostics/verify.sh +1 -1
  66. package/scripts/diagnostics/verify_state.sh +1 -1
  67. package/scripts/diagnostics/version-locks.sh +1 -1
  68. package/scripts/diagnostics/workstation-attestation.sh +26 -1
  69. package/scripts/dot/commands/agent.sh +64 -14
  70. package/scripts/dot/commands/agents.sh +24 -8
  71. package/scripts/dot/commands/ai.sh +20 -7
  72. package/scripts/dot/commands/aliases.sh +1 -1
  73. package/scripts/dot/commands/appearance.sh +1 -1
  74. package/scripts/dot/commands/completion.sh +42 -5
  75. package/scripts/dot/commands/core.sh +1 -1
  76. package/scripts/dot/commands/diagnostics.sh +1 -1
  77. package/scripts/dot/commands/env-emit.sh +1 -1
  78. package/scripts/dot/commands/fleet.sh +41 -18
  79. package/scripts/dot/commands/init.sh +1 -1
  80. package/scripts/dot/commands/lint.sh +1 -1
  81. package/scripts/dot/commands/manual.sh +1 -1
  82. package/scripts/dot/commands/meta.sh +115 -10
  83. package/scripts/dot/commands/patterns.sh +1 -1
  84. package/scripts/dot/commands/registry.sh +43 -7
  85. package/scripts/dot/commands/restore.sh +1 -1
  86. package/scripts/dot/commands/secrets.sh +1 -1
  87. package/scripts/dot/commands/security.sh +1 -1
  88. package/scripts/dot/commands/tools.sh +21 -7
  89. package/scripts/fonts/install-nerd-fonts.sh +1 -1
  90. package/scripts/fonts/patch-fonts.sh +1 -1
  91. package/scripts/git-hooks/install.sh +1 -1
  92. package/scripts/git-hooks/pre-commit-audit.sh +2 -2
  93. package/scripts/lib/secrets_provider.sh +19 -4
  94. package/scripts/nvim/headless-upgrade.lua +81 -0
  95. package/scripts/ops/ai-setup.sh +1 -1
  96. package/scripts/ops/bundle.sh +1 -1
  97. package/scripts/ops/chaos.sh +1 -1
  98. package/scripts/ops/chezmoi-apply.sh +1 -1
  99. package/scripts/ops/chezmoi-diff.sh +1 -1
  100. package/scripts/ops/chezmoi-remove.sh +3 -3
  101. package/scripts/ops/chezmoi-update.sh +6 -2
  102. package/scripts/ops/heal-chezmoi.sh +1 -1
  103. package/scripts/ops/heal-system.sh +1 -1
  104. package/scripts/ops/heal-tools.sh +1 -1
  105. package/scripts/ops/heal.sh +1 -1
  106. package/scripts/ops/post-apply-repair.sh +1 -1
  107. package/scripts/ops/prewarm.sh +1 -1
  108. package/scripts/ops/release.sh +1 -1
  109. package/scripts/ops/rollback.sh +11 -2
  110. package/scripts/ops/setup.sh +1 -1
  111. package/scripts/ops/teleport.sh +1 -1
  112. package/scripts/qa/check-feature-matrix.sh +296 -0
  113. package/scripts/qa/check-version-consistency.sh +7 -119
  114. package/scripts/qa/coverage-baseline.sh +1 -1
  115. package/scripts/qa/docs-coverage.sh +9 -3
  116. package/scripts/qa/examples-coverage.sh +1 -1
  117. package/scripts/qa/reliability-audit.sh +1 -1
  118. package/scripts/qa/scorecard-snapshot.sh +1 -1
  119. package/scripts/qa/traceability-coverage.sh +9 -2
  120. package/scripts/qa/validate-examples.sh +66 -3
  121. package/scripts/qa/wsl-contract.sh +1 -1
  122. package/scripts/secrets/age-init.sh +1 -1
  123. package/scripts/secrets/create-secrets-file.sh +1 -1
  124. package/scripts/secrets/encrypt-ssh-key.sh +1 -1
  125. package/scripts/security/backup.sh +1 -1
  126. package/scripts/security/check-disclosure-key-expiry.sh +1 -1
  127. package/scripts/security/dns-doh.sh +1 -1
  128. package/scripts/security/encryption-check.sh +1 -1
  129. package/scripts/security/enforce-policies.sh +315 -98
  130. package/scripts/security/firewall.sh +1 -1
  131. package/scripts/security/lock-configs.sh +1 -1
  132. package/scripts/security/lock-screen.sh +1 -1
  133. package/scripts/security/manage-secrets.sh +1 -1
  134. package/scripts/security/ssh-cert.sh +1 -1
  135. package/scripts/security/telemetry-kill.sh +1 -1
  136. package/scripts/security/usb-safety.sh +1 -1
  137. package/scripts/theme/apply-gnome-theme.sh +1 -1
  138. package/scripts/theme/extract-heic-frames.sh +1 -1
  139. package/scripts/theme/extract-theme.py +284 -6
  140. package/scripts/theme/install-boot-logo.sh +1 -1
  141. package/scripts/theme/install-catppuccin-themes.sh +1 -1
  142. package/scripts/theme/install-cursors.sh +1 -1
  143. package/scripts/theme/install-file-icons.sh +1 -1
  144. package/scripts/theme/install-grub-theme.sh +1 -1
  145. package/scripts/theme/install-lock-icon.sh +1 -1
  146. package/scripts/theme/merge-wallpaper.sh +1 -1
  147. package/scripts/theme/rebuild-themes.sh +64 -5
  148. package/scripts/theme/switch.sh +46 -19
  149. package/scripts/theme/wallpaper-rotate.sh +1 -1
  150. package/scripts/theme/wallpaper-sync.sh +1 -1
  151. package/scripts/tools/cmatrix.sh +1 -1
  152. package/scripts/tools/detect-collisions.py +1 -1
  153. package/scripts/tools/emoji-picker.sh +1 -1
  154. package/scripts/tools/figlet-banner.sh +1 -1
  155. package/scripts/tools/log-rotate.sh +1 -1
  156. package/scripts/tools/lolcat-wrap.sh +1 -1
  157. package/scripts/tools/pipes.sh +1 -1
  158. package/scripts/tuning/linux.sh +1 -1
  159. package/scripts/tuning/macos.sh +1 -1
  160. package/scripts/uninstall.sh +1 -1
  161. package/scripts/verify-release-versions +156 -0
  162. package/scripts/version-sync.sh +63 -3
  163. package/LICENSE +0 -21
package/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ <!-- SPDX-License-Identifier: Apache-2.0 OR MIT -->
1
2
  <p align="center">
2
3
  <img src="https://cloudcdn.pro/dotfiles/v2/images/logos/dotfiles.svg" alt="Dotfiles logo" width="128" />
3
4
  </p>
@@ -5,73 +6,170 @@
5
6
  <h1 align="center">.dotfiles</h1>
6
7
 
7
8
  <p align="center">
8
- <strong>Declarative dotfiles for macOS, Linux, WSL, and Windows-native PowerShell 7.4 LTS / 7.5+. Multi-shell by default. Sub-100ms CLI cold-start. Wallpaper-driven themes. Signed + attested releases. Fleet apply over SSH.</strong>
9
+ Declarative dotfiles for macOS, Linux, WSL, and Windows-native
10
+ PowerShell 7.4 LTS / 7.5+. Multi-shell by default. Sub-100ms
11
+ <code>dot</code> cold-start. Wallpaper-driven themes. Signed and
12
+ attested releases. Fleet apply over SSH.
9
13
  </p>
10
14
 
11
15
  <p align="center">
12
16
  <a href="https://github.com/sebastienrousseau/dotfiles/actions"><img src="https://img.shields.io/github/actions/workflow/status/sebastienrousseau/dotfiles/ci.yml?style=for-the-badge&logo=githubactions&logoColor=white" alt="Build" /></a>
13
- <a href="https://github.com/sebastienrousseau/dotfiles/releases/latest"><img src="https://img.shields.io/badge/Version-v0.2.518-blue?style=for-the-badge&logo=semanticrelease&logoColor=white" alt="Version" /></a>
17
+ <a href="https://github.com/sebastienrousseau/dotfiles/releases/latest"><img src="https://img.shields.io/badge/Version-v0.2.520-blue?style=for-the-badge&logo=semanticrelease&logoColor=white" alt="Version" /></a>
18
+ <a href="https://www.npmjs.com/package/@sebastienrousseau/dotfiles"><img src="https://img.shields.io/npm/v/@sebastienrousseau/dotfiles?style=for-the-badge&logo=npm&logoColor=white&label=npm" alt="npm" /></a>
19
+ <a href="https://doc.dotfiles.io/"><img src="https://img.shields.io/badge/Manual-doc.dotfiles.io-66c2a5?style=for-the-badge&labelColor=555555&logo=materialformkdocs&logoColor=white" alt="Manual" /></a>
14
20
  <a href="https://github.com/sebastienrousseau/dotfiles/releases"><img src="https://img.shields.io/github/downloads/sebastienrousseau/dotfiles/total?style=for-the-badge&logo=github&logoColor=white" alt="Downloads" /></a>
15
21
  <a href="https://codespaces.new/sebastienrousseau/dotfiles"><img src="https://img.shields.io/badge/Open%20in-Codespaces-blue?style=for-the-badge&logo=github&logoColor=white" alt="Open in GitHub Codespaces" /></a>
16
22
  <a href="https://scorecard.dev/viewer/?uri=github.com/sebastienrousseau/dotfiles"><img src="https://img.shields.io/ossf-scorecard/github.com/sebastienrousseau/dotfiles?style=for-the-badge&logo=linuxfoundation&logoColor=white&label=OpenSSF%20Scorecard" alt="OpenSSF Scorecard" /></a>
17
23
  <a href="https://www.bestpractices.dev/projects/12840"><img src="https://img.shields.io/cii/level/12840?style=for-the-badge&logo=linuxfoundation&logoColor=white&label=OpenSSF%20Best%20Practices" alt="OpenSSF Best Practices" /></a>
18
- <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-green?style=for-the-badge&logo=opensourceinitiative&logoColor=white" alt="License: MIT" /></a>
24
+ <a href="#license"><img src="https://img.shields.io/badge/License-Apache--2.0%20OR%20MIT-green?style=for-the-badge&logo=opensourceinitiative&logoColor=white" alt="License: Apache-2.0 OR MIT" /></a>
25
+ <a href="#requirements"><img src="https://img.shields.io/badge/toolchain-bash%205.0%20%C2%B7%20chezmoi%202.40-93450a?style=for-the-badge&logo=gnubash&logoColor=white" alt="Minimum toolchain: bash 5.0, chezmoi 2.40" /></a>
26
+ <a href="https://repology.org/project/dot-cli/versions"><img src="https://img.shields.io/repology/repositories/dot-cli?style=for-the-badge&label=Repology" alt="Repology" /></a>
19
27
  </p>
20
28
 
21
29
  ---
22
30
 
23
- > **Why this is different.** You won't find these three things in `mathiasbynens/`, `holman/`, or `paulirish/`. First, wallpaper-driven terminal themes. We use K-Means clustering in CIELAB and enforce WCAG AAA contrast. Second, first-class agent governance. That covers MCP policy, A2A discovery, signed attestation logs, and bounded profiles (`ask` / `plan` / `apply` / `audit`). Third, verified multi-shell parity across zsh, fish, bash, nushell, and PowerShell. The suite is tested on macOS, Linux, WSL2, and Apple Silicon CI runners. Signed commits are enforced. The installer is idempotent. The CLI heals itself.
31
+ ## Contents
24
32
 
25
- <!-- ASCIINEMA DEMO — closes #874 once recorded.
26
- 30-second clip covering: install.sh → dot doctor → dot theme rebuild.
27
- Recording recipe (maintainer):
33
+ **Getting started**
28
34
 
29
- asciinema rec ~/dotfiles-demo.cast \
30
- --idle-time-limit 1 --rows 30 --cols 100 \
31
- --title "Dotfiles: install doctor theme"
32
- # in the recording shell:
33
- # curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh | bash
34
- # dot doctor
35
- # dot theme rebuild --force
36
- # then Ctrl-D to stop
35
+ - [Install](#install) — one-line installer, verified installer, release archive, Homebrew, Scoop, AUR, npm, Nix, chezmoi, source
36
+ - [Requirements](#requirements) toolchain floor, platforms, shells
37
+ - [Quick Start](#quick-start) — install, verify, switch a theme, apply in six commands
37
38
 
38
- Upload with `asciinema upload ~/dotfiles-demo.cast`, grab the
39
- resulting `https://asciinema.org/a/<id>` URL, and replace this
40
- comment with:
39
+ **The dotfiles family** (framework + four in-repo satellites)
41
40
 
42
- <p align="center">
43
- <a href="https://asciinema.org/a/<id>">
44
- <img src="https://asciinema.org/a/<id>.svg" alt="install → doctor → theme demo" />
45
- </a>
46
- </p>
47
- -->
41
+ - [The dotfiles family](#the-dotfiles-family) — `dot`, `dot-ui`, `dot-ai-tui`, `dot mcp`, `dot-mcp`, `dot-sys`, the module registry at a glance
42
+
43
+ **Framework reference**
44
+
45
+ - [One-minute migration from another dotfiles manager](#one-minute-migration-from-another-dotfiles-manager) — yadm, GNU Stow, a bare repository, plain chezmoi
46
+ - [Why this approach?](#why-this-approach) — design rationale
47
+ - [Capabilities at a glance](#capabilities-at-a-glance) — the current surface by theme
48
+ - [Five shells, one alias hub](#five-shells-one-alias-hub) — parity tiers from ADR-007
49
+ - [Comparison](#comparison) — short matrix against chezmoi, holman, nikitabobko
50
+ - [Benchmarks](#benchmarks) — startup budgets and the measurement method
51
+ - [Features](#features) — what is included, by area
52
+
53
+ **What it does**
54
+
55
+ - [Wallpaper-driven themes](#wallpaper-driven-themes) — K-Means in CIELAB, WCAG AAA, 228 generated themes
56
+ - [Agent governance (ask / plan / apply / audit)](#agent-governance-ask--plan--apply--audit) — bounded profiles, MCP policy, attestation
57
+ - [Self-healing and rollback](#self-healing-and-rollback) — `dot doctor`, `dot heal`, `dot chaos`, `dot rollback`
58
+ - [Fleet apply](#fleet-apply) — every host in `fleet.toml` over SSH
59
+ - [The `dot` CLI](#the-dot-cli) — 75 indexed subcommands grouped by intent
60
+ - [Configuration](#configuration) — `.chezmoidata.toml`, profiles, session flags
61
+ - [Examples](#examples) — runnable example index
62
+
63
+ **Operational**
64
+
65
+ - [When not to use .dotfiles](#when-not-to-use-dotfiles) — limitations
66
+ - [Development](#development) — make targets, fuzzing, hardening gates, CI
67
+ - [Security](#security) — reporting, posture, supply chain
68
+ - [Documentation](#documentation) — all reference docs
69
+ - [Acknowledgements](#acknowledgements)
70
+ - [Stability guarantees](#stability-guarantees) — SemVer axis, output stability, toolchain discipline
71
+ - [License](#license)
72
+
73
+ ---
48
74
 
49
75
  ## Install
50
76
 
51
- **Verified install (recommended).** Pin to a release tag. Download the installer. Check its SHA256 against the value published with the release. Then run it. See [docs/security/INSTALL_VERIFICATION.md](docs/security/INSTALL_VERIFICATION.md) for the per-release hash and how it's generated.
77
+ ### One-line installer
78
+
79
+ ```bash
80
+ bash -c "$(curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh)"
81
+ ```
82
+
83
+ The script needs `git` and `curl`. It fetches a SHA256-verified
84
+ `chezmoi` binary, clones this repository to `~/.dotfiles`, runs
85
+ `chezmoi init --apply`, and puts `dot` on your `PATH`. It runs on
86
+ macOS, Ubuntu, Debian, Arch, WSL2, and GitHub Codespaces, and it is
87
+ idempotent: run it once or a hundred times, same machine state.
88
+
89
+ ### Verified installer (recommended for primary workstations)
90
+
91
+ Pin to a release tag, download the installer, check its SHA256
92
+ against the value published with the release, then run it. The
93
+ per-release hash and how it is generated are documented in
94
+ [`docs/security/INSTALL_VERIFICATION.md`](docs/security/INSTALL_VERIFICATION.md).
52
95
 
53
96
  ```bash
54
97
  curl -fsSL -o /tmp/dotfiles-install.sh \
55
- https://raw.githubusercontent.com/sebastienrousseau/dotfiles/v0.2.518/install.sh
56
- echo "1f8ef5b5ca0de42002269461ded3acc9d30cadc4f77e04d0abfd008d5690c0c5 /tmp/dotfiles-install.sh" \
98
+ https://raw.githubusercontent.com/sebastienrousseau/dotfiles/v0.2.520/install.sh
99
+ echo "3b5d1332fb07a1261da117e53f69acc0097c3d9bd676fc9f53a000257b72978e /tmp/dotfiles-install.sh" \
57
100
  | shasum -a 256 -c
58
101
  bash /tmp/dotfiles-install.sh
59
102
  ```
60
103
 
61
- **Trust-source one-liner** (skips the SHA check fine for sandboxes and ephemeral CI, not recommended for primary workstations):
104
+ The verified path also needs `shasum` or `sha256sum`. The one-line
105
+ form above skips this check; use it for sandboxes and ephemeral CI.
106
+
107
+ ### Pre-built release archive (`dot` CLI only)
108
+
109
+ Every tag publishes `dot-<version>.tar.gz` and `.zip` with the
110
+ dispatcher, `lib/dot`, the man page, zsh / bash / fish completions,
111
+ and a `Makefile` honouring the usual install prefix and staging
112
+ directory. The archive
113
+ carries SLSA build provenance (keyless, via Fulcio + Rekor):
62
114
 
63
115
  ```bash
64
- bash -c "$(curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh)"
116
+ gh release download v0.2.520 --repo sebastienrousseau/dotfiles --pattern 'dot-*.tar.gz'
117
+ gh attestation verify dot-0.2.520.tar.gz --repo sebastienrousseau/dotfiles
118
+ tar -xzf dot-0.2.520.tar.gz
119
+ make -C dot-0.2.520 install PREFIX=/usr/local
120
+ ```
121
+
122
+ [`release-install-smoke.yml`](.github/workflows/release-install-smoke.yml)
123
+ repeats exactly this sequence on a clean Ubuntu and macOS runner
124
+ after every release: verify provenance, `make install` into an
125
+ empty staging directory, run `dot version`, `make uninstall`, assert
126
+ nothing is left behind.
127
+
128
+ ### Package managers
129
+
130
+ | Channel | Install |
131
+ |---|---|
132
+ | Homebrew (macOS / Linux) | `brew install sebastienrousseau/tap/dot` |
133
+ | Scoop (Windows) | `scoop bucket add sebastienrousseau https://github.com/sebastienrousseau/scoop-bucket && scoop install dot` |
134
+ | AUR (Arch) | `paru -S dot-cli-git` |
135
+ | npm | `npx -p @sebastienrousseau/dotfiles dotfiles-install` (runs the same `install.sh`) |
136
+ | Nix | `nix profile install ~/.dotfiles/nix#dot-utils` after cloning; `nix develop ~/.dotfiles/nix` for the dev shell |
137
+
138
+ The Homebrew formula and Scoop manifest are regenerated per tag by
139
+ [`release-distribute-homebrew.yml`](.github/workflows/release-distribute-homebrew.yml)
140
+ and
141
+ [`release-distribute-scoop.yml`](.github/workflows/release-distribute-scoop.yml)
142
+ from the templates under [`pkg/`](pkg/README.md); the AUR
143
+ package is pushed by
144
+ [`release-distribute-aur.yml`](.github/workflows/release-distribute-aur.yml).
145
+ The per-channel templates and the maintainer runbook are in
146
+ [`pkg/README.md`](pkg/README.md); the end-to-end pipeline is
147
+ [`docs/operations/RELEASE_PIPELINE.md`](docs/operations/RELEASE_PIPELINE.md).
148
+
149
+ ### With chezmoi directly
150
+
151
+ The repository is a chezmoi source tree (`.chezmoiroot` points at
152
+ `defaults/`), so chezmoi's own bootstrap works:
153
+
154
+ ```bash
155
+ chezmoi init --apply sebastienrousseau
65
156
  ```
66
157
 
67
- Then verify and explore:
158
+ This is what `install.sh` runs after its preflight checks; you give
159
+ up the verified `chezmoi` download and the `git` / `curl` checks.
160
+
161
+ ### Build from source
68
162
 
69
163
  ```bash
70
- dot doctor # verify installation
71
- dot learn # interactive tour
164
+ git clone https://github.com/sebastienrousseau/dotfiles.git ~/.dotfiles
165
+ cd ~/.dotfiles
166
+ ./install.sh # full install from the local checkout
167
+ make install PREFIX=~/.local # or: stage only the dot CLI
72
168
  ```
73
169
 
74
- The install needs `git` and `curl`. The verified path also needs `shasum` or `sha256sum`. The script runs on macOS, Ubuntu, Debian, Arch, WSL2, and GitHub Codespaces.
170
+ `./install.sh --minimal` installs shells and core tools only.
171
+ `dot bundle ~/Downloads` builds an offline `.tar.zst` for an
172
+ air-gapped host; unpack it and run `./install.sh --force`.
75
173
 
76
174
  <details>
77
175
  <summary>CI/CD and Docker options</summary>
@@ -94,64 +192,450 @@ docker run --rm -e DOTFILES_NONINTERACTIVE=1 ubuntu:24.04 bash -c \
94
192
  && dot doctor'
95
193
  ```
96
194
 
195
+ `dot sandbox` launches the same preview through Docker or Podman
196
+ from an installed machine.
197
+
97
198
  </details>
98
199
 
200
+ ### Profiles and session flags
201
+
202
+ Everything heavy is off, deferred, or cached by default. Pick a
203
+ profile per machine and flip session flags when you need less.
204
+
205
+ | Switch | Where | Effect | Documented in |
206
+ | :--- | :--- | :--- | :--- |
207
+ | `profile = "laptop"` *(default)* | `~/.config/chezmoi/chezmoi.toml` | All tools, AI CLIs, themes, completions | [`docs/reference/PROFILES.md`](docs/reference/PROFILES.md) |
208
+ | `profile = "minimal"` | same | Core shell, git, basic aliases only | same |
209
+ | `profile = "server"` | same | Shell, git, monitoring tools, no desktop | same |
210
+ | `[features]` flags | `.chezmoidata.toml` | `alias_wrapper`, `dms`, `zellij`, `linux_desktop`, `niri`, `waybar`, `fuzzel`, `mako`, `foot`, `kanshi`, `touch`, `t2`, `surface` — schema-checked in CI | [`docs/reference/FEATURES.md`](docs/reference/FEATURES.md) |
211
+ | `DOTFILES_FAST=1` | environment | Skip heavy layers (zinit, completions, lazy runtime managers) | [Configuration](#configuration) |
212
+ | `DOTFILES_ULTRA_FAST=1` | environment | Bare minimum shell: paths, aliases, prompt | [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) |
213
+ | `DOTFILES_DEFER_TOOLS=1` *(default)* | environment | Resolve heavy binaries asynchronously after the first prompt | `defaults/dot_config/zsh/dot_zshrc.tmpl` |
214
+ | `DOTFILES_AI=1` | environment | Enable AI helper scripts | [`docs/reference/PROFILES.md`](docs/reference/PROFILES.md) |
215
+ | `DOTFILES_ARTIFACT_MODE=1` | environment | Minimal prompt plus the async Bento dashboard | [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) |
216
+ | `DOTFILES_DEBUG=1` / `DOTFILES_TRACE=1` | environment | Per-stage startup timing / full trace to stderr | [`docs/manual/03-reference/03-environment.md`](docs/manual/03-reference/03-environment.md) |
217
+ | `EVALCACHE_DISABLE=true` | environment | Bypass `_cached_eval` for debugging | [Features](#features) |
218
+
99
219
  ---
100
220
 
101
- ## Why this repo is different
221
+ ## Requirements
222
+
223
+ - **Bash 5.0 or newer, zsh 5.8 or newer.** These are the Tier-1
224
+ shells and the floor the test suite runs on: Ubuntu, macOS (Intel
225
+ and Apple Silicon), and Windows runners on every push. `install.sh`
226
+ and `lib/dot` avoid bash-4-only constructs where macOS's stock
227
+ `/bin/bash` 3.2 has to run them (the notes are in `lib/dot/ui.sh`),
228
+ but 3.2 is not a supported interactive shell.
229
+
230
+ - **chezmoi 2.40 or newer, git 2.35 or newer, curl.** CI pins
231
+ chezmoi `2.47.1` and installs it through a checksum-verified
232
+ fetch; `install.sh` does the same on your machine.
233
+
234
+ - **A supported platform.** macOS 14+ (Apple Silicon and Intel),
235
+ Ubuntu 22.04+, Debian 12+, WSL2, NixOS 23.11+ are CI-tested or
236
+ supported; Fedora and Arch are community-supported. The full
237
+ table, with per-tool floors, is
238
+ [`docs/MINIMUM-TOOLCHAIN.md`](docs/MINIMUM-TOOLCHAIN.md).
239
+
240
+ - **Windows.** PowerShell 7.4 LTS / 7.5+ runs the native
241
+ `dot.ps1` for the daily workflow (apply, status, doctor, mise
242
+ inventory, agent checks, fleet status); the `Test / Windows` job
243
+ exercises the cmdlets on `windows-latest` every push.
244
+
245
+ **Minimum-toolchain policy.** The floor is the version CI
246
+ exercises, not the oldest version that happens to work. It is
247
+ raised only in a release whose `CHANGELOG.md` entry names the new
248
+ floor and the reason, never silently. The version axis on which it
249
+ may move, and the table mapping every supported platform and tool
250
+ to its floor live in
251
+ [`docs/MINIMUM-TOOLCHAIN.md`](docs/MINIMUM-TOOLCHAIN.md);
252
+ this README makes no distro-compatibility claim that table does not
253
+ back.
102
254
 
103
- Most dotfiles repos are personal collections. This one ships as workstation infrastructure. It's signed, attested, multi-platform, AI-aware, and self-healing.
255
+ ---
104
256
 
105
- | Capability | What you get | Where |
106
- |:---|:---|:---|
107
- | **Wallpaper-driven themes** | K-Means clustering in CIELAB extracts terminal palettes from any wallpaper. WCAG AAA enforced. Dynamic HEIC dark/light. | `dot theme rebuild` |
108
- | **AI and MCP native** | Agent profiles, MCP policy enforcement, attestation logs, AI commit messages. | `dot ai`, `dot mcp`, `dot agent`, `dot mode` |
109
- | **Cryptographic attestation** | Signed commits, machine-readable evidence, policy bundle releases. | `dot attest`, `dot secrets verify` |
110
- | **Fleet management** | Multi-node drift dashboard, per-host profiles. | `dot fleet` |
111
- | **Self-healing** | Auto-repair tools, chezmoi drift, broken symlinks, missing files. | `dot heal`, `dot chaos`, `dot rollback`, `dot bundle` |
112
- | **Sub-second startup** | Lazy loading, `_cached_eval` pattern, mtime-based cache invalidation, realpath sidecar pins. | `dot perf`, `dot health` |
113
- | **Multi-shell parity** | Tier-1 (full): zsh, bash. Tier-2 (bridged): fish. Tier-3 (compatible): nushell. PowerShell is supported as a contract-tested parity target. A cross-shell parity contract ([`tests/integration/test_shell_parity.sh`](tests/integration/test_shell_parity.sh)) verifies the canonical command surface and a runtime smoke in every available shell. See [ADR-007](docs/adr/ADR-007-multi-shell-parity.md) and [ADR-011](docs/adr/ADR-011-nushell-tier3-keep.md). | `dot env`, `dot profile` |
114
- | **Build artifacts → /tmp** | Cargo, Go, pip, uv, and Zig caches redirect to `/tmp/builds/`. Project dirs stay clean. | `~/.config/mise/config.toml`, `~/.cargo/config.toml` |
115
- | **Encrypted secrets** | Age and SOPS keep per-machine secrets out of plaintext history. | `dot secrets` |
116
- | **Portable runtimes** | Mise for managed toolchains. Nix Flakes for strict reproducibility. | `dot env`, `dot upgrade` |
117
- | **Schema-validated config** | `.chezmoidata.toml` is checked against a JSON Schema in CI via taplo. Typos in feature flags or profile names fail at PR time. | `config/chezmoidata.schema.json` |
257
+ ## Quick Start
258
+
259
+ ```bash
260
+ bash -c "$(curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh)"
261
+ dot doctor # audit tools, paths, portability, security
262
+ dot learn # interactive tour of shells, secrets, themes, performance
263
+ dot theme rebuild # generate themes from the wallpapers on this machine
264
+ dot theme toggle # swap dark and light within the current family
265
+ dot sync # apply the source tree; the next shell hydrates its caches
266
+ ```
267
+
268
+ ### First 5 Minutes
269
+
270
+ 1. **Check** — `dot doctor` validates tools, paths, and security.
271
+ 2. **Explore** — `dot learn` walks through shells, secrets, themes,
272
+ and performance.
273
+ 3. **Customize** — edit `~/.config/chezmoi/chezmoi.toml` for
274
+ per-machine settings
275
+ ([Profiles](docs/reference/PROFILES.md)).
276
+ 4. **Toggle features** — flip flags in `.chezmoidata.toml`
277
+ ([Feature Flags](docs/reference/FEATURES.md)).
278
+ 5. **Apply** — `dot sync` applies the config, and the next
279
+ interactive shell hydrates its caches through `_cached_eval`.
280
+
281
+ Upgrades between versions are covered in
282
+ [`docs/operations/MIGRATION.md`](docs/operations/MIGRATION.md).
118
283
 
119
284
  ---
120
285
 
121
- ## Architecture
286
+ ## The dotfiles family
122
287
 
123
- The CLI is idempotent. Run it once or a hundred times. Same machine state.
288
+ One repository, one release train: the `dot` framework plus four
289
+ satellites that ship inside it and version with it. The version
290
+ number in `.chezmoidata.toml` is the compatibility contract — CI's
291
+ `Generators / version-consistency` job checks it against eight
292
+ human-visible surfaces (`package.json`, `bin/dot`, the man page, the
293
+ `bento` banner, this README's badge, `CLAUDE.md`, [`AGENTS.md`](AGENTS.md)) on
294
+ every push.
124
295
 
125
- ```mermaid
126
- graph TD
127
- A[User Shell] --> B{dot CLI}
128
- B --> C[Lifecycle: sync / apply / rollback / heal]
129
- B --> D[Diagnostics: doctor / drift / benchmark / score]
130
- B --> E[AI & Agents: ai / mcp / agent / mode]
131
- B --> F[Themes: theme / theme rebuild]
132
- B --> G[Fleet & Attest: fleet / attest / bundle]
296
+ | Component | What it is | Use case |
297
+ |---|---|---|
298
+ | **`dot`** ([`bin/dot`](bin/dot) + [`lib/dot`](lib/dot/README.md)) | Bash dispatcher and shared library — lifecycle, diagnostics, themes, secrets, fleet, agents | Everything below; also shipped alone as the release archive. |
299
+ | **`dot-ui`** ([`defaults/dot_local/share/dot-ui`](defaults/dot_local/share/dot-ui)) | Go renderer for tables, pickers, and progress used by `dot` | Consistent terminal UI across every subcommand; built on apply by a `run_onchange` hook. |
300
+ | **`dot-ai-tui`** ([`defaults/dot_local/share/dot-ai-tui`](defaults/dot_local/share/dot-ai-tui)) | Go Bubble Tea cockpit behind `dot ai` | Install, run, chat with, and meter Claude, Codex, Copilot, Aider, OpenCode and friends from one screen. |
301
+ | **`dot mcp`** ([`docs/security/MCP_POLICY.md`](docs/security/MCP_POLICY.md)) | MCP policy, supply-chain, and registry audit over `mcp-policy.json` / `mcp-registry.json` | Keep Model Context Protocol servers inside an allowlist before an agent touches them. |
302
+ | **`dot-mcp`** ([`defaults/dot_local/share/dot-mcp`](defaults/dot_local/share/dot-mcp)) | Go stdio MCP server behind `dot mcp serve` — JSON-RPC 2.0, four read-only tools, five resources | Let an MCP client audit this workstation's policy, agent mode, attestation and drift without being able to change it. |
303
+ | **`dot-sys`** ([`lib/wasm-tools`](lib/wasm-tools/README.md)) | Rust crate built for `wasm32-wasip1` and run under `wasmtime` | `dot attest --verify`: check a workstation evidence record in a sandbox with no filesystem, network or environment, so the verdict does not depend on the machine being reviewed. |
304
+ | **Module registry** ([`docs/operations/REGISTRY.md`](docs/operations/REGISTRY.md)) | JSON index of reusable dotfile modules, schema at [`docs/schema/dot-registry-v1.json`](docs/schema/dot-registry-v1.json) | `dot registry list / search / install` with SHA-256-verified archives and a chezmoi preview before apply. |
133
305
 
134
- C --> H[Chezmoi Source]
135
- F --> I[Wallpaper Discovery<br/>System + Custom]
136
- I --> J[K-Means CIELAB Engine]
137
- J --> K[themes.toml<br/>WCAG AAA enforced]
138
- K --> H
306
+ ### Install the pieces
139
307
 
140
- H --> L[Zsh / Fish / Bash / Nushell / PowerShell]
141
- H --> M[Mise / Nix Toolchains]
142
- H --> N[MCP Policy / Agent Profiles]
143
- L --> O[~/.cache/shell Fast Init]
308
+ ```bash
309
+ # The framework (everything, chezmoi-managed)
310
+ bash -c "$(curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh)"
144
311
 
145
- G --> P[Signed Attestation Logs]
312
+ # Only the dot CLI, from the attested release archive
313
+ gh release download v0.2.520 --repo sebastienrousseau/dotfiles --pattern 'dot-*.tar.gz'
314
+
315
+ # The Go satellites are (re)built on apply by
316
+ # defaults/run_onchange_24-build-dot-ui.sh.tmpl
317
+ # defaults/run_onchange_25-build-dot-ai-tui.sh.tmpl
318
+ # defaults/run_onchange_26-build-dot-mcp.sh.tmpl
319
+
320
+ # A registry module
321
+ dot registry search fonts && dot registry install <module> --yes
322
+ ```
323
+
324
+ ### Per-host quick links
325
+
326
+ | If you use… | Drop-in config |
327
+ |---|---|
328
+ | **Claude Code** | the shipped [`dotfiles-bootstrap` skill](defaults/dot_claude/skills/dotfiles-bootstrap/SKILL.md) — `/skills` discovers it and runs `dot init` with profile-aware safety defaults |
329
+ | **Cursor / Codex / Windsurf / Zed / Roo / Aider / Continue / Jules** | `dot agents render` regenerates every harness stub from [`CLAUDE.md`](CLAUDE.md); `dot agents check` fails when they drift |
330
+ | **A2A-capable agents** | the agent card at [`.well-known/agent.json`](.well-known/agent.json), validated by `dot agent a2a-card` and `dot agent conformance` ([`docs/interop/A2A.md`](docs/interop/A2A.md)) |
331
+ | **Ghostty / Alacritty / Kitty / WezTerm / Warp / iTerm2 / tmux / Neovim / VS Code** | themed on every `dot theme` switch — see [Wallpaper-driven themes](#wallpaper-driven-themes) |
332
+
333
+ ### How good is this, really?
334
+
335
+ The rating is a set of programs, and each one prints the command
336
+ next to the number.
337
+
338
+ ```sh
339
+ dot score # system health and security scorecard
340
+ dot security-score -j # workstation security posture, JSON
341
+ dot doctor --score # tools, paths, portability, AI analysis
342
+ make test # the reliability audit CI runs
343
+ ```
344
+
345
+ What the repository can show today:
346
+
347
+ - **OpenSSF Scorecard 7.6 / 10** at the last recorded snapshot
348
+ (2026-05-17), regenerated weekly and written into
349
+ [`docs/security/SCORECARD.md`](docs/security/SCORECARD.md) with
350
+ the per-check breakdown. The badge above is live.
351
+ - **OpenSSF Best Practices: passing (100%)**, project
352
+ [12840](https://www.bestpractices.dev/projects/12840).
353
+ - **652 unit test files, 14 integration suites, 18 regression
354
+ tests**, a golden-snapshot suite for `dot --help` / `version` /
355
+ `doctor` / `perf` / `health`, and an `install.sh` fuzz harness —
356
+ see [`tests/README.md`](tests/README.md).
357
+ - **Bash line coverage floor 58%** measured by pure `xtrace`, no
358
+ kcov, ratcheted up slice by slice with the history recorded in
359
+ [`coverage.yml`](.github/workflows/coverage.yml).
360
+ - **51 workflows**, every third-party action SHA-pinned, Harden
361
+ Runner in every one of them.
362
+
363
+ The gaps, so nobody has to find them:
364
+
365
+ - Scorecard's `Code-Review` check scores **0**: one maintainer,
366
+ merges gated by CI rather than by a second reviewer.
367
+ - OSS-Fuzz onboarding is prepared under
368
+ [`fuzz/oss-fuzz/`](fuzz/oss-fuzz/project.yaml) but
369
+ **not yet submitted**; ClusterFuzzLite runs in the meantime.
370
+ - Repology tracks one packaging (AUR `dot-cli-git`); Homebrew and
371
+ Scoop go through this project's own tap and bucket.
372
+ - Nushell sits at Tier 3 with under 5% feature parity
373
+ ([ADR-011](docs/adr/ADR-011-nushell-tier3-keep.md)).
374
+
375
+ Each number above names the command or the file that produced it.
376
+ The Scorecard breakdown is
377
+ [`docs/security/SCORECARD.md`](docs/security/SCORECARD.md), the
378
+ coverage history is in
379
+ [`coverage.yml`](.github/workflows/coverage.yml), and
380
+ [`docs/STRUCTURE.md`](docs/STRUCTURE.md) maps every top-level path
381
+ to the component that owns it. The rest of this README covers the
382
+ **framework** surface.
383
+
384
+ ---
385
+
386
+ ## One-minute migration from another dotfiles manager
387
+
388
+ The one-minute version is `dot init`. It clones any GitHub user's
389
+ dotfiles repository through this harness, refuses to clobber an
390
+ existing chezmoi source without `--force`, insists on HTTPS, and
391
+ previews with `--dry-run`:
392
+
393
+ ```bash
394
+ dot init alice --dry-run # preview: what github.com/alice/dotfiles would do
395
+ dot init alice # clone + apply through the dot harness
396
+ dot init https://... --no-apply
397
+ ```
398
+
399
+ Coming from a specific tool? The headline mapping is below, and
400
+ `dot init --dry-run` shows what the move would produce on this
401
+ machine before anything is written.
402
+
403
+ | Coming from | What changes |
404
+ |---|---|
405
+ | **yadm** | bare-repo tracking → a chezmoi source tree; `yadm alt` → `.tmpl` files driven by `.chezmoidata.toml`; `yadm encrypt` → age / SOPS through `dot secrets` |
406
+ | **GNU Stow** | one package directory per tool → one `dot_config/<tool>/` tree, deployed by `chezmoi apply` instead of a symlink farm |
407
+ | **bare git repository** (`config` alias) | `$HOME` as work tree → `~/.dotfiles` as source; `config status` → `dot status` / `dot diff` |
408
+ | **plain chezmoi** | keep your source tree as it is; gain `dot doctor` / `heal` / `theme` / `secrets` / `fleet` on top; `chezmoi apply` → `dot sync` |
409
+
410
+ Upgrades between versions of this project are a different document:
411
+ [`docs/operations/MIGRATION.md`](docs/operations/MIGRATION.md).
412
+
413
+ ---
414
+
415
+ ## Why this approach?
416
+
417
+ Most dotfiles repositories are personal collections. This one is
418
+ built as workstation infrastructure: chezmoi is the templating
419
+ engine ([ADR-005](docs/adr/ADR-005-chezmoi-choice.md)), `dot` is the
420
+ lifecycle CLI on top ([ADR-004](docs/adr/ADR-004-cli-architecture.md)),
421
+ and every claim on this page has a test, a workflow, or a document
422
+ behind it.
423
+
424
+ Three choices you will not find in `mathiasbynens/`, `holman/`, or
425
+ `paulirish/`:
426
+
427
+ 1. **Wallpaper-driven terminal themes.** K-Means clustering in
428
+ CIELAB extracts a palette from any wallpaper; the engine enforces
429
+ WCAG AAA (7:1) contrast and writes `themes.toml` itself. 228
430
+ generated themes ship today
431
+ ([ADR-009](docs/adr/ADR-009-wallpaper-driven-theming.md)).
432
+ 2. **First-class agent governance.** Bounded profiles (`ask` /
433
+ `plan` / `apply` / `audit`), MCP policy enforcement, A2A
434
+ discovery, and signed attestation logs for every agent session
435
+ ([`docs/security/MCP_POLICY.md`](docs/security/MCP_POLICY.md),
436
+ [`docs/interop/A2A.md`](docs/interop/A2A.md)).
437
+ 3. **Verified multi-shell parity.** One alias and function hub
438
+ feeds zsh, bash, fish, nushell, and PowerShell; a parity contract
439
+ runs the canonical command surface in every available shell on
440
+ every PR ([ADR-007](docs/adr/ADR-007-multi-shell-parity.md)).
441
+
442
+ Two architectural choices make the rest cheap:
443
+
444
+ - **Lazy hydration.** The prompt paints first from static escape
445
+ codes; tool initialisations (`mise`, `atuin`, `zoxide`, `starship`)
446
+ run through `_cached_eval`, which sources cached `init` output and
447
+ invalidates on the binary's mtime and realpath. Heavy binaries
448
+ resolve asynchronously after the first prompt
449
+ ([ADR-002](docs/adr/ADR-002-shell-performance.md)).
450
+ - **Idempotent, verifiable apply.** `dot sync` is chezmoi apply plus
451
+ drift detection; `dot heal` repairs tools, symlinks, and missing
452
+ files; `dot rollback` returns to a known-good state; `dot chaos`
453
+ breaks things on purpose to prove the loop closes.
454
+
455
+ The default install is signed (SSH ed25519 commits enforced on
456
+ `main`), attested (SLSA provenance and Cosign-signed SBOM per
457
+ release), multi-platform (macOS, Linux, WSL2, Apple Silicon CI
458
+ runners, Windows PowerShell), and schema-checked (`.chezmoidata.toml`
459
+ against [`config/chezmoidata.schema.json`](config/chezmoidata.schema.json)
460
+ via taplo on every PR).
461
+
462
+ ---
463
+
464
+ ## Capabilities at a glance
465
+
466
+ | Theme | Headline deliverables |
467
+ | :--- | :--- |
468
+ | Wallpaper-driven themes | K-Means clustering in CIELAB extracts terminal palettes from any wallpaper; WCAG AAA enforced; Apple-compatible dynamic HEIC dark/light; 228 generated themes; `dot theme rebuild` |
469
+ | AI and MCP native | Agent profiles (`dot mode`), MCP policy and registry audit (`dot mcp`), agent card, checkpoints and conformance (`dot agent`), AI commit messages (`dot commit`), the `dot ai` cockpit and local gateway |
470
+ | Cryptographic attestation | Signed commits and tags, machine-readable workstation evidence (`dot attest`), policy-bundle releases, `dot keys sign-check`, `dot secret-audit` |
471
+ | Fleet management | Multi-node status, drift, events, namespaces and RBAC enforcement mode (`dot fleet`); `dot fleet apply` over SSH; `dot teleport` to bring up a remote host |
472
+ | Self-healing | `dot heal`, `dot chaos`, `dot rollback`, `dot bundle`; chezmoi drift, broken symlinks, missing files, checksum-verified tool recovery |
473
+ | Sub-second startup | Lazy loading, `_cached_eval`, mtime-based cache invalidation, realpath sidecar pins; `dot perf`, `dot benchmark`, `dot health` |
474
+ | Multi-shell parity | Tier 1 (full): zsh, bash. Tier 2 (bridged): fish. Tier 3 (compatible): nushell. PowerShell as a contract-tested parity target ([`tests/integration/test_shell_parity.sh`](tests/integration/test_shell_parity.sh)) |
475
+ | Build artifacts to `/tmp` | Cargo, Go, pip, uv, and Zig caches redirect to `/tmp/builds/` via `~/.config/mise/config.toml` and `~/.cargo/config.toml`; project directories stay clean |
476
+ | Encrypted secrets | age and SOPS at rest; macOS Keychain, `pass`, or age-encrypted store selected by policy; `dot secrets`, `dot secret-audit`, `dot ssh-key`, `dot ssh-cert` |
477
+ | Portable runtimes | mise for managed toolchains with a cross-platform `mise.lock`; Nix flake for strict reproducibility; `dot env`, `dot tools`, `dot upgrade` |
478
+ | Schema-validated config | `.chezmoidata.toml` checked against a JSON Schema in CI; `dot env emit` writes a v1-schema environment manifest; the registry index has its own schema |
479
+ | Supply chain | SHA-pinned actions, Harden Runner, SLSA L3 provenance, Cosign keyless signing, SPDX SBOM, OpenSSF Scorecard and Best Practices, gitleaks + detect-secrets + TruffleHog, dependency review, CodeQL, Checkov |
480
+
481
+ ---
482
+
483
+ ## Five shells, one alias hub
484
+
485
+ The dotfiles expose one command surface over five shells through a
486
+ hub-and-spoke bridge ([ADR-007](docs/adr/ADR-007-multi-shell-parity.md)):
487
+
488
+ - **Hub** — canonical aliases and functions live once, in Bash/POSIX,
489
+ under `defaults/.chezmoitemplates/aliases/` and
490
+ `defaults/.chezmoitemplates/functions/`. Adding one propagates to
491
+ every shell.
492
+ - **Tier 1 (full): zsh, bash** — direct inclusion, lazy loading,
493
+ `_cached_eval`, staged `rc.d` modules.
494
+ - **Tier 2 (bridged): fish** — a runtime bash bridge with a cached
495
+ `abbr` table (878 entries source in 34 ms, down from 170 ms when
496
+ they were `alias` functions), plus native `dot` completions.
497
+ - **Tier 3 (compatible): nushell** — simple aliases extracted and
498
+ cached to `~/.cache/nushell/bash-aliases.nu`; functions delegate to
499
+ bash at roughly 5 ms per call
500
+ ([ADR-011](docs/adr/ADR-011-nushell-tier3-keep.md) explains why it
501
+ stays).
502
+ - **PowerShell** — a managed profile, the native `dot.ps1` for the
503
+ daily workflow, and a parity contract that runs on every PR
504
+ ([`docs/reference/POWERSHELL_PARITY.md`](docs/reference/POWERSHELL_PARITY.md)).
505
+
506
+ [`tests/integration/test_shell_parity.sh`](tests/integration/test_shell_parity.sh)
507
+ verifies the canonical command surface and a runtime smoke in every
508
+ shell present on the runner; the `Reliability Gate` workflow adds
509
+ WSL and PowerShell contract jobs.
510
+
511
+ ```bash
512
+ dot completion zsh # completions are generated from the command registry,
513
+ dot completion fish # never hand-maintained — bash, zsh, fish, and nu
514
+ dot aliases tiers # which alias tiers and ecosystems are enabled here
515
+ dot aliases why gco # provenance and deprecation status of one alias
146
516
  ```
147
517
 
148
518
  ---
149
519
 
150
- ## Wallpaper-Driven Themes
520
+ ## Comparison
521
+
522
+ `.dotfiles` is the only dotfiles distribution in this comparison
523
+ that ships wallpaper-derived WCAG-AAA themes, agent governance,
524
+ cryptographic attestation, a self-healing CLI, and fleet apply on
525
+ top of a stock chezmoi source tree.
526
+
527
+ | | This repo | chezmoi | holman/dotfiles | nikitabobko/dotfiles |
528
+ |:---|:---:|:---:|:---:|:---:|
529
+ | Cross-platform (macOS/Linux/WSL) | ✓ | ✓ | macOS-leaning | macOS only |
530
+ | Multi-shell parity (zsh/fish/nu/pwsh) | ✓ | — | bash only | zsh only |
531
+ | Wallpaper-driven themes (K-Means) | ✓ | — | — | — |
532
+ | AI / MCP integration | ✓ | — | — | — |
533
+ | Cryptographic attestation | ✓ | — | — | — |
534
+ | Self-healing CLI | ✓ | — | — | — |
535
+ | Fleet management | ✓ | — | — | — |
536
+ | Encrypted secrets (age/SOPS) | ✓ | ✓ | — | — |
537
+ | Build artifact redirection | ✓ | — | — | — |
538
+ | Schema-validated config | ✓ | — | — | — |
539
+
540
+ `chezmoi` is the underlying templating engine. This repo is the
541
+ opinionated reference implementation on top of it, and
542
+ [plain chezmoi users can adopt it without moving their source tree](#one-minute-migration-from-another-dotfiles-manager).
543
+
544
+ ---
545
+
546
+ ## Benchmarks
547
+
548
+ Two budgets are enforced in CI, and both state their method.
549
+
550
+ **`dot` cold start** — `tools/ci/dot-cli-startup-bench.sh` runs
551
+ `dot version` eleven times under a clean `env -i` shell and takes
552
+ the median. [`dot-cli-bench.yml`](.github/workflows/dot-cli-bench.yml)
553
+ fails the build above the budget on every push and PR touching
554
+ `bin/dot` or `scripts/dot/`; a median more than 15% over the previous
555
+ baseline is a warning.
556
+
557
+ | Runner | Budget (median of 11) | Observed |
558
+ |---|---:|---:|
559
+ | Linux (`ubuntu-latest`) | 150 ms | within budget on every green run |
560
+ | macOS | 200 ms | within budget on every green run |
561
+ | Windows (PowerShell) | 300 ms | within budget on every green run |
562
+ | Local macOS, bash 5.x | — | **~47 ms** (recorded in the workflow header and `CHANGELOG.md`) |
563
+
564
+ **Interactive shell startup** — `dot perf` (backed by
565
+ `scripts/diagnostics/perf.sh`, `hyperfine`-style warm-up plus three
566
+ runs, mean) measures every installed shell against a per-shell
567
+ target, compares with a recorded baseline in
568
+ `~/.cache/dotfiles/perf-baseline.json`, and flags any shell more
569
+ than 10% slower. [`perf-baseline.yml`](.github/workflows/perf-baseline.yml)
570
+ records the reference weekly on Ubuntu and measures every push to a
571
+ `feat/**` branch that touches shell code.
572
+
573
+ | Shell | Target (mean) | Override |
574
+ |---|---:|---|
575
+ | zsh | 250 ms | `DOTFILES_PERF_TARGET_ZSH_MS` |
576
+ | bash | 60 ms | `DOTFILES_PERF_TARGET_BASH_MS` |
577
+ | fish | 200 ms | `DOTFILES_PERF_TARGET_FISH_MS` |
578
+ | nushell | 500 ms | `DOTFILES_PERF_TARGET_NU_MS` |
579
+ | PowerShell | 600 ms | `DOTFILES_PERF_TARGET_PWSH_MS` |
580
+
581
+ Measured deltas that shipped with their method in `CHANGELOG.md`:
582
+ fish startup **217 ms → 119 ms** by emitting the alias bridge as
583
+ `abbr` instead of `alias` (#963); ~140 ms saved per fish start by
584
+ shadowing Homebrew's eager `direnv` / `mise` `vendor_conf.d` hooks;
585
+ 20–50 ms saved per tool by `_cached_eval`
586
+ ([`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md)).
587
+ The original threshold and the `hyperfine --warmup 3 --runs 10
588
+ "zsh -i -c exit"` recipe are in
589
+ [ADR-002](docs/adr/ADR-002-shell-performance.md).
590
+
591
+ Numbers on your own machine:
592
+
593
+ ```bash
594
+ dot perf # every installed shell vs its target
595
+ dot perf --baseline # record this machine's known-good point
596
+ dot benchmark # per-component startup profile
597
+ dot load-bench # time to heavy-layer readiness
598
+ ```
599
+
600
+ Budgets, baseline lifecycle, and the regression-issue pipeline are
601
+ documented in
602
+ [`docs/operations/PERFORMANCE.md`](docs/operations/PERFORMANCE.md);
603
+ the harnesses are
604
+ [`tools/ci/dot-cli-startup-bench.sh`](tools/ci/dot-cli-startup-bench.sh)
605
+ and [`benches/`](benches/).
606
+
607
+ ---
608
+
609
+ ## Features
610
+
611
+ | | |
612
+ | :--- | :--- |
613
+ | **Shells and navigation** | Zsh loads in stages through small `rc.d` modules, not one startup script. Fish uses `_cached_eval` and deferred loading. Bash ships full parity with zsh for tooling and aliases. Nushell handles structured workflows (Tier 3). PowerShell keeps cross-platform and WSL sessions on the same baseline with a `pwsh` parity contract in CI. Starship, Zoxide, Atuin, and fzf for navigation and recall. Starship Transient Prompt collapses past prompts to a single glyph on fish; the zsh hook is in place for when upstream lands the matching function ([ADR-010](docs/adr/ADR-010-starship-transient-prompt.md)). |
614
+ | **Development and runtimes** | mise manages language versions in user space with a cross-platform `mise.lock` (Linux, macOS, Windows, exact URLs and SHA-256s). Nix Flakes for strict reproducibility when speed is not the priority. Pueue queues long-running tasks instead of extra tabs. Neovim ships as a full Lua editor, not a starter template. Lazygit for terminal git. Build caches (Cargo, Go, pip, uv, Zig) redirect to `/tmp/builds/` and clear on reboot. `_cached_eval` caches expensive `tool init` output with mtime and realpath invalidation; `EVALCACHE_DISABLE=true` bypasses it. |
615
+ | **AI, agents, and MCP** | Agent profiles (`dot mode`): ask, plan, apply, audit. Pattern library (`dot patterns`): architect, hardener, refactor, bundled in `dot_config/ai/patterns/`. MCP policy enforcement (`dot mcp`). AI commit messages (`dot commit`). The `dot ai` cockpit installs and runs Codex, Copilot, Antigravity, Aider, OpenCode and friends from one Bubble Tea TUI; `dot ai serve` exposes your Claude subscription locally to any Anthropic- or OpenAI-protocol tool ([ADR-012](docs/adr/ADR-012-ai-fleet-local-proxy.md), [`docs/AI.md`](docs/AI.md)). Every agent session is logged with a policy hash and an outcome. |
616
+ | **Security, trust, governance** | age and SOPS keep secrets encrypted at rest and out of history. SSH ed25519 signing plus trust metadata back every commit. Gitleaks, detect-secrets, TruffleHog, policy checks, and compliance workflows. `dot attest` records machine state, policy, prompt, and model metadata in tracked JSON. Telemetry controls and local-first defaults (`dot telemetry`, `dot dns-doh`, `dot firewall`, `dot usb-safety`, `dot lock-screen`, `dot encrypt-check`). SPDX SBOM and Grype CVE scanning in CI. npm releases authenticate through OIDC trusted publishing with provenance, never a long-lived token. |
617
+ | **Themes** | 228 wallpaper-derived themes, dark and light paired; `dot theme`, `dot theme toggle`, `dot theme family`, `dot theme sync` with the OS appearance; `dot wallpaper rotate` and `dot wallpaper sync`. See [Wallpaper-driven themes](#wallpaper-driven-themes). |
618
+ | **Fleet and remote** | `dot fleet` status, drift, events, namespace, RBAC enforce mode; `dot fleet apply` runs `dot sync` (or a custom `--cmd`) on every host in `fleet.toml`; `dot teleport` deploys the environment to a fresh host over SSH; `dot bundle` builds an offline archive. |
619
+ | **Diagnostics** | `dot doctor` (deep audit, `--ai` analysis), `dot health` dashboard, `dot score`, `dot security-score`, `dot fleet drift`, `dot snapshot`, `dot metrics` (JSONL observability), `dot history`, `dot packages`. |
620
+ | **Distribution** | Release archives with a `PREFIX` / `DESTDIR` Makefile, man page (`share/man/man1/dot.1`), generated completions, Homebrew tap, Scoop bucket, AUR, npm, Nix; `dot uninstall` removes the managed environment. |
621
+
622
+ ---
623
+
624
+ ## Wallpaper-driven themes
151
625
 
152
626
  Drop a wallpaper. Get a theme.
153
627
 
154
- `dot theme rebuild` discovers system wallpapers and your custom ones. On macOS it looks in `/System/Library/Desktop Pictures/`. On Linux it looks in `/usr/share/backgrounds/`. Custom wallpapers live in `~/Pictures/Wallpapers/`. K-Means clustering in CIELAB color space extracts dominant colors. The engine then generates a 16-color terminal palette, enforces WCAG AAA contrast, and assembles `themes.toml` on its own.
628
+ `dot theme rebuild` discovers system wallpapers and your custom
629
+ ones. On macOS it looks in `/System/Library/Desktop Pictures/`. On
630
+ Linux it looks in `/usr/share/backgrounds/`. Custom wallpapers live
631
+ in `~/Pictures/Wallpapers/` (`DOTFILES_WALLPAPER_DIR` overrides).
632
+ K-Means clustering in CIELAB colour space extracts the dominant
633
+ colours; the engine generates a 16-colour terminal palette, enforces
634
+ WCAG AAA contrast (7:1 for fg/bg, accent text on accent, and c15 on
635
+ bg), and assembles `defaults/.chezmoidata/themes.toml` on its own.
636
+ Extraction runs four jobs in parallel, results are cached in
637
+ `~/.cache/dotfiles/themes/`, and only changed wallpapers are
638
+ regenerated.
155
639
 
156
640
  | Tier | Source | Format |
157
641
  |:---|:---|:---|
@@ -161,44 +645,132 @@ Drop a wallpaper. Get a theme.
161
645
  ```bash
162
646
  dot theme # interactive picker (paired themes only)
163
647
  dot theme tahoe-dark # switch directly
164
- dot theme toggle # swap darklight within current family
648
+ dot theme toggle # swap dark and light within the current family
649
+ dot theme family # cycle between theme families
650
+ dot theme sync # follow the OS dark/light setting
165
651
  dot theme rebuild # regenerate from current wallpapers
166
652
  ```
167
653
 
168
- On theme switch, every managed surface updates. Terminals: Ghostty, Alacritty, Kitty, WezTerm, Warp, iTerm2, tmux. Editors: Neovim and VS Code. The theme also sets GTK and icon themes, the macOS accent and dark-mode toggle (with a forced UI refresh), the browser color mode, and the wallpaper. On Linux, the engine auto-converts HEIC to PNG via `magick` or `heif-convert`.
654
+ On theme switch, every managed surface updates. Terminals: Ghostty,
655
+ Alacritty, Kitty, WezTerm, Warp, iTerm2, tmux. Editors: Neovim and
656
+ VS Code. The theme also sets GTK and icon themes, the macOS accent
657
+ colour and dark-mode toggle (with a forced UI refresh), the browser
658
+ colour mode, and the wallpaper. On Linux the engine converts HEIC to
659
+ PNG through `magick` or `heif-convert`.
660
+
661
+ Full guide: [`docs/guides/THEMING.md`](docs/guides/THEMING.md).
662
+ Rationale: [ADR-009](docs/adr/ADR-009-wallpaper-driven-theming.md).
663
+
664
+ ---
665
+
666
+ ## Agent governance (ask / plan / apply / audit)
667
+
668
+ Agents run under a named profile that bounds what they may do, and
669
+ every run leaves evidence:
670
+
671
+ ```bash
672
+ dot mode list # ask / plan / apply / audit
673
+ dot mode set plan # switch the active profile
674
+ dot mode run plan git status # run one command under a profile, with a checkpoint
675
+ dot mode doctor # validate agent-profiles.json and the default
676
+ dot agent log # tail the session audit log
677
+ dot agent checkpoint list # saved run checkpoints (save / list / show / replay)
678
+ dot fleet enforce strict # advisory → strict RBAC for agent profiles
679
+ ```
680
+
681
+ The MCP side is policy-first: `dot mcp doctor` audits configured
682
+ Model Context Protocol servers against
683
+ `defaults/dot_config/dotfiles/mcp-policy.json` (allowlist, supply
684
+ chain, config), and `dot mcp registry` shows the registry it was
685
+ checked against. `dot attest` exports the workstation's version,
686
+ platform, signing settings, active profile, and policy hash as
687
+ tracked JSON ([`docs/operations/ATTESTATION.md`](docs/operations/ATTESTATION.md)).
688
+ The A2A agent card and conformance suite are in
689
+ [`docs/interop/A2A.md`](docs/interop/A2A.md); the trust model that
690
+ ties signing, secrets, profiles, and attestation together is
691
+ [`docs/manual/01-concepts/02-trust-model.md`](docs/manual/01-concepts/02-trust-model.md).
692
+
693
+ ---
694
+
695
+ ## Self-healing and rollback
696
+
697
+ The CLI is idempotent, and it checks its own work.
698
+
699
+ ```bash
700
+ dot doctor # deep audit: tools, paths, portability, AI analysis
701
+ dot heal # auto-fix tools, chezmoi drift, broken symlinks, missing files
702
+ dot chaos --dry-run # simulate config corruption, then prove heal closes the loop
703
+ dot rollback # return to a previous known-good state
704
+ dot snapshot # capture a baseline to compare against later
705
+ ```
706
+
707
+ Tool recovery is checksum-verified: Nushell, Pueue, Wasmtime, SOPS,
708
+ Yazi, and Zellij are restored from exact mise / aqua pins, never
709
+ from a mutable release URL. `dot health` renders the cache and tool
710
+ state as a live dashboard (`-j` for JSON); its output, like
711
+ `doctor`, `perf`, `version`, and `--help`, is pinned by golden
712
+ snapshots in [`tests/snapshots/`](tests/snapshots/).
713
+
714
+ ---
715
+
716
+ ## Fleet apply
717
+
718
+ ```toml
719
+ # ~/.config/dotfiles/fleet.toml (DOTFILES_FLEET_HOSTS overrides the path)
720
+ [hosts.laptop]
721
+ ssh = "user@laptop.local"
722
+ profile = "workstation"
723
+ ```
724
+
725
+ ```bash
726
+ dot fleet # this node: id, namespace, version, OS, drift, last apply
727
+ dot fleet drift # configuration drift across managed files
728
+ dot fleet apply # every host runs: dot sync && dot doctor --quiet
729
+ dot fleet apply --cmd uptime # or an arbitrary command — this is the trust boundary
730
+ dot fleet namespace staging # multi-tenant isolation
731
+ dot fleet events # recent fleet events from the local log
732
+ ```
169
733
 
170
- Full guide: [docs/guides/THEMING.md](docs/guides/THEMING.md)
734
+ Hostnames are validated against `[A-Za-z0-9._@:+/-]+` before any SSH
735
+ fan-out; first connections use `StrictHostKeyChecking=accept-new`,
736
+ so pre-populate `~/.ssh/known_hosts` if your threat model allows no
737
+ TOFU window. `dot teleport` brings a fresh machine up over SSH
738
+ before it joins the fleet. The concept chapter is
739
+ [`docs/manual/01-concepts/04-fleet.md`](docs/manual/01-concepts/04-fleet.md).
171
740
 
172
741
  ---
173
742
 
174
743
  ## The `dot` CLI
175
744
 
176
- Over 80 commands grouped by intent. Run `dot help` for the full reference.
745
+ 75 subcommands, 144 indexed entries, grouped by intent. `dot help`
746
+ shows the overview, `dot help all` the full reference, `dot search
747
+ <keyword>` filters it. The generated
748
+ [command index](docs/manual/command-index.md) is checked against
749
+ `dot help all` on every PR.
177
750
 
178
- ### Start Here
751
+ ### Start here
179
752
 
180
753
  | | |
181
754
  |:---|:---|
182
- | `dot init <user>` | Bootstrap any GitHub user's dotfiles repo through this harness |
183
- | `dot sync` | Apply dotfiles to this machine |
755
+ | `dot init <user>` | Bootstrap any GitHub user's dotfiles repository through this harness |
756
+ | `dot sync` | Apply dotfiles to this machine (`--pull` to fetch first, `--check` to preview) |
184
757
  | `dot doctor` | Check the environment and surface issues |
185
758
  | `dot learn` | Open the guided tour |
186
759
  | `dot agents render` | Sync `CLAUDE.md` → `AGENTS.md` + Cursor + Codex stubs |
187
760
  | `dot fleet apply` | SSH out to every host in `~/.config/dotfiles/fleet.toml` |
188
761
  | `dot registry list` | Browse reusable dotfile modules from the registry |
189
762
 
190
- A [Claude Code skill](defaults/dot_claude/skills/dotfiles-bootstrap/SKILL.md) is also shipped — `/skills` discovers `dotfiles-bootstrap` and runs `dot init` with profile-aware safety defaults.
191
-
192
- ### Daily Use
763
+ ### Daily use
193
764
 
194
765
  | | |
195
766
  |:---|:---|
196
767
  | `dot status` / `dot diff` | Show local drift; preview pending changes |
197
- | `dot edit` | Open the source directory |
198
- | `dot upgrade` | Update tools and dotfiles |
768
+ | `dot edit` / `dot add` | Open the source directory; add a file to the source |
769
+ | `dot upgrade` | Update toolchains, plugins, and dotfiles |
199
770
  | `dot commit` | Generate an AI commit message from the staged diff |
771
+ | `dot search` | Find commands by keyword |
200
772
 
201
- ### Inspect & Repair
773
+ ### Inspect and repair
202
774
 
203
775
  | | |
204
776
  |:---|:---|
@@ -208,147 +780,575 @@ A [Claude Code skill](defaults/dot_claude/skills/dotfiles-bootstrap/SKILL.md) is
208
780
  | `dot chaos` | Simulate corruption to test self-healing |
209
781
  | `dot bundle` | Create an offline tarball of the dotfiles environment |
210
782
 
211
- ### AI & Agents
783
+ ### AI and agents
212
784
 
213
785
  | | |
214
786
  |:---|:---|
215
- | `dot ai` | AI fleet cockpit — run, chat, install, serve a local Claude gateway, cost |
787
+ | `dot ai` | AI fleet cockpit — run, chat, install, serve a local gateway, cost |
216
788
  | `dot mcp` | Inspect MCP policy and registry |
217
789
  | `dot mode` | Show or set the agent profile (ask / plan / apply / audit) |
218
790
  | `dot agent` | Agent metadata, logs, checkpoints, conformance |
219
791
  | `dot patterns` | List bundled AI patterns (architect, hardener, refactor) |
220
792
 
221
- ### Configuration
793
+ ### Configuration commands
222
794
 
223
795
  | | |
224
796
  |:---|:---|
225
797
  | `dot theme` / `dot theme rebuild` | Switch theme or regenerate from wallpapers |
226
- | `dot env` | Show managed tool versions |
227
- | `dot profile` | Show or switch active profile |
228
- | `dot secrets` | Edit encrypted secrets |
229
- | `dot fonts` | Install or refresh Nerd Fonts |
798
+ | `dot env` | Managed tool versions (list, install, use, prune, emit) |
799
+ | `dot profile` | Show or switch the active profile |
800
+ | `dot secrets` | Edit, get, set, list, load encrypted secrets |
801
+ | `dot fonts` | Install or patch Nerd Fonts |
230
802
 
231
- ### Fleet & Performance
803
+ ### Fleet and performance
232
804
 
233
805
  | | |
234
806
  |:---|:---|
235
- | `dot fleet` | Multi-node status, drift, and namespace |
807
+ | `dot fleet` | Multi-node status, drift, events, namespace |
236
808
  | `dot perf` | Measure shell startup |
237
809
  | `dot score` / `dot security-score` | Health and security scorecards |
238
810
  | `dot health` | Live dashboard for caches and tool state |
239
811
 
240
- Full reference: [docs/reference/UTILS.md](docs/reference/UTILS.md) · Complete manual: [docs/manual/](docs/manual/) or `dot manual`
812
+ Full reference: [`docs/reference/UTILS.md`](docs/reference/UTILS.md)
813
+ · manual chapter:
814
+ [`docs/manual/03-reference/01-dot-cli.md`](docs/manual/03-reference/01-dot-cli.md)
815
+ · `man dot` after install.
241
816
 
242
- ---
243
-
244
- ## Documentation
817
+ <details>
818
+ <summary><b>Architecture</b></summary>
245
819
 
246
- The `.dotfiles` Manual is published in nine formats: HTML (single and multi-page), PDF, EPUB, ASCII text, compressed variants, and Markdown source. It auto-builds on every change.
820
+ ```mermaid
821
+ graph TD
822
+ A[User Shell] --> B{dot CLI}
823
+ B --> C[Lifecycle: sync / apply / rollback / heal]
824
+ B --> D[Diagnostics: doctor / drift / benchmark / score]
825
+ B --> E[AI & Agents: ai / mcp / agent / mode]
826
+ B --> F[Themes: theme / theme rebuild]
827
+ B --> G[Fleet & Attest: fleet / attest / bundle]
247
828
 
248
- - **Online** <https://sebastienrousseau.github.io/dotfiles/manual/>
249
- - **Terminal** `dot manual text | less`
250
- - **PDF** `dot manual pdf`
251
- - **Offline copy** `dot manual --offline` (uses the bundled snapshot, no network)
252
- - **Sources** — [`docs/manual/`](docs/manual/)
829
+ C --> H[Chezmoi Source]
830
+ F --> I[Wallpaper Discovery<br/>System + Custom]
831
+ I --> J[K-Means CIELAB Engine]
832
+ J --> K[themes.toml<br/>WCAG AAA enforced]
833
+ K --> H
253
834
 
254
- ---
835
+ H --> L[Zsh / Fish / Bash / Nushell / PowerShell]
836
+ H --> M[Mise / Nix Toolchains]
837
+ H --> N[MCP Policy / Agent Profiles]
838
+ L --> O[~/.cache/shell Fast Init]
255
839
 
256
- ## First 5 Minutes
840
+ G --> P[Signed Attestation Logs]
841
+ ```
257
842
 
258
- 1. **Check** `dot doctor` validates tools, paths, and security
259
- 2. **Explore** `dot learn` walks through shells, secrets, themes, and performance
260
- 3. **Customize** edit `~/.config/chezmoi/chezmoi.toml` for per-machine settings ([Profiles](docs/reference/PROFILES.md))
261
- 4. **Toggle features** flip features in `.chezmoidata.toml` ([Feature Flags](docs/reference/FEATURES.md))
262
- 5. **Apply** `dot sync` applies the config and the next interactive shell hydrates caches via `_cached_eval`
843
+ Root layout: `bin/` (dispatcher), `lib/dot/`
844
+ (shared bash library), `defaults/` (the chezmoi source tree, via
845
+ `.chezmoiroot`), `scripts/` (runtime subcommands), `tools/`
846
+ (repo-only ops), `install/` (bootstrap and channel templates). The
847
+ map of every top-level path, with the history of the reorganisation
848
+ that produced it, is [`docs/STRUCTURE.md`](docs/STRUCTURE.md); the
849
+ contributor-facing
850
+ design is
851
+ [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md).
263
852
 
264
- See the [Migration Guide](docs/operations/MIGRATION.md) for version upgrades.
853
+ </details>
265
854
 
266
855
  ---
267
856
 
268
- ## What's Included
857
+ ## Configuration
269
858
 
270
859
  <details>
271
- <summary><b>Shells and Navigation</b></summary>
860
+ <summary><b>Machine data (<code>.chezmoidata.toml</code>)</b></summary>
272
861
 
273
- - **Zsh** loads in stages through small modules, not one big startup script
274
- - **Fish** uses `_cached_eval` and deferred loading for fast interactive use
275
- - **Bash** ships full parity with zsh for tooling and aliases
276
- - **Nushell** handles structured terminal workflows (Tier-3 compatible)
277
- - **PowerShell** keeps cross-platform and WSL sessions on the same baseline. A `pwsh` parity contract runs in CI on every PR
278
- - **Starship**, **Zoxide**, **Atuin**, and **fzf** for navigation and command recall
279
- - **Starship Transient Prompt** collapses past prompts to a single glyph in scrollback on fish. The zsh hook is in place for when upstream Starship lands the matching function ([ADR-010](docs/adr/ADR-010-starship-transient-prompt.md))
862
+ ```toml
863
+ # defaults/.chezmoidata.toml repo-wide defaults, schema-checked in CI
864
+ dotfiles_version = "0.2.520"
280
865
 
281
- </details>
866
+ [features]
867
+ alias_wrapper = false # confirm destructive aliases
868
+ dms = true # Dank Material Shell theming for GNOME
869
+ zellij = false
870
+ linux_desktop = false # niri, waybar, fuzzel, mako, foot, kanshi follow it
282
871
 
283
- <details>
284
- <summary><b>Development and Runtimes</b></summary>
872
+ [tools]
873
+ node_manager = "mise" # mise | fnm | nvm
874
+
875
+ [secrets.policy]
876
+ provider = "auto" # auto | macos-keychain | pass | plain-enc
877
+ auto_load = true
878
+ ```
285
879
 
286
- - **Mise** manages language versions in user space (no system pollution)
287
- - **Nix Flakes** for strict reproducible builds when speed isn't the priority
288
- - **Pueue** queues long-running tasks instead of spawning extra terminal tabs
289
- - **Neovim** ships as a full Lua-based editor, not a starter template
290
- - **Lazygit** for terminal git workflow without a GUI
291
- - **Build caches** (Cargo, Go, pip, uv, Zig) redirect to `/tmp/builds/` and clear on reboot
292
- - **`_cached_eval`** caches expensive `tool init` output with mtime and realpath invalidation. Set `EVALCACHE_DISABLE=true` to bypass for debugging
880
+ Typos in a flag or profile name fail the `Lint / Chezmoidata Schema`
881
+ job before merge
882
+ ([`config/chezmoidata.schema.json`](config/chezmoidata.schema.json)).
293
883
 
294
884
  </details>
295
885
 
296
886
  <details>
297
- <summary><b>AI, Agents, and MCP</b></summary>
887
+ <summary><b>Per-machine overrides (<code>~/.config/chezmoi/chezmoi.toml</code>)</b></summary>
888
+
889
+ ```toml
890
+ [data]
891
+ profile = "laptop" # laptop | minimal | server
892
+ machine = "work-macbook"
893
+ default_shell = "zsh"
894
+
895
+ [data.features]
896
+ linux_desktop = false
897
+ ```
298
898
 
299
- - **Agent profiles** (`dot mode`) switch between ask, plan, apply, and audit
300
- - **Pattern library** (`dot patterns`) — architect, hardener, and refactor patterns bundled in `dot_config/ai/patterns/`
301
- - **MCP policy enforcement** (`dot mcp`) validate the Model Context Protocol registry against policy
302
- - **AI commit messages** (`dot commit`) — conventional commits generated from the staged diff
303
- - **AI fleet cockpit** (`dot ai`) — install and run Codex, Copilot, Antigravity, Aider, OpenCode, and friends from one Bubble Tea TUI; `dot ai serve` serves your Claude subscription locally to any Anthropic/OpenAI-protocol tool. See [docs/AI.md](docs/AI.md)
304
- - **Attestation logs** — every agent session is logged with a policy hash and an outcome
899
+ Hardware presets (`macbook-t2`, `surface-pro`) live under
900
+ `defaults/.chezmoidata/` and are selected through the `t2` /
901
+ `surface` flags. Run `dot sync` after editing.
305
902
 
306
903
  </details>
307
904
 
308
905
  <details>
309
- <summary><b>Security, Trust, and Governance</b></summary>
906
+ <summary><b>Session flags</b></summary>
907
+
908
+ | Variable | Default | Effect |
909
+ |---|---|---|
910
+ | `DOTFILES_FAST=1` | 0 | Skip heavy layers (zinit, completions) |
911
+ | `DOTFILES_ULTRA_FAST=1` | 0 | Bare minimum shell (aliases + prompt) |
912
+ | `DOTFILES_AI=1` | 0 | Enable AI helper scripts |
913
+ | `DOTFILES_PROFILE=custom` | laptop | Override the profile for one session |
914
+ | `DOTFILES_NONINTERACTIVE=1` | unset | Skip prompts (CI) |
915
+ | `DOTFILES_SILENT=1` | unset | Suppress non-error output |
916
+ | `DOTFILES_SOURCE_DIR` | `~/.dotfiles` | Override the source directory |
917
+ | `DOTFILES_CACHE_DIR` | `~/.cache/dotfiles` | Override the cache location |
918
+ | `DOTFILES_WALLPAPER_DIR` | `~/Pictures/Wallpapers` | Custom wallpaper directory |
919
+ | `DOTFILES_DEBUG=1` | unset | Print shell-init timing to stderr |
920
+
921
+ The complete list is
922
+ [`docs/manual/03-reference/03-environment.md`](docs/manual/03-reference/03-environment.md);
923
+ the strategy for choosing chezmoi data over Nix over runtime flags is
924
+ [`docs/CONFIG_STRATEGY.md`](docs/CONFIG_STRATEGY.md).
925
+
926
+ </details>
927
+
928
+ ---
929
+
930
+ ## Examples
310
931
 
311
- - **Age and SOPS** keep secrets encrypted at rest and out of plaintext history
312
- - **SSH ED25519 signing** plus trust metadata back signed commits and verifiable changes
313
- - **Gitleaks**, policy checks, and compliance workflows
314
- - **Workstation attestation** (`dot attest`) records machine state, policy, prompt, and model metadata in tracked JSON
315
- - **Telemetry controls** and local-first defaults — you own your data
316
- - **SBOM (CycloneDX)** and Grype CVE scanning in CI
317
- - **JSON Schema for `.chezmoidata.toml`** — taplo runs the schema in CI on every PR, so typos in feature flags or profile names fail before merge
318
- - **OIDC Trusted Publishing** — npm releases authenticate via OIDC, not a long-lived `NPM_TOKEN`. Provenance is attached to every published tarball
932
+ Run all examples (each one is bounded by a 60 s timeout and executed
933
+ in CI by the `Examples Contract` job):
934
+
935
+ ```bash
936
+ make examples
937
+ ```
938
+
939
+ <details>
940
+ <summary><b>All examples</b></summary>
941
+
942
+ | Category | Example | Purpose |
943
+ | :--- | :--- | :--- |
944
+ | **CLI** | `example-dot-commands` | `dot` CLI command modules |
945
+ | | `example-command-reference` | Complete `dot` command reference, one usage line per public command |
946
+ | | `example-cli-utilities` | CLI utility scripts deployed to `~/.local/bin` |
947
+ | | `example-functions` | Shell function library categories |
948
+ | **Operations** | `example-install-uninstall` | Installation and uninstall scripts |
949
+ | | `example-ops` | Operations and maintenance scripts |
950
+ | | `example-diagnostics` | Diagnostics and health-check utilities |
951
+ | | `example-platform-contract` | `lib/dot/platform.sh`: platform id, host OS, the portability contract |
952
+ | | `example-fleet` | Fleet management (multi-machine dotfiles operations) |
953
+ | **Themes** | `example-theme` | Theme and wallpaper engine |
954
+ | **Security** | `example-secrets` | Encrypted secrets (age) management |
955
+ | | `example-security` | Security operations and hardening scripts |
956
+ | | `example-git-hooks` | The hook installer and the pre-push reliability gate |
957
+ | **AI** | `example-ai-patterns` | The `dot ai` fleet: command surface, steering styles, gateway |
958
+ | **Quality** | `example-test-suite` | Running the unit and integration suites |
959
+ | | `example-testing-framework` | Testing framework capabilities: assertions and mocks |
960
+ | | `example-coverage-gate` | The module coverage gate |
961
+ | | `example-qa` | Quality assurance and validation scripts |
962
+ | **Packaging** | `mise-plugin-dot/` | A mise plugin that installs `dot` |
319
963
 
320
964
  </details>
321
965
 
322
- For security hardening options, see the [Security docs](docs/security/SECURITY.md).
966
+ ---
967
+
968
+ ## When not to use .dotfiles
969
+
970
+ A few cases where another tool fits better, listed because the
971
+ short answer is "we don't do that" rather than because of a
972
+ disagreement on priorities.
973
+
974
+ - **You want a dependency-free shell config.** The default profile
975
+ brings chezmoi, mise, starship, zoxide, atuin, fzf, and a Go
976
+ toolchain for the TUI satellites. `profile = "minimal"` and
977
+ `DOTFILES_ULTRA_FAST=1` cut that down, but the framework assumes
978
+ it may install things. A single `.zshrc` is lighter.
979
+
980
+ - **You need full parity on nushell.** Nushell is Tier 3: simple
981
+ aliases plus bash-delegated functions, under 5% of the zsh feature
982
+ set, kept deliberately as a reference target
983
+ ([ADR-011](docs/adr/ADR-011-nushell-tier3-keep.md)).
984
+
985
+ - **You need Windows without WSL to be first-class.** The native
986
+ `dot.ps1` covers the daily workflow (apply, status, doctor, mise,
987
+ agents, fleet status); themes, `heal`, and most diagnostics still
988
+ need bash. Windows CI verifies the PowerShell surface, not the
989
+ whole CLI.
990
+
991
+ - **You are on Fedora or Arch and need CI-backed support.** Both
992
+ are community-supported: the code is expected to work, but the
993
+ matrix runs Ubuntu, macOS (Intel and Apple Silicon), and Windows
994
+ ([`docs/reference/SUPPORT_MATRIX.md`](docs/reference/SUPPORT_MATRIX.md)).
995
+
996
+ - **You do not want `apply` to run scripts.** Provisioning hooks
997
+ under `install/provision/` (`run_onchange_*`) install packages,
998
+ fonts, and tmux plugins when their source changes. They are
999
+ idempotent and previewable with `dot sync --check`, but they are
1000
+ scripts running as you.
1001
+
1002
+ - **You need a second reviewer on every merge.** This is a
1003
+ single-maintainer project gated by CI, DCO, and signed commits,
1004
+ not by code review; the Scorecard `Code-Review` check says so.
1005
+
1006
+ If you hit a case that should be on this list, please open an issue;
1007
+ that is how it gets fixed or moved into the supported set.
323
1008
 
324
1009
  ---
325
1010
 
326
- ## Comparison
1011
+ ## Development
327
1012
 
328
- | | This repo | chezmoi | holman/dotfiles | nikitabobko/dotfiles |
329
- |:---|:---:|:---:|:---:|:---:|
330
- | Cross-platform (macOS/Linux/WSL) | | ✓ | macOS-leaning | macOS only |
331
- | Multi-shell parity (zsh/fish/nu/pwsh) | ✓ | — | bash only | zsh only |
332
- | Wallpaper-driven themes (K-Means) | ✓ | — | — | — |
333
- | AI / MCP integration | | — | — | — |
334
- | Cryptographic attestation | | | | — |
335
- | Self-healing CLI | ✓ | — | — | — |
336
- | Fleet management | ✓ | — | — | — |
337
- | Encrypted secrets (Age/SOPS) | | | — | — |
338
- | Build artifact redirection | ✓ | — | — | — |
339
- | Schema-validated config | | — | — | — |
1013
+ ```bash
1014
+ make # reliability audit: syntax, unit, module coverage, examples, docs + traceability coverage
1015
+ make test-quick # the same, quick mode
1016
+ make test-unit # unit only
1017
+ make test-integration # with integration suites
1018
+ make examples # run every example under a timeout
1019
+ make install # stage the dot CLI under $(DESTDIR)$(PREFIX) (default /usr/local)
1020
+ make uninstall
1021
+
1022
+ ./tests/framework/test_runner.sh --jobs auto # unit suite, parallel
1023
+ bash tests/snapshots/test_snapshots.sh # golden CLI output
1024
+ bash fuzz/install/fuzz_install.sh # install.sh under adversarial input
1025
+ bash tools/docs/generate-command-index.sh --check
1026
+ bash scripts/verify-release-versions
1027
+ ```
1028
+
1029
+ Toolchain setup, the task map, and how to reproduce every CI gate
1030
+ locally are in [`DEVELOPMENT.md`](DEVELOPMENT.md) and
1031
+ [`docs/operations/TESTING.md`](docs/operations/TESTING.md). Commit signing,
1032
+ the DCO trailer, branch names, and the regression-test convention
1033
+ are in [`CONTRIBUTING.md`](CONTRIBUTING.md). A
1034
+ [devcontainer](.devcontainer/devcontainer.json) boots to a working
1035
+ `make` for Codespaces.
1036
+
1037
+ ### Fuzzing
1038
+
1039
+ Two native Go fuzz harnesses ship under
1040
+ [`fuzz/`](fuzz/) for the
1041
+ user-input surfaces that were ported out of the shell so they could
1042
+ be fuzzed at all: `FuzzValidateName` (the name validator behind
1043
+ `lib/dot/utils.sh`) and `FuzzInitURLResolver` (the URL resolver
1044
+ behind `dot init`). A third harness,
1045
+ [`fuzz/install/fuzz_install.sh`](fuzz/install/fuzz_install.sh), drives
1046
+ `install.sh` itself with unknown flags, garbage positionals, symlink
1047
+ loops in `$HOME`, an empty `PATH`, 4 KB arguments, and NUL bytes in
1048
+ the environment, and asserts every case exits cleanly or fails fast
1049
+ but never hangs. It has already found two real bugs (a missing `-h`
1050
+ alias; unknown positionals triggering a 30 s network fetch).
1051
+
1052
+ - [`fuzz.yml`](.github/workflows/fuzz.yml) runs each Go harness for
1053
+ 60 s on every push to `main` and on every PR touching the parsing
1054
+ surfaces. Go replays the committed seed corpus under
1055
+ `testdata/fuzz/` before exploring, so a fixed crash cannot
1056
+ silently return.
1057
+ - [`cflite_pr.yml`](.github/workflows/cflite_pr.yml) runs
1058
+ ClusterFuzzLite in code-change mode (120 s, AddressSanitizer,
1059
+ SARIF upload) on PRs touching the harnesses or
1060
+ [`.clusterfuzzlite/`](.clusterfuzzlite/build.sh).
1061
+ - [`install-fuzz.yml`](.github/workflows/install-fuzz.yml) runs the
1062
+ `install.sh` harness weekly on Ubuntu and macOS, and on every PR
1063
+ touching `install.sh`; a scheduled failure opens a tracking issue.
1064
+ - **OSS-Fuzz:** the project definition is ready in
1065
+ [`fuzz/oss-fuzz/`](fuzz/oss-fuzz/project.yaml)
1066
+ (libFuzzer, ASan + UBSan, x86_64); the upstream submission to
1067
+ `google/oss-fuzz` has not been filed yet.
1068
+
1069
+ ```bash
1070
+ cd fuzz
1071
+ go test -run TestNothing -fuzz='^FuzzValidateName$' -fuzztime=60s ./...
1072
+ go test -run TestNothing -fuzz='^FuzzInitURLResolver$' -fuzztime=60s ./...
1073
+ ```
340
1074
 
341
- `chezmoi` is the underlying templating engine. This repo is the opinionated reference implementation.
1075
+ The harness layout and the OSS-Fuzz submission steps are in
1076
+ [`docs/security/FUZZING.md`](docs/security/FUZZING.md); the shared
1077
+ corpus lives beside the harnesses under
1078
+ [`fuzz/testdata/`](fuzz/testdata/).
1079
+
1080
+ ### Hardening gates in place of Miri
1081
+
1082
+ - **ShellCheck at severity `error` is a hard gate** on every push
1083
+ (`reusable-shell-lint.yml`, `fail_on_shellcheck: true`), with
1084
+ `shfmt` formatting checked alongside; the same hooks run in
1085
+ pre-commit. Fish and Nushell configs have their own lint jobs.
1086
+ - **Coverage by `xtrace`, not kcov.** `tools/ci/run-coverage.sh`
1087
+ turns on `set -x` through `BASH_ENV` in every bash process the
1088
+ suite spawns and aggregates the lines that executed. The floor is
1089
+ **58%** and rises with each slice; the measured history is in the
1090
+ workflow file. A separate 100% *module-mapping* floor
1091
+ (`tests/framework/module_coverage.sh`) fails the build when an
1092
+ executable module has no test file at all.
1093
+ - **Reliability Gate** runs the audit on `ubuntu-latest`,
1094
+ `macos-latest` (Intel), and `macos-14` (Apple Silicon), then the
1095
+ examples contract, the WSL contract, and the PowerShell contract
1096
+ ([`docs/operations/RELIABILITY.md`](docs/operations/RELIABILITY.md)).
1097
+ - **Cross-platform portability scan** rejects GNU-only `sed`,
1098
+ `grep`, and `date` idioms and runs the critical scripts on each OS
1099
+ ([`cross-platform-test.yml`](.github/workflows/cross-platform-test.yml)).
1100
+ - **Generators cannot drift:** the command index is regenerated
1101
+ from `dot help all` and diffed; eight version surfaces
1102
+ (`package.json`, `bin/dot` twice, the man page, `lib/dot/bento.sh`,
1103
+ this README's badge, `CLAUDE.md`, [`AGENTS.md`](AGENTS.md)) are checked against
1104
+ `.chezmoidata.toml`; `.chezmoidata.toml` itself is validated
1105
+ against its JSON Schema. `dot agents check` does the same for the
1106
+ AI-harness stubs locally.
1107
+ - **Golden snapshots** pin the user-facing text of `dot --help`,
1108
+ `dot version`, `dot doctor`, `dot perf`, and `dot health` after
1109
+ scrubbing paths, timings, and colours.
1110
+
1111
+ ### CI
1112
+
1113
+ | Workflow | Trigger | Purpose |
1114
+ | :--- | :--- | :--- |
1115
+ | `ci.yml` | push, PR, schedule | Shell / Lua / Fish / Nushell / copyright lint, chezmoidata schema, secrets scan, dependency audit, TruffleHog, SBOM + Grype, link check, tests on Linux, macOS, Windows, Docker |
1116
+ | `ci-enforced.yml` | push, PR | The stricter enforced gate reusing the shared lint and test-suite workflows |
1117
+ | `reliability-gate.yml` | push, PR | Reliability audit on three runners + examples, WSL, PowerShell contracts |
1118
+ | `coverage.yml` | push, PR | xtrace line coverage with the 58% floor and delta gate |
1119
+ | `cross-platform-test.yml` | push, PR | Portability scan and runtime checks per OS |
1120
+ | `dot-cli-bench.yml` / `perf-baseline.yml` | push, PR / weekly + `feat/**` | Cold-start budget; shell-startup baseline and regression issues |
1121
+ | `fuzz.yml` / `cflite_pr.yml` / `install-fuzz.yml` | push, PR / PR / weekly + PR | Go harnesses; ClusterFuzzLite; `install.sh` fuzz |
1122
+ | `doc-drift.yml` | push, PR | Command index and version-consistency generators |
1123
+ | `dco.yml` / `pr-signature.yml` / `verify-tag-signature.yml` | PR / PR / tag | DCO trailer, signed PR commits, signed annotated tags |
1124
+ | `scorecard.yml` / `codeql.yml` / `dependency-review.yml` / `security-enhanced.yml` / `deps-dev-validation.yml` | weekly / push, PR | OpenSSF Scorecard, CodeQL, dependency review (`fail-on-severity: high`), Checkov, deps.dev validation |
1125
+ | `release-package-dot.yml` / `security-release.yml` | release | `dot-<v>.tar.gz` + `.zip` with SLSA provenance; SPDX SBOM, Cosign signature, unified `ALL_SHA256SUMS` manifest |
1126
+ | `release-install-smoke.yml` / `release-distribute-*.yml` | release | Clean-install smoke on Ubuntu + macOS; Homebrew, Scoop, AUR fan-out |
1127
+ | `npm-publish.yml` / `manual-publish.yml` / `pages.yml` | release, push | npm via OIDC trusted publishing; the manual in nine formats; the site |
1128
+
1129
+ 51 workflows in total; the cadence and the composite actions are
1130
+ documented in
1131
+ [`docs/operations/CI_CADENCE.md`](docs/operations/CI_CADENCE.md) and
1132
+ [`docs/operations/CI_COMPOSITES.md`](docs/operations/CI_COMPOSITES.md).
342
1133
 
343
1134
  ---
344
1135
 
345
- **THE ARCHITECT** ᛫ [Sebastien Rousseau](https://sebastienrousseau.com)
346
- **THE ENGINE** ᛞ [EUXIS](https://euxis.co) ᛫ Enterprise Unified Execution Intelligence System
1136
+ ## Security
1137
+
1138
+ **Reporting:** never open a public issue for a vulnerability — use
1139
+ [GitHub Security Advisories](https://github.com/sebastienrousseau/dotfiles/security/advisories)
1140
+ or <security@sebastienrousseau.com>; see
1141
+ [`SECURITY.md`](SECURITY.md) for the response SLA (Critical: 24 h
1142
+ initial response, 48 h target; High: 72 h / 7 days; Medium: 5 / 30
1143
+ business days; Low: 10 / 90), the supported-version table, and the
1144
+ GPG key for encrypted reports
1145
+ ([`docs/security/DISCLOSURE.md`](docs/security/DISCLOSURE.md),
1146
+ [`docs/security/KEYS.md`](docs/security/KEYS.md)).
1147
+
1148
+ A dotfiles framework is code that runs as you, on every login, on
1149
+ every machine you own. The posture below closes the vectors that
1150
+ matter for that shape — remote script execution, secrets at rest,
1151
+ agents with shell access, and the pipeline that ships it — at the
1152
+ architectural level, not behind opt-in flags. The full analysis is
1153
+ [`docs/security/THREAT_MODEL.md`](docs/security/THREAT_MODEL.md).
1154
+
1155
+ ### Installer and remote-execution controls
1156
+
1157
+ - **No unverified download runs.** `install.sh` fetches `chezmoi`
1158
+ through `tools/ci/install-chezmoi-verified.sh`, which downloads the
1159
+ release tarball *and* the upstream checksum file and refuses on
1160
+ mismatch. Where that helper is unavailable, the fallback still
1161
+ requires the installer to be under 100 KiB and to begin with
1162
+ `#!/`.
1163
+ - **Every third-party installer the framework can execute is
1164
+ allowlisted by SHA-256** in
1165
+ [`security/remote-installers.sha256`](security/remote-installers.sha256)
1166
+ (Claude, Kimi, Goose, Antigravity, xAI, and the rest). CI rejects
1167
+ any `curl | sh` that bypasses the verifier.
1168
+ - **Size and structure limits.** `lib/dot/verified-download.sh` caps
1169
+ scripts at 512 KiB and archives at 100 MiB by default, caps
1170
+ checksum manifests at 2 MiB, and fails closed on empty files;
1171
+ registry archives are rejected when they contain path traversal
1172
+ or link entries. Fonts, distro signing keys, and binary archives
1173
+ go through the same path.
1174
+ - **`dot init` is HTTPS-only**, refuses to overwrite an existing
1175
+ source directory without `--force`, and prints the source URL it
1176
+ is about to run scripts from.
1177
+ - **Self-healing never fetches mutable URLs.** Tool recovery uses
1178
+ exact mise / aqua pins with checksums.
1179
+
1180
+ ### Secrets
1181
+
1182
+ - `dot secrets` selects a provider by policy — macOS Keychain,
1183
+ `pass`, or an age-encrypted local store — and loads buckets into
1184
+ the environment on demand (`eval "$(dot secrets load ai)"`), so
1185
+ keys are never in plaintext files or shell history.
1186
+ - age and SOPS encrypt chezmoi-managed secret files at rest;
1187
+ `dot secrets-init` bootstraps the key, `dot ssh-key` encrypts an
1188
+ SSH key locally, `dot ssh-cert` manages short-lived certificates.
1189
+ - `dot secret-audit` audits hygiene and leakage surface on the
1190
+ workstation; gitleaks, detect-secrets, and TruffleHog run on every
1191
+ push and in pre-commit; the history-filtering procedure is written
1192
+ down in
1193
+ [`docs/security/HISTORY_FILTERING.md`](docs/security/HISTORY_FILTERING.md).
1194
+
1195
+ ### Agents and MCP
1196
+
1197
+ - Every agent runs under a bounded profile (`ask` / `plan` /
1198
+ `apply` / `audit`) with checkpoints and a session audit log;
1199
+ `dot fleet enforce strict` turns the profile RBAC from advisory
1200
+ into enforced.
1201
+ - MCP servers must appear in `mcp-policy.json` and pass
1202
+ `dot mcp doctor` (policy, supply chain, config) before use.
1203
+ - `dot attest` records the workstation state with the policy hash so
1204
+ an audit can check what an agent was allowed to do when it ran.
1205
+
1206
+ ### Supply chain
1207
+
1208
+ - **Every third-party GitHub Action is pinned to a commit SHA**, and
1209
+ the pins are linted (`Lint / Reusable Workflow Pins`). The one
1210
+ tag reference is the SLSA generator reusable workflow, which its
1211
+ maintainers require to be referenced by release tag
1212
+ ([`docs/security/CI_PINNING.md`](docs/security/CI_PINNING.md)).
1213
+ - **Harden Runner in all 51 workflows**, six jobs in egress-block
1214
+ mode with an explicit endpoint list
1215
+ ([`docs/security/CI_EGRESS_ALLOWLIST.md`](docs/security/CI_EGRESS_ALLOWLIST.md)).
1216
+ - **Releases carry provenance:** SLSA L3 build attestation on the
1217
+ `dot` archive (`gh attestation verify`), an SPDX SBOM signed with
1218
+ Cosign keyless (Fulcio + Rekor), and one signed `ALL_SHA256SUMS`
1219
+ manifest covering every asset; the verification recipe is
1220
+ [`docs/security/VERIFY_RELEASE.md`](docs/security/VERIFY_RELEASE.md).
1221
+ - **Signed everything:** SSH ed25519 commit signatures enforced on
1222
+ `main`, signed annotated tags verified by workflow, DCO and PR
1223
+ signature checks required, GPG key published over WKD and checked
1224
+ weekly (`verify-gpg-wkd.yml`).
1225
+ - **npm via OIDC trusted publishing** with provenance attached, no
1226
+ long-lived token.
1227
+ - **Scans on every push:** dependency review (`fail-on-severity:
1228
+ high`), CodeQL, Checkov, Grype against the SBOM, Dependabot with
1229
+ grouped updates; OpenSSF Scorecard weekly with the snapshot
1230
+ committed to [`docs/security/SCORECARD.md`](docs/security/SCORECARD.md).
1231
+ - **SPDX headers** on source files, checked by the copyright lint
1232
+ job.
1233
+
1234
+ ### Notes
1235
+
1236
+ - Template injection is a real surface for a chezmoi tree: `.tmpl`
1237
+ files render with chezmoi data before deployment, so
1238
+ `.chezmoidata.toml` is schema-validated and the trust boundary is
1239
+ documented per surface in the threat model.
1240
+ - `_cached_eval` output files under `~/.cache/shell/` are sourced on
1241
+ startup; the cache key includes the tool binary's mtime and
1242
+ realpath so a swapped binary invalidates its cache.
1243
+
1244
+ ---
1245
+
1246
+ ## Documentation
1247
+
1248
+ The four entry points, identical across every repo in the family:
1249
+
1250
+ - **[User Manual](https://doc.dotfiles.io/)** — the rendered book:
1251
+ concepts, tutorials, reference, cookbook, appendices; also
1252
+ `dot manual`, `dot manual pdf`, `dot manual text | less`, and
1253
+ `dot manual --offline` from the bundled snapshot
1254
+ - **[Command reference](docs/manual/command-index.md)** — every
1255
+ `dot` subcommand, generated from `dot help all`; `man dot` after
1256
+ install
1257
+ - **[Developer docs](DEVELOPMENT.md)** — toolchain, task map,
1258
+ reproducing every CI gate locally
1259
+ - **[Family map](docs/ECOSYSTEM.md)** — what lives in-repo, the
1260
+ component that owns it, and where to make which change
1261
+
1262
+ The manual is published in nine formats (single- and multi-page
1263
+ HTML, PDF, EPUB, ASCII text, compressed variants, Markdown source)
1264
+ and rebuilds on every change from [`docs/manual/`](docs/manual/).
1265
+
1266
+ | Document | Covers |
1267
+ |---|---|
1268
+ | [`docs/STRUCTURE.md`](docs/STRUCTURE.md) | Every top-level path, the chezmoi naming contract, where to make which change. |
1269
+ | [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) | Startup strategies, `_cached_eval`, lazy hydration, artifact and ultra-fast modes. |
1270
+ | [`docs/adr/`](docs/adr/README.md) | Twelve decision records: CI/CD, shell performance, security-first, CLI architecture, chezmoi, shell selection, multi-shell parity, aliases, wallpaper theming, transient prompt, nushell tier, AI local proxy. |
1271
+ | [`docs/reference/`](docs/reference/) | Aliases, feature flags, fonts, PowerShell parity, profiles, scripts, support matrix, themes, tools, `dot` utilities. |
1272
+ | [`docs/security/`](docs/security/README.md) | Threat model, install verification, fuzzing, secrets, encryption, MCP policy, commit signing, CI pinning, egress allowlist, key rotation, release verification, Scorecard, compliance, incident response. |
1273
+ | [`docs/operations/`](docs/operations/OPERATIONS.md) | Release pipeline, version sync, performance, reliability, coverage, drift, registry, attestation, CI cadence, migration between versions. |
1274
+ | [`docs/guides/`](docs/guides/INSTALL.md) | Install, theming, Neovim IDE, troubleshooting, WSL2 + Nix. |
1275
+ | [`docs/packaging.md`](docs/packaging.md) | For distro maintainers: licence grant, toolchain floors, dependency pin model, offline build/test, signature verification. |
1276
+ | [`SECURITY.md`](SECURITY.md) · [`GOVERNANCE.md`](GOVERNANCE.md) · [`CONTRIBUTING.md`](CONTRIBUTING.md) · [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) | Reporting, decision model, contribution workflow, community expectations. |
1277
+ | [`CHANGELOG.md`](CHANGELOG.md) | Per-release notes. **The complete record** — every release appears here. |
1278
+ | [`AGENTS.md`](AGENTS.md) / [`CLAUDE.md`](CLAUDE.md) | Invariants for AI-assisted contributors; `CLAUDE.md` is canonical, `AGENTS.md` is rendered from it. |
347
1279
 
348
1280
  ---
349
1281
 
1282
+ ## Acknowledgements
1283
+
1284
+ This framework stands on tools whose maintainers did the hard part:
1285
+ [chezmoi](https://github.com/twpayne/chezmoi) for the source-tree
1286
+ model that makes every `apply` reproducible, [mise](https://mise.jdx.dev)
1287
+ and [Nix](https://nixos.org) for toolchains that survive a reinstall,
1288
+ [age](https://age-encryption.org) and [SOPS](https://github.com/getsops/sops)
1289
+ for secrets that stay encrypted, and the Charmbracelet libraries
1290
+ behind the Go satellites. The security posture leans on
1291
+ [Sigstore](https://www.sigstore.dev), [SLSA](https://slsa.dev),
1292
+ [OpenSSF Scorecard](https://scorecard.dev), and
1293
+ [StepSecurity Harden Runner](https://github.com/step-security/harden-runner).
1294
+
1295
+ Bug reports with a reproduction and a failing test are the most
1296
+ useful contribution this project receives; the regression-test
1297
+ convention in [`CONTRIBUTING.md`](CONTRIBUTING.md) exists so that
1298
+ every one of them stays fixed.
1299
+
1300
+ ## Stability guarantees
1301
+
1302
+ - **Versioning.** [SemVer](https://semver.org) with
1303
+ `defaults/.chezmoidata.toml` as the source of truth, mirrored to
1304
+ eight surfaces by `scripts/version-sync.sh` and checked in CI.
1305
+ During the `0.2.x` series every release is a patch bump; a change
1306
+ that breaks an existing machine (a renamed command, a moved
1307
+ managed path, a changed flag default) is called out in its
1308
+ `CHANGELOG.md` entry and, where relevant, in
1309
+ [`docs/operations/MIGRATION.md`](docs/operations/MIGRATION.md)
1310
+ with a migration or rollback script under `install/migrate/`
1311
+ ([`GOVERNANCE.md`](GOVERNANCE.md)).
1312
+
1313
+ - **Output stability.** For a tool that generates files, output *is*
1314
+ API. Machine-readable outputs carry a schema version —
1315
+ `dot env emit` conforms to
1316
+ [`docs/schema/dot-env-v1.json`](docs/schema/dot-env-v1.json), the
1317
+ registry index to
1318
+ [`docs/schema/dot-registry-v1.json`](docs/schema/dot-registry-v1.json) —
1319
+ and a change to their shape is a new schema version, not an edit
1320
+ to `v1`. Generated artefacts that other tools consume
1321
+ (`themes.toml`, shell completions, [`AGENTS.md`](AGENTS.md) and the harness
1322
+ stubs, the command index) are produced by generators whose output
1323
+ is diffed in CI; a behavioural change to what a generator emits is
1324
+ treated as breaking and recorded in the changelog even when no
1325
+ command-line flag moves. The human-facing text of `dot --help`,
1326
+ `version`, `doctor`, `perf`, and `health` is pinned by golden
1327
+ snapshots and changes only with a deliberate snapshot update in
1328
+ the same commit.
1329
+
1330
+ - **Minimum toolchain.** Raised only with the reason recorded in the
1331
+ `CHANGELOG.md` entry, never silently — policy, version axis, and
1332
+ history in
1333
+ [`docs/MINIMUM-TOOLCHAIN.md`](docs/MINIMUM-TOOLCHAIN.md).
1334
+
1335
+ - **Deprecations** are announced before removal with the removal
1336
+ release named up front:
1337
+ [`docs/reference/ALIASES_DEPRECATIONS.md`](docs/reference/ALIASES_DEPRECATIONS.md)
1338
+ records each deprecated alias, its replacement, and its `Remove In`
1339
+ version, and `dot aliases why <alias>` reports the same from the
1340
+ CLI. The deprecation window is the span between the release that
1341
+ adds the row and the release named in `Remove In`.
1342
+
350
1343
  ## License
351
1344
 
352
- Licensed under the **MIT License**. See [LICENSE](LICENSE) for details.
1345
+ Dual-licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) or [MIT](https://opensource.org/licenses/MIT), at your option. See [`LICENSE-APACHE`](LICENSE-APACHE) and [`LICENSE-MIT`](LICENSE-MIT).
1346
+
1347
+ See [CHANGELOG.md](CHANGELOG.md) for release history.
1348
+
1349
+ ---
1350
+
1351
+ **THE ARCHITECT** ᛫ [Sebastien Rousseau](https://sebastienrousseau.com)
1352
+ **THE ENGINE** ᛞ [EUXIS](https://euxis.co) ᛫ Enterprise Unified Execution Intelligence System
353
1353
 
354
- <p align="right"><a href="#dotfiles">Back to Top</a></p>
1354
+ <p align="right"><a href="#contents">Back to Top</a></p>