@sebastienrousseau/dotfiles 0.2.511 → 0.2.513

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 (74) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/README.md +2 -2
  3. package/docs/AI.md +2 -1
  4. package/docs/COPYRIGHT +1 -1
  5. package/docs/architecture/AI_COST_OPTIMIZATION.md +1 -0
  6. package/docs/archive/LEGACY_ROADMAP.md +4 -158
  7. package/docs/manual/00-introduction.md +1 -1
  8. package/docs/manual/01-concepts/02-trust-model.md +2 -1
  9. package/docs/manual/02-tutorials/02-add-wallpaper.md +6 -6
  10. package/docs/manual/02-tutorials/03-create-profile.md +1 -1
  11. package/docs/manual/02-tutorials/05-deploy-fleet.md +1 -1
  12. package/docs/manual/03-reference/02-config-files.md +1 -1
  13. package/docs/manual/03-reference/03-environment.md +1 -1
  14. package/docs/manual/04-cookbook/03-faq.md +1 -1
  15. package/docs/manual/05-appendices/B-security-checklist.md +2 -1
  16. package/docs/manual/command-index.md +1 -0
  17. package/docs/operations/ARCHITECTURE_ROADMAP.md +5 -143
  18. package/docs/operations/COVERAGE.md +30 -8
  19. package/docs/operations/REGISTRY.md +20 -19
  20. package/docs/operations/ROADMAP.md +3 -159
  21. package/docs/operations/ROADMAP_2026.md +5 -663
  22. package/docs/operations/ROADMAP_V0_2_503.md +5 -129
  23. package/docs/reference/POWERSHELL_PARITY.md +28 -27
  24. package/docs/reference/THEMES.md +1 -1
  25. package/docs/reference/TOOLS.md +1 -0
  26. package/docs/reference/UTILS.md +1 -0
  27. package/docs/schema/dot-registry-v1.json +33 -0
  28. package/docs/security/SCORECARD.md +1 -1
  29. package/install.sh +20 -11
  30. package/package.json +1 -1
  31. package/scripts/diagnostics/a2a-conformance.sh +0 -0
  32. package/scripts/diagnostics/aliases-manifest.sh +33 -6
  33. package/scripts/diagnostics/benchmark.sh +27 -1
  34. package/scripts/diagnostics/doctor.sh +18 -11
  35. package/scripts/diagnostics/health.sh +12 -4
  36. package/scripts/diagnostics/mcp-doctor.sh +3 -0
  37. package/scripts/diagnostics/secret-governance.sh +7 -1
  38. package/scripts/diagnostics/security-score.sh +14 -5
  39. package/scripts/diagnostics/verify_state.sh +9 -1
  40. package/scripts/diagnostics/workstation-attestation.sh +0 -0
  41. package/scripts/dot/commands/ai.sh +40 -31
  42. package/scripts/dot/commands/aliases.sh +28 -4
  43. package/scripts/dot/commands/appearance.sh +16 -0
  44. package/scripts/dot/commands/core.sh +17 -0
  45. package/scripts/dot/commands/diagnostics.sh +19 -0
  46. package/scripts/dot/commands/fleet.sh +1 -1
  47. package/scripts/dot/commands/manual.sh +4 -4
  48. package/scripts/dot/commands/meta.sh +87 -12
  49. package/scripts/dot/commands/registry.sh +164 -15
  50. package/scripts/dot/commands/secrets.sh +17 -0
  51. package/scripts/dot/commands/security.sh +17 -0
  52. package/scripts/dot/commands/tools.sh +19 -0
  53. package/scripts/dot/powershell/Dot.psm1 +146 -26
  54. package/scripts/fonts/install-nerd-fonts.sh +16 -10
  55. package/scripts/git-hooks/pre-commit-audit.sh +1 -1
  56. package/scripts/ops/ai-setup.sh +13 -6
  57. package/scripts/ops/bundle.sh +31 -5
  58. package/scripts/ops/chezmoi-apply.sh +5 -0
  59. package/scripts/ops/heal-tools.sh +39 -111
  60. package/scripts/ops/post-apply-repair.sh +0 -0
  61. package/scripts/ops/release.sh +14 -5
  62. package/scripts/qa/docs-coverage.sh +1 -1
  63. package/scripts/qa/reliability-audit.sh +4 -4
  64. package/scripts/qa/scorecard-snapshot.sh +3 -3
  65. package/scripts/qa/validate-examples.sh +0 -0
  66. package/scripts/qa/wsl-contract.sh +0 -0
  67. package/scripts/secrets/age-init.sh +15 -4
  68. package/scripts/theme/apply-gnome-theme.sh +6 -2
  69. package/scripts/theme/extract-theme.py +97 -33
  70. package/scripts/theme/rebuild-themes.sh +240 -35
  71. package/scripts/theme/switch.sh +26 -16
  72. package/scripts/theme/wallpaper-sync.sh +95 -7
  73. package/scripts/tools/detect-collisions.py +0 -0
  74. package/scripts/version-sync.sh +108 -44
@@ -1,134 +1,10 @@
1
1
  ---
2
- title: "v0.2.503 Roadmap — Enterprise-Ready, Cross-Platform"
3
- date: 2026-05-17
2
+ title: "v0.2.503 Roadmap - Historical"
4
3
  ---
5
4
 
6
- # v0.2.503 — Enterprise-Ready Cross-Platform Polish
5
+ # v0.2.503 Roadmap
7
6
 
8
- ## Why this release
7
+ This v0.2.503 planning document is historical. Active roadmap content has been
8
+ consolidated into [`../../ROADMAP.md`](../../ROADMAP.md).
9
9
 
10
- The R4 audit (`HARD_AUDIT_2026.md` Part 8) ranked the framework
11
- 9.0/10 on internal quality but only 7.5/10 on adoption readiness.
12
- The gap is **distribution + cross-platform polish + visible
13
- organisation** — not feature surface. v0.2.503 closes that gap
14
- without breaking existing user installs.
15
-
16
- Reference target: <https://github.com/Debian/aws-cli> — the Debian
17
- packaging of AWS CLI, often cited as a model of simple, focused
18
- top-level structure. We will not blindly copy its layout (it ships
19
- a Python project, we ship a chezmoi-managed shell framework), but
20
- we will adopt its discipline: every top-level path has a clear
21
- purpose, contributors orient in under 30 seconds.
22
-
23
- ## Scope (non-breaking; v0.2.503)
24
-
25
- ### A — Visible structure (no file moves)
26
-
27
- | | |
28
- |---|---|
29
- | `STRUCTURE.md` at root | Single-page map of every top-level path, why it exists, and what it deploys to. Answers "what is `dot_config/`?", "why are there 25 root files?", "where is the CLI?" — in under 30 seconds. |
30
- | `scripts/README.md` | Map of `scripts/{ci,diagnostics,dot,lib,maintenance,ops,security,tools,tuning}` subtrees. |
31
- | Root `dot_*` files explained | The 20+ `dot_*` / `executable_*` / `private_*` prefixed files at root are not clutter — they are required by chezmoi to render at the corresponding `~/.X` path. STRUCTURE.md makes this contract visible. |
32
-
33
- ### B — UX polish
34
-
35
- | | |
36
- |---|---|
37
- | Sweep remaining tabular `dot` commands through `ui_table_begin/add/end` | Already done: `dot env`, `dot agents list`, `dot registry list/search`, `dot aliases list/search`. Identify any other listing commands not yet on the helper and convert. |
38
- | `dot doctor` rendering | Today emits 100+ lines of `ui_ok / ui_warn / ui_err`. Group into bordered sections with totals at the foot. |
39
- | `dot help` two-column table | The grouped help index could become a gum-table by section. |
40
- | `dot fleet status` widening | Use the table helper for the per-node status block. |
41
-
42
- ### C — Performance
43
-
44
- | | |
45
- |---|---|
46
- | `_cached_eval` coverage audit | Find every `eval "$(<tool> init <shell>)"` in `rc.d/` not already wrapped; add to cache layer. |
47
- | Shell startup p50/p95 in CI | New `dot-cli-bench` workflow exists for the CLI cold-start gate; add an equivalent zsh/bash/fish startup-time gate (sub-150ms cold). |
48
- | Cross-shell `_cached_eval` parity | bash + fish + nu implementations exist; confirm they all do the realpath sidecar pin + suspicious-output check that zsh added. |
49
-
50
- ### D — Cross-platform CI parity
51
-
52
- | | |
53
- |---|---|
54
- | Windows-native smoke test expansion | `tools/ci/windows-smoke-test.ps1` exists but only covers a few commands. Add `dot version / dot help / dot agents check / dot doctor` Windows-native runs. |
55
- | Real `ubuntu-latest` + `macos-latest` + `windows-latest` matrix for the test runner | Currently `ubuntu` + `macos` only; add `windows-latest` to the regular test workflow. |
56
- | `chezmoi apply --dry-run` on all three OSes | Verify our templates render on every platform on every PR. |
57
-
58
- ### E — Code dedup + refactor (in-place)
59
-
60
- | | |
61
- |---|---|
62
- | Audit `scripts/dot/lib/*` for cross-file duplication | Many small helpers may exist in 2+ places. Consolidate. |
63
- | Consistent error-exit codes | Document the canonical exit-code map (1 = bad usage, 2 = no provider, 3 = empty, etc. — `dot secrets` already follows this). Audit other commands for drift. |
64
- | `set -euo pipefail` header lint | Make sure every script under `scripts/` has the canonical header. |
65
-
66
- ### F — Distribution + discoverability (R4 Top-5 work)
67
-
68
- | | |
69
- |---|---|
70
- | Homebrew tap stub | Create `install/homebrew/dot.rb` formula scaffold. Real publication still needs the v0.3 reorganization. |
71
- | Scoop manifest stub | Same for `install/scoop/dot.json`. |
72
- | `awesome-dotfiles` PR draft | One-line entry + screenshot. Land it after v0.2.503 ships. |
73
-
74
- ### G — OpenSSF Scorecard 10/10 across every check
75
-
76
- Target the [public Scorecard report](https://scorecard.dev/viewer/?uri=github.com/sebastienrousseau/dotfiles) and drive every check to 10/10:
77
-
78
- | Check | Today (baseline) | Path to 10 |
79
- |---|---|---|
80
- | **Binary-Artifacts** | 10 (no binaries committed) | Maintain — pre-commit guard rejecting any committed binary. |
81
- | **Branch-Protection** | needs token | Already configured on `main` (required reviews, signed commits, status-check gating, linear history). Verify in `gh api repos/.../branches/main/protection` and document in `docs/security/`. |
82
- | **CI-Tests** | 10 (CI passes on every PR) | Maintain — current 75-check matrix is comprehensive. |
83
- | **CII-Best-Practices** / OpenSSF Best Practices badge | not present | Apply for the badge at [bestpractices.coreinfrastructure.org](https://www.bestpractices.dev/) and embed the badge in README. |
84
- | **Code-Review** | needs verification | Already enforced via branch protection; document in CONTRIBUTING.md. |
85
- | **Contributors** | low (solo) | Acknowledge — solo-maintained framework. Add `MAINTAINERS.md` + `GOVERNANCE.md` documenting the single-maintainer model and contribution path. |
86
- | **Dangerous-Workflow** | 10 (no `pull_request_target` with checkout-then-build) | Maintain — `.github/workflows/` is already audited. |
87
- | **Dependency-Update-Tool** | 10 (Dependabot + Renovate configured) | Maintain. |
88
- | **Fuzzing** | partial (1 fuzz harness for `install.sh`) | Add OSS-Fuzz integration **OR** expand `tests/fuzz/` coverage (URL parsers, manifest validators, secret-bucket loaders). |
89
- | **License** | 10 (MIT, top-level `LICENSE`) | Maintain. |
90
- | **Maintained** | high (active commits weekly) | Maintain. |
91
- | **Packaging** | low (no distro package) | Address via the Homebrew tap / Scoop manifest / AUR PKGBUILD in §F. SLSA-attested release artefacts now exist (v0.2.502 backfill confirmed). |
92
- | **Pinned-Dependencies** | 9 (one tag-pinned reusable workflow — SLSA, documented exception) | Already documented; verify Scorecard accepts the SLSA exception. |
93
- | **SAST** | 10 (CodeQL + Semgrep + Codacy in CI) | Maintain. |
94
- | **Security-Policy** | 10 (`.github/SECURITY.md` + WKD-published GPG key + disclosure-key-expiry monitor) | Maintain. |
95
- | **Signed-Releases** | 8–10 (Cosign-signed SBOM + SLSA provenance now landing per v0.2.502 backfill) | Verify Scorecard re-scrapes the v0.2.502 release post-backfill; should bump to 10. |
96
- | **Token-Permissions** | 10 (top-level `permissions: contents: read`; per-job overrides) | Maintain — set during R3 hardening. |
97
- | **Vulnerabilities** | 10 (osv-scanner + Dependabot keep open count at 0) | Maintain. |
98
- | **Webhooks** | n/a | No org-level webhooks; check not applicable. |
99
-
100
- **Action items:**
101
-
102
- 1. Run `scorecard` locally with the official Docker image, snapshot current scores into `docs/security/SCORECARD.md`.
103
- 2. Apply for OpenSSF Best Practices badge (≤30-min form).
104
- 3. Add `MAINTAINERS.md` + `GOVERNANCE.md`.
105
- 4. Re-trigger Scorecard workflow after v0.2.502 backfill so the dashboard reflects the fixed Signed-Releases score.
106
- 5. Track every sub-10 score with a follow-up issue tagged `scorecard`.
107
-
108
- ## Reorganisation now in-scope (was deferred — see RFC)
109
-
110
- Pulled forward from v0.3.0 into this PR per maintainer request.
111
- The R4 audit identified the framework / user-config intermingling
112
- as the highest-leverage structural gap. Implementation is phased
113
- per `RFC_v0_2_503_reorganization.md`; each phase is independently
114
- atomic.
115
-
116
- | Move | Why it's breaking |
117
- |------|-------------------|
118
- | `dot_config/` → `defaults/` (with chezmoi `.chezmoiroot`) | Every existing user's chezmoi source-state would need to re-bootstrap. |
119
- | `bin/dot` → `bin/dot` | Same; `~/.local/bin/dot` would be removed before the new path is installed. |
120
- | Split `framework/` (CLI + lib) from user-facing defaults | Major restructuring; needs RFC + migration tool + 2-version deprecation window. |
121
-
122
- These will land in v0.2.503 as a coordinated single PR with a
123
- `migrate-v0_2-to-v0_3.sh` script.
124
-
125
- ## Success criteria (v0.2.503)
126
-
127
- - [ ] New contributor can answer "where is the CLI?" / "what is `dot_config/`?" / "how do I add a new command?" in under 30 seconds using only the root `STRUCTURE.md` + `scripts/README.md`.
128
- - [ ] `dot lint` reports 328+ files clean.
129
- - [ ] Shell startup p50 ≤ 100ms in CI on all three OSes.
130
- - [ ] `dot env list` / `dot agents list` / `dot registry list` render with gorgeous gum tables (already done — bake into screenshot for README).
131
- - [ ] `windows-latest` is in the regular test matrix.
132
- - [ ] Pre-existing CI infrastructure failures (SLSA, etc.) stay green after the v0.2.502 fix series.
133
- - [ ] **OpenSSF Scorecard reports 10/10 on every applicable check** at <https://scorecard.dev/viewer/?uri=github.com/sebastienrousseau/dotfiles>.
134
- - [ ] OpenSSF Best Practices badge displayed in README.
10
+ Release history remains in [`../../CHANGELOG.md`](../../CHANGELOG.md).
@@ -12,9 +12,9 @@ This document tracks what is supported on Windows-native PowerShell 7.4 LTS / 7.
12
12
 
13
13
  | Tier | Meaning | Examples |
14
14
  |---|---|---|
15
- | **Full** | Native PowerShell path; tested in CI on `windows-latest`. | `dot version`, `dot help`, `dot agents check` (via WSL-bash fallback). |
15
+ | **Full** | Native PowerShell path; tested in CI on `windows-latest`. | `dot version`, `dot help`, `dot agents check`. |
16
16
  | **WSL-bridged** | Runs under WSL2 bash with the same UX as Linux. | All `dot` subcommands, the test suite, the cold-start bench. |
17
- | **Stub** | The command exists as a PowerShell entry-point but delegates to bash. | `dot init`, `dot fleet apply` (require chezmoi/ssh; both Windows-installable). |
17
+ | **Bash-bridged** | The PowerShell dispatcher delegates to Git Bash or WSL bash and fails clearly when bash is unavailable. | `dot registry`, `dot fleet apply`, Unix-specific diagnostics. |
18
18
  | **N/A** | The command targets a Unix-only surface and is not exposed on PowerShell. | Wallpaper-driven theming via macOS `defaults`; Linux-only `lock-configs.sh`. |
19
19
 
20
20
  ## Command-by-command matrix
@@ -22,26 +22,24 @@ This document tracks what is supported on Windows-native PowerShell 7.4 LTS / 7.
22
22
  | Command | Windows-native | WSL2 | macOS | Linux |
23
23
  |---|---|---|---|---|
24
24
  | `dot version` | **Full (native)** — `Get-DotVersion` cmdlet in `scripts/dot/powershell/Dot.psm1`; reads `.chezmoidata.toml` directly, no bash | Full | Full | Full |
25
- | `dot help` | **Full (native)** — `Invoke-DotHelp` cmdlet; `dot help <subcmd>` still bash-bridged | Full | Full | Full |
26
- | `dot doctor` | Full (subset of checks; some Unix-only checks return N/A) | Full | Full | Full |
27
- | `dot init <user>` | Full (requires `chezmoi` on PATHinstall via `scoop install chezmoi`) | Full | Full | Full |
25
+ | `dot help` | **Full (native)** — `Invoke-DotHelp`; detailed Unix command help remains bash-bridged | Full | Full | Full |
26
+ | `dot status` | **Full (native)** structured clean/drifted result from chezmoi | Full | Full | Full |
27
+ | `dot diff` / `apply` / `sync` / `update` | **Full (native)** direct, exit-code-checked chezmoi operations | Full | Full | Full |
28
+ | `dot add` / `remove` / `init` / `cd` | **Full (native)** — direct chezmoi operations and source-path lookup | Full | Full | Full |
29
+ | `dot doctor` | **Full (native baseline)** — PowerShell, chezmoi, git, repo data, and module checks; Unix-only diagnostics are bash-bridged | Full | Full | Full |
28
30
  | `dot agents check` | **Full (native)** — `Test-DotAgentsSync` cmdlet; CI smoke test runs the cmdlet directly | Full | Full | Full |
29
- | `dot agents render` / `list` | Stub (bash-bridged`render` is a multi-harness mustache-equivalent rewrite, tracked as a separate ticket) | Full | Full | Full |
30
- | `dot fleet status` / `drift` / `events` | Full | Full | Full | Full |
31
- | `dot fleet apply` | Stub (bash-bridged + requires Windows OpenSSH `ssh.exe` on PATH; no native pwsh-side test in CI yet tracked in ROADMAP §C5 follow-up) | Full | Full | Full |
32
- | `dot fleet namespace set` | Full | Full | Full | Full |
33
- | `dot registry list` / `search` / `info` | Full | Full | Full | Full |
34
- | `dot registry install <name>` | Scaffold (no behavior yet on any platform) | Scaffold | Scaffold | Scaffold |
35
- | `dot agent` / `dot mode` | Full | Full | Full | Full |
36
- | `dot ai` / `dot ai-setup` / `dot ai-query` | Full | Full | Full | Full |
37
- | AI bridges (`cl`, `codex`, `copilot`, `gemini`, `goose`, etc.) | Full when the underlying AI CLI is installed (scoop / winget / native) | Full | Full | Full |
31
+ | `dot agents list` | **Full (native)**structured harness/path/rendered records | Full | Full | Full |
32
+ | `dot agents render` | Bash-bridged | Full | Full | Full |
33
+ | `dot env list` | **Full (native)**mise text or JSON inventory | Full | Full | Full |
34
+ | `dot env emit` | Bash-bridged | Full | Full | Full |
35
+ | `dot fleet status` | **Full (native)** node, version, OS, architecture, and drift | Full | Full | Full |
36
+ | `dot fleet drift` / `events` / `apply` / `namespace` | Bash-bridged | Full | Full | Full |
37
+ | `dot registry list` / `search` / `info` / `install` | Bash-bridged; Unix path is verified, checksum-pinned, and preview-first | Full | Full | Full |
38
+ | `dot agent` / `mode` / AI commands | Bash-bridged | Full | Full | Full |
38
39
  | `dot lint` | WSL-bridged (shellcheck/shfmt are Unix-native) | Full | Full | Full |
39
- | `dot perf` | Full (uses pwsh `Measure-Command` on the PS path) | Full | Full | Full |
40
- | `dot health` | Full | Full | Full | Full |
41
- | `dot tools` | Full (uses winget/scoop on Windows; brew/apt elsewhere) | Full | Full | Full |
42
- | `dot theme` (wallpaper-driven) | Stub (Windows wallpaper API needs additional work) | Stub (X11 only — Wayland support pending) | Full | Full (X11 only) |
43
- | `dot wallpaper` | Stub | Stub | Full | Full |
44
- | `dot security firewall` | Full (Windows Defender Firewall via `Set-NetFirewallProfile`) | N/A | Full (pf) | Full (ufw/firewalld) |
40
+ | `dot perf` / `health` / `tools` | Bash-bridged | Full | Full | Full |
41
+ | `dot theme` / `wallpaper` | N/A on native Windows | Limited | Full | Full (desktop-dependent) |
42
+ | `dot security firewall` | Bash-bridged; no native Defender mutation | N/A | Full (pf) | Full (ufw/firewalld) |
45
43
  | `dot security lock-configs` | N/A (Windows ACL model differs; tracked) | N/A | Full (`chflags uchg`) | Full (`chattr +i`) |
46
44
  | Shell startup integration | Full (`Microsoft.PowerShell_profile.ps1` ships) | Full (zsh, bash, fish) | Full (zsh, bash, fish, nu) | Full (zsh, bash, fish, nu) |
47
45
 
@@ -51,27 +49,30 @@ This document tracks what is supported on Windows-native PowerShell 7.4 LTS / 7.
51
49
  |---|---|
52
50
  | `dot version` exits 0 | windows-latest, ubuntu-latest, macos-latest, macos-14 |
53
51
  | `dot help` exits 0 | windows-latest, ubuntu-latest, macos-latest, macos-14 |
54
- | `dot agents check` exits 0 | windows-latest (via bash on PATH), ubuntu-latest, macos-latest, macos-14 |
52
+ | `dot agents check` exits 0 | windows-latest (native), ubuntu-latest, macos-latest, macos-14 |
53
+ | Native module import, agent-body sync, harness inventory, doctor baseline, and chezmoi diff | windows-latest |
54
+ | Native dispatcher version, help, and agents check | windows-latest |
55
55
  | PowerShell ≥ 7.4 | windows-latest (smoke test at `tools/ci/windows-smoke-test.ps1`) |
56
56
  | PSScriptAnalyzer Error-level findings | windows-latest |
57
57
  | `chezmoi --version` exits 0 | windows-latest (via scoop), all Unix matrices |
58
58
  | `bash tools/ci/dot-cli-startup-bench.sh` median < 200ms | macos-latest |
59
59
  | `bash tools/ci/dot-cli-startup-bench.sh` median < 150ms | ubuntu-latest |
60
60
 
61
- ## Known parity gaps (deferred to follow-up PRs)
61
+ ## Known parity gaps
62
62
 
63
63
  These are scoped in [`ROADMAP_2026 §C5`](../operations/ROADMAP_2026.md) but not in this PR's scope:
64
64
 
65
- 1. **Native PowerShell `dot.ps1` dispatcher.** Today the Windows path either uses `bash dot` (when bash is on PATH via Git for Windows / WSL) or shells out via `pwsh -Command`. A truly idiomatic PowerShell dispatcher with native cmdlet semantics (verb-noun naming, `[CmdletBinding()]`, pipeline support) is a separate effort.
66
- 2. **Wallpaper-driven theming on Windows.** Requires SystemParametersInfo W32 API or `Set-ItemProperty HKCU:\Control Panel\Desktop`. macOS-native today.
67
- 3. **`dot security lock-configs` for Windows.** Needs an ACL/EFS-based equivalent of `chattr +i` / `chflags uchg`. Not in this PR's scope; documented here so it doesn't get re-discovered.
68
- 4. **Native Windows installer signing.** The repo signs the bootstrap tarball via Cosign keyless; a SignTool-signed `install.ps1` for code-signing-enforced enterprises is a future enhancement.
65
+ 1. **Registry and fleet mutation.** Verified registry installation and multi-node fleet application still use the explicit bash bridge.
66
+ 2. **Wallpaper-driven theming.** Native Windows wallpaper extraction and application are not implemented.
67
+ 3. **Windows config locking.** There is no ACL/EFS equivalent of the Unix immutable-file operation.
68
+ 4. **Authenticode signing.** Release provenance covers the archive, but `install.ps1` and `dot.ps1` are not Authenticode-signed for enterprise execution policies.
69
69
 
70
70
  ## Source-of-truth files
71
71
 
72
72
  - `.github/workflows/ci.yml` — `test-windows` job (pwsh + scoop + chezmoi + smoke)
73
73
  - `tools/ci/windows-smoke-test.ps1` — the actual gate
74
- - `dot_config/powershell/Microsoft.PowerShell_profile.ps1` — the deployed PowerShell profile (if present)
74
+ - `bin/dot.ps1` and `scripts/dot/powershell/Dot.psm1` — native dispatcher and cmdlets
75
+ - `defaults/dot_config/powershell/Microsoft.PowerShell_profile.ps1.tmpl` — deployed profile
75
76
  - `scripts/dot/lib/platform.sh` — the dot_path_to_unix/native bridge (H9 audit fix)
76
77
 
77
78
  ## Why this matters
@@ -54,7 +54,7 @@ Examples (depend on what's present on your system):
54
54
  |:---|:---|
55
55
  | `~/Pictures/Wallpapers/tahoe.heic` (dynamic HEIC, 2 frames) | `tahoe-dark`, `tahoe-light` |
56
56
  | `/System/Library/Desktop Pictures/Sonoma.heic` | `sonoma-dark`, `sonoma-light` |
57
- | `/System/Library/Desktop Pictures/.thumbnails/Dome Dark.heic` + `Dome Light.heic` | `dome-dark`, `dome-light` |
57
+ | `/System/Library/Desktop Pictures/.thumbnails/Monterey Dark.heic` + `Monterey Light.heic` | `monterey-dark`, `monterey-light` |
58
58
 
59
59
  Only paired themes (with both dark and light variants) appear in `dot theme` and `dot theme list`.
60
60
 
@@ -98,6 +98,7 @@ Detailed guide: [AI.md](../AI.md).
98
98
  | **Aider** | Git-native AI pair programming |
99
99
  | **Claude CLI** | Anthropic's terminal assistant |
100
100
  | **Copilot CLI** | GitHub Copilot in the terminal |
101
+ | **Kimi CLI** | Moonshot AI Kimi Code terminal coding agent |
101
102
  | **Kiro CLI** | Agentic AI terminal assistant |
102
103
  | **Antigravity CLI** | Google's Antigravity CLI (`agy`) |
103
104
  | **Mods/Fabric** | Pipeline-friendly AI processing |
@@ -124,6 +124,7 @@ prints a one-line hint. See [AI.md](../AI.md) for the full surface.
124
124
  |---------|-------------|
125
125
  | `dot cl` | Claude Code with context injection — use `dot ai claude` |
126
126
  | `dot copilot` | GitHub Copilot CLI — use `dot ai copilot` |
127
+ | `dot kimi` | Kimi CLI — use `dot ai kimi` |
127
128
  | `dot agy` | Antigravity CLI — use `dot ai agy` |
128
129
  | `dot kiro` | Kiro CLI — use `dot ai kiro` |
129
130
  | `dot sgpt` | Shell-GPT — use `dot ai sgpt` |
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://sebastienrousseau.github.io/dotfiles/schema/dot-registry-v1.json",
4
+ "title": "Dot Module Registry v1",
5
+ "description": "Integrity-pinned index consumed by dot registry.",
6
+ "type": "object",
7
+ "required": ["version", "modules"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "version": { "const": 1 },
11
+ "updated": { "type": "string", "format": "date-time" },
12
+ "registry": { "type": "string", "minLength": 1 },
13
+ "modules": {
14
+ "type": "array",
15
+ "items": {
16
+ "type": "object",
17
+ "required": ["name", "version", "description", "archive_url", "sha256"],
18
+ "additionalProperties": false,
19
+ "properties": {
20
+ "name": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,31}$" },
21
+ "version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+([+-][0-9A-Za-z.-]+)?$" },
22
+ "description": { "type": "string", "maxLength": 200 },
23
+ "archive_url": { "type": "string", "pattern": "^https://" },
24
+ "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
25
+ "repo": { "type": "string", "pattern": "^https://" },
26
+ "tags": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
27
+ "maintainer": { "type": "string", "minLength": 1 },
28
+ "license": { "type": "string", "minLength": 1 }
29
+ }
30
+ }
31
+ }
32
+ }
33
+ }
@@ -35,7 +35,7 @@ Aggregate score **7.6 / 10** at 2026-05-17T08:11:51Z.
35
35
  | Token-Permissions | 10 | GitHub workflow tokens follow principle of least privilege |
36
36
  | Vulnerabilities | 10 | 0 existing vulnerabilities detected |
37
37
 
38
- *Refresh: `scripts/qa/scorecard-snapshot.sh` · CI check: `lint/scorecard-snapshot` (planned).*
38
+ *Refresh: `scripts/qa/scorecard-snapshot.sh` · Monitoring: `.github/workflows/scorecard.yml`.*
39
39
  <!-- END scorecard-snapshot -->
40
40
 
41
41
  [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/sebastienrousseau/dotfiles/badge)](https://scorecard.dev/viewer/?uri=github.com/sebastienrousseau/dotfiles)
package/install.sh CHANGED
@@ -2,7 +2,7 @@
2
2
  # SPDX-License-Identifier: MIT
3
3
  # Copyright (c) 2015-2026 Sebastien Rousseau
4
4
  # Universal Dotfiles Installer (Zero-Dependency)
5
- # Usage: bash -c "$(curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh)"
5
+ # Usage: gh repo clone sebastienrousseau/dotfiles && cd dotfiles && ./install.sh
6
6
  # (or ./install.sh locally)
7
7
 
8
8
  # This installer uses bash features (set -o pipefail, arrays, [[ ]]). If it is
@@ -12,7 +12,7 @@
12
12
  # it parses in any shell before bash takes over.
13
13
  if [ -z "${BASH_VERSION:-}" ]; then
14
14
  echo "install.sh requires bash. Run: bash install.sh" >&2
15
- echo " or: bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/sebastienrousseau/dotfiles/main/install.sh)\"" >&2
15
+ echo " clone: gh repo clone sebastienrousseau/dotfiles && cd dotfiles && ./install.sh" >&2
16
16
  exit 1
17
17
  fi
18
18
 
@@ -71,7 +71,7 @@ show_help() {
71
71
  Usage: install.sh [version] [options]
72
72
 
73
73
  Arguments:
74
- version The version (tag or branch) to install (default: v0.2.511)
74
+ version The version (tag or branch) to install (default: v0.2.513)
75
75
 
76
76
  Options:
77
77
  --help Show this help message
@@ -87,7 +87,7 @@ EOF
87
87
  }
88
88
 
89
89
  main() {
90
- local version="v0.2.511"
90
+ local version="v0.2.513"
91
91
  local version_set=0
92
92
  local minimal=0
93
93
  local provision="${DOTFILES_PROVISION:-0}"
@@ -117,7 +117,7 @@ main() {
117
117
  # like `foobar` doesn't trigger a 30s+ network download attempt.
118
118
  # Caught by the install.sh fuzz harness (#881).
119
119
  if [[ ! "$arg" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+([-+][a-zA-Z0-9.-]+)?$ ]]; then
120
- error "Unrecognized positional argument '$arg' — expected a semver version (e.g. v0.2.511)."
120
+ error "Unrecognized positional argument '$arg' — expected a semver version (e.g. v0.2.513)."
121
121
  fi
122
122
  version="$arg"
123
123
  version_set=1
@@ -158,8 +158,15 @@ main() {
158
158
  brew install gum >/dev/null 2>&1
159
159
  elif [[ "$target_os" == "debian" || "$target_os" == "wsl2" ]]; then
160
160
  sudo mkdir -p /etc/apt/keyrings
161
- curl -fsSL https://repo.charm.sh/apt/gpg.key |
162
- sudo gpg --batch --yes --dearmor -o /etc/apt/keyrings/charm.gpg
161
+ charm_key_tmp="$(mktemp -t charm-key.XXXXXX)"
162
+ if ! curl --proto '=https' --tlsv1.2 -fsSL \
163
+ -o "$charm_key_tmp" https://repo.charm.sh/apt/gpg.key; then
164
+ rm -f "$charm_key_tmp"
165
+ return 1
166
+ fi
167
+ sudo gpg --batch --yes --dearmor \
168
+ -o /etc/apt/keyrings/charm.gpg "$charm_key_tmp"
169
+ rm -f "$charm_key_tmp"
163
170
  # Pin the Charm GPG key fingerprint — a DNS attacker swapping
164
171
  # repo.charm.sh/apt/gpg.key for a forged key with the same uid
165
172
  # would otherwise pass the prior "any fid: present" check.
@@ -362,7 +369,7 @@ main() {
362
369
  # 6. Initialize & Apply
363
370
  step "Applying Configuration..."
364
371
 
365
- # ── Auto-migration for v0.2.511 reorg ─────────────────────────────────
372
+ # ── Auto-migration for v0.2.513 reorg ─────────────────────────────────
366
373
  # If the user is upgrading from a pre-0.2.503 install, run the
367
374
  # migration script BEFORE `chezmoi apply` so the reorg's source-
368
375
  # path moves don't cause chezmoi to delete deployed files.
@@ -371,7 +378,7 @@ main() {
371
378
  for migrate_src in "$SOURCE_DIR" "$LEGACY_SOURCE_DIR"; do
372
379
  migrate_script="$migrate_src/install/migrate/migrate-v0_2-to-v0_2_503.sh"
373
380
  if [[ -x "$migrate_script" ]]; then
374
- echo " Running v0.2.511 migration (idempotent; safe on fresh installs)..."
381
+ echo " Running v0.2.513 migration (idempotent; safe on fresh installs)..."
375
382
  "$migrate_script" || echo " migration exited non-zero — continuing apply"
376
383
  break
377
384
  fi
@@ -443,14 +450,16 @@ main() {
443
450
  if [[ -d "$prov_dir" ]]; then
444
451
  local script
445
452
  # run_once_install_* (shells) first, then numbered run_onchange_* in order.
453
+ # The fixed globs contain no user-controlled filenames.
454
+ # shellcheck disable=SC2012
446
455
  while IFS= read -r script; do
447
456
  [[ -f "$script" ]] || continue
448
457
  echo " → $(basename "$script")"
449
458
  if [[ "$script" == *.tmpl ]]; then
450
- chezmoi execute-template <"$script" | bash ||
459
+ chezmoi execute-template <"$script" | DOTFILES_SOURCE_DIR="$SOURCE_DIR" bash ||
451
460
  echo " (step exited non-zero — continuing)"
452
461
  else
453
- bash "$script" || echo " (step exited non-zero — continuing)"
462
+ DOTFILES_SOURCE_DIR="$SOURCE_DIR" bash "$script" || echo " (step exited non-zero — continuing)"
454
463
  fi
455
464
  done < <(ls "$prov_dir"/run_once_install_* "$prov_dir"/run_onchange_* 2>/dev/null | sort)
456
465
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebastienrousseau/dotfiles",
3
- "version": "0.2.511",
3
+ "version": "0.2.513",
4
4
  "description": "The Trusted Shell Platform — Universal dotfiles managed by Chezmoi. Features Bash & Zsh for macOS, Linux & WSL. Rust modern tooling & enterprise-grade security.",
5
5
  "main": "install.sh",
6
6
  "bin": {
File without changes
@@ -6,6 +6,15 @@
6
6
 
7
7
  set -euo pipefail
8
8
 
9
+ usage() {
10
+ cat <<'EOF'
11
+ Usage: aliases-manifest.sh [chezmoi-source-dir]
12
+
13
+ Emit alias definitions as tab-separated rows:
14
+ name<TAB>value<TAB>file<TAB>line
15
+ EOF
16
+ }
17
+
9
18
  resolve_source_dir() {
10
19
  if [[ -n "${CHEZMOI_SOURCE_DIR:-}" && -d "${CHEZMOI_SOURCE_DIR}" ]]; then
11
20
  printf "%s\n" "${CHEZMOI_SOURCE_DIR}"
@@ -39,12 +48,30 @@ resolve_chezmoi_source_dir() {
39
48
  printf "%s\n" "$root"
40
49
  }
41
50
 
51
+ case "${1:-}" in
52
+ -h | --help)
53
+ usage
54
+ exit 0
55
+ ;;
56
+ -*)
57
+ printf 'Unknown option: %s\n' "$1" >&2
58
+ usage >&2
59
+ exit 2
60
+ ;;
61
+ esac
62
+
42
63
  src_root="${1:-$(resolve_source_dir)}"
43
64
  src_dir="$(resolve_chezmoi_source_dir "$src_root")"
44
65
 
45
- rg -n \
46
- -e '^[[:space:]]*alias[[:space:]]+[A-Za-z0-9_.:-]+=' \
47
- -e '^[[:space:]]*[^#"'\'']*&&[[:space:]]*alias[[:space:]]+[A-Za-z0-9_.:-]+=' \
48
- "$src_dir/.chezmoitemplates/aliases" \
49
- "$src_dir/.chezmoitemplates/functions" |
50
- sed -E 's#^([^:]+):([0-9]+):.*alias[[:space:]]+([A-Za-z0-9_.:-]+)=(.*)$#\3\t\4\t\1\t\2#'
66
+ alias_pattern='^[[:space:]]*alias[[:space:]]+[A-Za-z0-9_.:-]+='
67
+ conditional_alias_pattern='^[[:space:]]*[^#"'\'']*&&[[:space:]]*alias[[:space:]]+[A-Za-z0-9_.:-]+='
68
+ search_paths=(
69
+ "$src_dir/.chezmoitemplates/aliases"
70
+ "$src_dir/.chezmoitemplates/functions"
71
+ )
72
+
73
+ if command -v rg >/dev/null 2>&1; then
74
+ rg -n -e "$alias_pattern" -e "$conditional_alias_pattern" "${search_paths[@]}"
75
+ else
76
+ grep -rEn -e "$alias_pattern" -e "$conditional_alias_pattern" "${search_paths[@]}"
77
+ fi | sed -E 's#^([^:]+):([0-9]+):.*alias[[:space:]]+([A-Za-z0-9_.:-]+)=(.*)$#\3\t\4\t\1\t\2#'
@@ -56,6 +56,19 @@ export DOT_COMMAND="benchmark"
56
56
  BENCHMARK_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/dotfiles/benchmarks"
57
57
  mkdir -p "$BENCHMARK_DIR"
58
58
 
59
+ usage() {
60
+ cat <<'EOF'
61
+ Usage: dot benchmark [--detailed] [--profile] [--compare] [--waterfall]
62
+
63
+ Options:
64
+ -d, --detailed Show per-component timing before the benchmark
65
+ -p, --profile Run zsh zprof analysis
66
+ -c, --compare Compare recent benchmark history
67
+ -w, --waterfall Show an ASCII component waterfall
68
+ -h, --help Show this help
69
+ EOF
70
+ }
71
+
59
72
  # Parse arguments
60
73
  DETAILED=false
61
74
  PROFILE=false
@@ -79,11 +92,24 @@ while [[ $# -gt 0 ]]; do
79
92
  WATERFALL=true
80
93
  shift
81
94
  ;;
82
- *) shift ;;
95
+ --help | -h)
96
+ usage
97
+ exit 0
98
+ ;;
99
+ *)
100
+ printf 'Unknown option: %s\n' "$1" >&2
101
+ usage >&2
102
+ exit 2
103
+ ;;
83
104
  esac
84
105
  done
85
106
 
86
107
  ui_init
108
+ GREEN="${GREEN:-}"
109
+ YELLOW="${YELLOW:-}"
110
+ RED="${RED:-}"
111
+ CYAN="${CYAN:-}"
112
+ NC="${NC:-}"
87
113
 
88
114
  print_header() {
89
115
  echo ""
@@ -169,7 +169,7 @@ fi
169
169
 
170
170
  # --- AI CLIs ---
171
171
  _section "AI CLIs"
172
- for cmd in claude copilot agy sgpt ollama opencode aider kiro-cli; do
172
+ for cmd in claude copilot kimi agy sgpt ollama opencode aider kiro-cli; do
173
173
  if check_cmd "$cmd"; then
174
174
  _ok "$cmd" "$(pretty_path "$(get_cmd_path "$cmd")")"
175
175
  else
@@ -226,6 +226,9 @@ fi
226
226
 
227
227
  # --- OS-specific detection ---
228
228
  _os="" _host="" _cpu="" _cpu_cores="" _gpu="" _mem="" _resolution="" _packages="" _de=""
229
+ os_release_file="${DOT_DOCTOR_OS_RELEASE:-/etc/os-release}"
230
+ proc_root="${DOT_DOCTOR_PROC_ROOT:-/proc}"
231
+ sys_root="${DOT_DOCTOR_SYS_ROOT:-/sys}"
229
232
 
230
233
  if [[ "$_os_name" == "Darwin" ]]; then
231
234
  # macOS
@@ -243,33 +246,37 @@ if [[ "$_os_name" == "Darwin" ]]; then
243
246
  _packages="$(brew list --formula 2>/dev/null | wc -l | tr -d ' ') (brew)"
244
247
  _de="Aqua"
245
248
 
246
- elif [[ -r /etc/os-release ]]; then
249
+ elif [[ -r "$os_release_file" ]]; then
247
250
  # Linux (Debian, Ubuntu, Arch, Fedora, RHEL, etc.)
248
251
  # shellcheck disable=SC1091
249
- . /etc/os-release
252
+ . "$os_release_file"
250
253
  _os="${PRETTY_NAME:-$ID}"
251
254
 
252
- _host="$(cat /sys/devices/virtual/dmi/id/product_name 2>/dev/null || cat /sys/firmware/devicetree/base/model 2>/dev/null || echo "Linux")"
255
+ _host="$(cat "$sys_root/devices/virtual/dmi/id/product_name" 2>/dev/null || cat "$sys_root/firmware/devicetree/base/model" 2>/dev/null || echo "Linux")"
253
256
 
254
257
  if command -v lscpu >/dev/null 2>&1; then
255
258
  _cpu="$(lscpu | awk -F': +' '/Model name/{print $2}')"
256
259
  _cpu_cores="$(lscpu | awk -F': +' '/^CPU\(s\):/{print $2}')"
257
260
  else
258
- _cpu="$(grep -m1 'model name' /proc/cpuinfo 2>/dev/null | cut -d: -f2 | sed 's/^ //' || uname -p)"
259
- _cpu_cores="$(grep -c '^processor' /proc/cpuinfo 2>/dev/null || echo "?")"
261
+ _cpu="$(grep -m1 'model name' "$proc_root/cpuinfo" 2>/dev/null | cut -d: -f2 | sed 's/^ //' || uname -p)"
262
+ _cpu_cores="$(grep -c '^processor' "$proc_root/cpuinfo" 2>/dev/null || echo "?")"
260
263
  fi
261
264
 
262
265
  if command -v lspci >/dev/null 2>&1; then
263
- _gpu="$(lspci 2>/dev/null | grep -iE 'vga|3d|display' | head -1 | sed 's/.*: //')"
266
+ # Headless hosts (VMs, containers, CI runners) expose no display
267
+ # controller, so `grep` exits 1 and — under `set -euo pipefail` —
268
+ # would abort the whole report mid-section. Absorb the miss.
269
+ _gpu="$(lspci 2>/dev/null | grep -iE 'vga|3d|display' | head -1 | sed 's/.*: //' || true)"
270
+ _gpu="${_gpu:-n/a}"
264
271
  else
265
272
  _gpu="n/a"
266
273
  fi
267
274
 
268
275
  if command -v free >/dev/null 2>&1; then
269
276
  _mem="$(free -b | awk '/Mem:/{printf "%.2f GiB / %.2f GiB", $3/1073741824, $2/1073741824}')"
270
- elif [[ -r /proc/meminfo ]]; then
271
- _mem_total_kb="$(awk '/MemTotal/{print $2}' /proc/meminfo)"
272
- _mem_avail_kb="$(awk '/MemAvailable/{print $2}' /proc/meminfo)"
277
+ elif [[ -r "$proc_root/meminfo" ]]; then
278
+ _mem_total_kb="$(awk '/MemTotal/{print $2}' "$proc_root/meminfo")"
279
+ _mem_avail_kb="$(awk '/MemAvailable/{print $2}' "$proc_root/meminfo")"
273
280
  _mem_used_kb=$((_mem_total_kb - _mem_avail_kb))
274
281
  _mem="$(awk "BEGIN{printf \"%.2f GiB / %.2f GiB\", ${_mem_used_kb}/1048576, ${_mem_total_kb}/1048576}")"
275
282
  else
@@ -319,7 +326,7 @@ fi
319
326
 
320
327
  # WSL detection and overrides
321
328
  _wsl=""
322
- if [[ -f /proc/version ]] && grep -qi microsoft /proc/version 2>/dev/null; then
329
+ if [[ -f "$proc_root/version" ]] && grep -qi microsoft "$proc_root/version" 2>/dev/null; then
323
330
  _wsl="yes"
324
331
  _os="${_os} (WSL)"
325
332
  _de="Windows Desktop (WSL)"