@sebastienrousseau/dotfiles 0.2.520 → 0.2.521
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/LICENSE-APACHE +190 -0
- package/LICENSE-MIT +21 -0
- package/README.md +43 -37
- package/install.sh +76 -10
- package/package.json +7 -7
- package/tools/README.md +49 -0
- package/tools/ci/install-chezmoi-verified.sh +68 -0
- package/docs/.vitepress/reports/localization-readability-audit.md +0 -73
- package/docs/AI.md +0 -179
- package/docs/ARCHITECTURE.md +0 -117
- package/docs/CNAME +0 -1
- package/docs/CONFIG_STRATEGY.md +0 -124
- package/docs/COPYRIGHT +0 -7
- package/docs/ECOSYSTEM.md +0 -220
- package/docs/GOLD-STANDARD-AUDIT.md +0 -352
- package/docs/GOVERNANCE.md +0 -98
- package/docs/MAINTAINERS.md +0 -41
- package/docs/MINIMUM-TOOLCHAIN.md +0 -100
- package/docs/NAMING_CONVENTIONS.md +0 -102
- package/docs/OPENCODE.md +0 -127
- package/docs/README.md +0 -84
- package/docs/STRUCTURE.md +0 -102
- package/docs/adr/ADR-001-ci-cd-pipeline.md +0 -118
- package/docs/adr/ADR-002-shell-performance.md +0 -130
- package/docs/adr/ADR-003-security-first.md +0 -158
- package/docs/adr/ADR-004-cli-architecture.md +0 -171
- package/docs/adr/ADR-005-chezmoi-choice.md +0 -99
- package/docs/adr/ADR-006-shell-selection.md +0 -124
- package/docs/adr/ADR-007-multi-shell-parity.md +0 -62
- package/docs/adr/ADR-008-alias-system-architecture.md +0 -95
- package/docs/adr/ADR-009-wallpaper-driven-theming.md +0 -131
- package/docs/adr/ADR-010-starship-transient-prompt.md +0 -144
- package/docs/adr/ADR-011-nushell-tier3-keep.md +0 -144
- package/docs/adr/ADR-012-ai-fleet-local-proxy.md +0 -79
- package/docs/adr/README.md +0 -40
- package/docs/architecture/AI_COST_OPTIMIZATION.md +0 -144
- package/docs/architecture/ARCHITECTURE.md +0 -20
- package/docs/architecture/INTEROP.md +0 -44
- package/docs/architecture/REPO_LAYOUT.md +0 -241
- package/docs/architecture/WALKTHROUGH.md +0 -86
- package/docs/architecture/fleet-deployment.md +0 -77
- package/docs/archive/EUXIS_2026_REVIEW.md +0 -127
- package/docs/archive/LEGACY_ROADMAP.md +0 -6
- package/docs/archive/MILESTONE_v0.2.493.md +0 -47
- package/docs/archive/PLAN.md +0 -199
- package/docs/archive/REPO_AUDIT.md +0 -31
- package/docs/articles/.pages +0 -6
- package/docs/articles/2026-07-05-custom-mkdocs-material-dark-theme.md +0 -216
- package/docs/articles/2026-07-05-fish-startup-abbr.md +0 -153
- package/docs/articles/2026-07-05-master-to-main-rename-runbook.md +0 -128
- package/docs/articles/index.md +0 -36
- package/docs/guides/INSTALL.md +0 -144
- package/docs/guides/MACOS_ICLOUD_SYMLINKS.md +0 -121
- package/docs/guides/NEOVIM_IDE_GUIDE.md +0 -61
- package/docs/guides/THEMING.md +0 -230
- package/docs/guides/TROUBLESHOOTING.md +0 -176
- package/docs/guides/WSL2_NIX_TROUBLESHOOTING.md +0 -792
- package/docs/index.md +0 -132
- package/docs/interop/A2A.md +0 -39
- package/docs/interop/POWERSHELL.md +0 -102
- package/docs/manual/00-introduction.md +0 -89
- package/docs/manual/01-concepts/01-architecture.md +0 -138
- package/docs/manual/01-concepts/02-trust-model.md +0 -183
- package/docs/manual/01-concepts/03-theme-engine.md +0 -186
- package/docs/manual/01-concepts/04-fleet.md +0 -148
- package/docs/manual/01-concepts/05-self-healing.md +0 -204
- package/docs/manual/02-tutorials/01-first-install.md +0 -197
- package/docs/manual/02-tutorials/02-add-wallpaper.md +0 -216
- package/docs/manual/02-tutorials/03-create-profile.md +0 -244
- package/docs/manual/02-tutorials/04-encrypt-secret.md +0 -281
- package/docs/manual/02-tutorials/05-deploy-fleet.md +0 -283
- package/docs/manual/03-reference/01-dot-cli.md +0 -475
- package/docs/manual/03-reference/02-config-files.md +0 -265
- package/docs/manual/03-reference/03-environment.md +0 -124
- package/docs/manual/03-reference/04-templates.md +0 -190
- package/docs/manual/03-reference/05-feature-flags.md +0 -187
- package/docs/manual/04-cookbook/01-recipes.md +0 -285
- package/docs/manual/04-cookbook/02-troubleshooting.md +0 -351
- package/docs/manual/04-cookbook/03-faq.md +0 -175
- package/docs/manual/05-appendices/A-platform-matrix.md +0 -101
- package/docs/manual/05-appendices/B-security-checklist.md +0 -85
- package/docs/manual/05-appendices/C-glossary.md +0 -40
- package/docs/manual/05-appendices/D-bibliography.md +0 -58
- package/docs/manual/05-appendices/E-license.md +0 -38
- package/docs/manual/_toc.yml +0 -58
- package/docs/manual/command-index.md +0 -175
- package/docs/manual/concept-index.md +0 -170
- package/docs/manual/index.md +0 -66
- package/docs/migration/README.md +0 -81
- package/docs/migration/from-bare-git-repo.md +0 -156
- package/docs/migration/from-gnu-stow.md +0 -165
- package/docs/migration/from-plain-chezmoi.md +0 -148
- package/docs/migration/from-yadm.md +0 -187
- package/docs/operations/ARCHITECTURE_ROADMAP.md +0 -7
- package/docs/operations/ATTESTATION.md +0 -44
- package/docs/operations/CI_CADENCE.md +0 -107
- package/docs/operations/CI_COMPOSITES.md +0 -156
- package/docs/operations/COMPLETIONS.md +0 -123
- package/docs/operations/COVERAGE.md +0 -204
- package/docs/operations/DRIFT.md +0 -107
- package/docs/operations/HARD_AUDIT_2026.md +0 -631
- package/docs/operations/MAINTENANCE.md +0 -63
- package/docs/operations/MANIFEST.md +0 -127
- package/docs/operations/MIGRATION.md +0 -109
- package/docs/operations/OPERATIONS.md +0 -188
- package/docs/operations/PERFORMANCE.md +0 -133
- package/docs/operations/PERFORMANCE_BUDGETS.md +0 -196
- package/docs/operations/REGISTRY.md +0 -90
- package/docs/operations/RELEASE_PIPELINE.md +0 -128
- package/docs/operations/RELIABILITY.md +0 -122
- package/docs/operations/RFC_v0_2_503_reorganization.md +0 -280
- package/docs/operations/ROADMAP.md +0 -10
- package/docs/operations/ROADMAP_2026.md +0 -7
- package/docs/operations/ROADMAP_V0_2_503.md +0 -10
- package/docs/operations/TESTING.md +0 -216
- package/docs/operations/TRACEABILITY.md +0 -44
- package/docs/operations/TRUSTED_AGENT_WORKSTATION.md +0 -65
- package/docs/operations/VERSION_SYNC.md +0 -393
- package/docs/packaging.md +0 -222
- package/docs/reference/ALIASES.md +0 -131
- package/docs/reference/ALIASES_CHEATSHEET.md +0 -32
- package/docs/reference/ALIASES_DEPRECATIONS.md +0 -13
- package/docs/reference/FEATURE-MATRIX.md +0 -646
- package/docs/reference/FEATURES.md +0 -66
- package/docs/reference/FONTS.md +0 -112
- package/docs/reference/POWERSHELL_PARITY.md +0 -82
- package/docs/reference/PROFILES.md +0 -69
- package/docs/reference/SCREENSHOTS.md +0 -121
- package/docs/reference/SCRIPTS.md +0 -71
- package/docs/reference/SUPPORT_MATRIX.md +0 -80
- package/docs/reference/THEMES.md +0 -117
- package/docs/reference/TOOLS.md +0 -110
- package/docs/reference/UTILS.md +0 -243
- package/docs/registry.json +0 -6
- package/docs/schema/dot-env-v1.json +0 -110
- package/docs/schema/dot-registry-v1.json +0 -33
- package/docs/security/AI_ACT_COMPLIANCE.md +0 -94
- package/docs/security/AUDIT_BYPASS.md +0 -103
- package/docs/security/AUTOMATION_SECRETS.md +0 -26
- package/docs/security/CI_EGRESS_ALLOWLIST.md +0 -127
- package/docs/security/CI_PINNING.md +0 -129
- package/docs/security/COMMIT_SIGNING.md +0 -138
- package/docs/security/COMPLIANCE.md +0 -458
- package/docs/security/DEPS_DEV_EXCEPTIONS.md +0 -86
- package/docs/security/DISCLOSURE.md +0 -130
- package/docs/security/ENCRYPTION.md +0 -57
- package/docs/security/FMEA.md +0 -159
- package/docs/security/FUZZING.md +0 -209
- package/docs/security/HISTORY_FILTERING.md +0 -132
- package/docs/security/INCIDENT_RESPONSE.md +0 -579
- package/docs/security/INSTALL_VERIFICATION.md +0 -122
- package/docs/security/KEYS.md +0 -49
- package/docs/security/KEY_ROTATION.md +0 -303
- package/docs/security/MCP_POLICY.md +0 -78
- package/docs/security/POLICY_RELEASES.md +0 -37
- package/docs/security/README.md +0 -28
- package/docs/security/SCORECARD.md +0 -195
- package/docs/security/SECRETS.md +0 -158
- package/docs/security/SECURITY.md +0 -45
- package/docs/security/SECURITY_CHECKLIST.md +0 -55
- package/docs/security/SHELL_EXEMPTIONS.md +0 -145
- package/docs/security/SOUP_REGISTER.md +0 -36
- package/docs/security/THREAT_MODEL.md +0 -130
- package/docs/security/VERIFICATION_VALIDATION.md +0 -228
- package/docs/security/VERIFY_RELEASE.md +0 -201
- package/docs/security/security-pubkey.asc +0 -15
- package/docs/stylesheets/extra.css +0 -444
- package/docs/themes/README.md +0 -10
- package/docs/themes/VISUAL_INTEGRITY_REPORT.md +0 -30
- package/docs/themes/hero-shot.svg +0 -78
- package/scripts/README.md +0 -123
- package/scripts/ci/check-copyright-headers.sh +0 -8
- package/scripts/ci/check-shell-preamble.sh +0 -8
- package/scripts/ci/guard-gitleaks-checkout.sh +0 -8
- package/scripts/demo/record.sh +0 -43
- package/scripts/diagnostics/a2a-conformance.sh +0 -163
- package/scripts/diagnostics/alias-governance.sh +0 -165
- package/scripts/diagnostics/aliases-cheatsheet.sh +0 -74
- package/scripts/diagnostics/aliases-manifest.sh +0 -77
- package/scripts/diagnostics/attest-verify.sh +0 -147
- package/scripts/diagnostics/benchmark.sh +0 -408
- package/scripts/diagnostics/conflicts.sh +0 -73
- package/scripts/diagnostics/doctor-unified.sh +0 -43
- package/scripts/diagnostics/doctor.sh +0 -797
- package/scripts/diagnostics/drift-dashboard.sh +0 -203
- package/scripts/diagnostics/health.sh +0 -656
- package/scripts/diagnostics/history-analysis.sh +0 -86
- package/scripts/diagnostics/mcp-doctor.sh +0 -582
- package/scripts/diagnostics/perf.sh +0 -453
- package/scripts/diagnostics/scorecard.sh +0 -120
- package/scripts/diagnostics/secret-governance.sh +0 -65
- package/scripts/diagnostics/security-score.sh +0 -467
- package/scripts/diagnostics/smoke-test.sh +0 -88
- package/scripts/diagnostics/snapshot.sh +0 -90
- package/scripts/diagnostics/verify.sh +0 -108
- package/scripts/diagnostics/verify_state.sh +0 -73
- package/scripts/diagnostics/version-locks.sh +0 -94
- package/scripts/diagnostics/workstation-attestation.sh +0 -212
- package/scripts/dot/commands/agent.sh +0 -535
- package/scripts/dot/commands/agents.sh +0 -352
- package/scripts/dot/commands/ai.sh +0 -600
- package/scripts/dot/commands/aliases.sh +0 -277
- package/scripts/dot/commands/appearance.sh +0 -110
- package/scripts/dot/commands/completion.sh +0 -171
- package/scripts/dot/commands/core.sh +0 -217
- package/scripts/dot/commands/diagnostics.sh +0 -265
- package/scripts/dot/commands/env-emit.sh +0 -203
- package/scripts/dot/commands/fleet.sh +0 -711
- package/scripts/dot/commands/init.sh +0 -185
- package/scripts/dot/commands/lint.sh +0 -208
- package/scripts/dot/commands/manual.sh +0 -169
- package/scripts/dot/commands/meta.sh +0 -438
- package/scripts/dot/commands/patterns.sh +0 -55
- package/scripts/dot/commands/registry.sh +0 -455
- package/scripts/dot/commands/restore.sh +0 -232
- package/scripts/dot/commands/secrets.sh +0 -296
- package/scripts/dot/commands/security.sh +0 -102
- package/scripts/dot/commands/tools.sh +0 -570
- package/scripts/dot/data/alias-deprecations.tsv +0 -2
- package/scripts/dot/powershell/Dot.psm1 +0 -319
- package/scripts/fonts/install-nerd-fonts.sh +0 -75
- package/scripts/fonts/patch-fonts.sh +0 -36
- package/scripts/git-hooks/install.sh +0 -12
- package/scripts/git-hooks/pre-commit +0 -12
- package/scripts/git-hooks/pre-commit-audit.sh +0 -146
- package/scripts/git-hooks/pre-push +0 -105
- package/scripts/git-hooks/prepare-commit-msg +0 -29
- package/scripts/lib/secrets_provider.sh +0 -200
- package/scripts/nvim/headless-upgrade.lua +0 -81
- package/scripts/ops/ai-setup.sh +0 -71
- package/scripts/ops/bundle.sh +0 -104
- package/scripts/ops/chaos.sh +0 -50
- package/scripts/ops/chezmoi-apply.sh +0 -333
- package/scripts/ops/chezmoi-diff.sh +0 -16
- package/scripts/ops/chezmoi-remove.sh +0 -46
- package/scripts/ops/chezmoi-update.sh +0 -67
- package/scripts/ops/heal-chezmoi.sh +0 -87
- package/scripts/ops/heal-system.sh +0 -129
- package/scripts/ops/heal-tools.sh +0 -297
- package/scripts/ops/heal.sh +0 -223
- package/scripts/ops/post-apply-repair.sh +0 -107
- package/scripts/ops/prewarm.sh +0 -128
- package/scripts/ops/release.sh +0 -262
- package/scripts/ops/rollback.sh +0 -613
- package/scripts/ops/setup.sh +0 -138
- package/scripts/ops/teleport.sh +0 -34
- package/scripts/qa/check-feature-matrix.sh +0 -296
- package/scripts/qa/check-version-consistency.sh +0 -12
- package/scripts/qa/coverage-baseline.sh +0 -61
- package/scripts/qa/docs-coverage.sh +0 -118
- package/scripts/qa/examples-coverage.sh +0 -94
- package/scripts/qa/powershell-contract.ps1 +0 -95
- package/scripts/qa/reliability-audit.sh +0 -139
- package/scripts/qa/scorecard-snapshot.sh +0 -128
- package/scripts/qa/traceability-coverage.sh +0 -124
- package/scripts/qa/validate-examples.sh +0 -90
- package/scripts/qa/wsl-contract.sh +0 -12
- package/scripts/secrets/age-init.sh +0 -82
- package/scripts/secrets/create-secrets-file.sh +0 -46
- package/scripts/secrets/encrypt-ssh-key.sh +0 -44
- package/scripts/security/backup.sh +0 -58
- package/scripts/security/check-disclosure-key-expiry.sh +0 -111
- package/scripts/security/dns-doh.sh +0 -52
- package/scripts/security/encryption-check.sh +0 -55
- package/scripts/security/enforce-policies.sh +0 -552
- package/scripts/security/firewall.sh +0 -91
- package/scripts/security/lock-configs.sh +0 -67
- package/scripts/security/lock-screen.sh +0 -56
- package/scripts/security/manage-secrets.sh +0 -429
- package/scripts/security/ssh-cert.sh +0 -204
- package/scripts/security/telemetry-kill.sh +0 -51
- package/scripts/security/usb-safety.sh +0 -52
- package/scripts/theme/apply-gnome-theme.sh +0 -333
- package/scripts/theme/extract-heic-frames.sh +0 -115
- package/scripts/theme/extract-theme.py +0 -1020
- package/scripts/theme/install-boot-logo.sh +0 -63
- package/scripts/theme/install-catppuccin-themes.sh +0 -371
- package/scripts/theme/install-cursors.sh +0 -26
- package/scripts/theme/install-file-icons.sh +0 -27
- package/scripts/theme/install-grub-theme.sh +0 -62
- package/scripts/theme/install-lock-icon.sh +0 -31
- package/scripts/theme/merge-wallpaper.sh +0 -146
- package/scripts/theme/rebuild-themes.sh +0 -603
- package/scripts/theme/switch.sh +0 -476
- package/scripts/theme/wallpaper-rotate.sh +0 -137
- package/scripts/theme/wallpaper-sync.sh +0 -690
- package/scripts/tools/cmatrix.sh +0 -22
- package/scripts/tools/detect-collisions.py +0 -103
- package/scripts/tools/emoji-picker.sh +0 -49
- package/scripts/tools/figlet-banner.sh +0 -19
- package/scripts/tools/log-rotate.sh +0 -31
- package/scripts/tools/lolcat-wrap.sh +0 -20
- package/scripts/tools/pipes.sh +0 -49
- package/scripts/tuning/linux.sh +0 -186
- package/scripts/tuning/macos.sh +0 -56
- package/scripts/uninstall.sh +0 -86
- package/scripts/verify-release-versions +0 -156
- package/scripts/version-sync.sh +0 -714
- package/templates/chezmoi-data/geekom-a9.toml.example +0 -21
- package/templates/chezmoi-data/mac-m1.toml.example +0 -16
- package/templates/chezmoi-data/mac-t2-linux.toml.example +0 -21
- package/templates/chezmoi-data/surface-pro-7p.toml.example +0 -21
- package/templates/projects/go/.github/workflows/ci.yml +0 -31
- package/templates/projects/go/README.md +0 -7
- package/templates/projects/go/cmd/__PROJECT_NAME__/main.go +0 -8
- package/templates/projects/go/go.mod +0 -3
- package/templates/projects/go/go.sum +0 -0
- package/templates/projects/molecule/README.md +0 -7
- package/templates/projects/molecule/converge.yml +0 -7
- package/templates/projects/molecule/molecule.yml +0 -16
- package/templates/projects/node/.github/workflows/ci.yml +0 -30
- package/templates/projects/node/README.md +0 -7
- package/templates/projects/node/package-lock.json +0 -12
- package/templates/projects/node/package.json +0 -10
- package/templates/projects/node/src/index.js +0 -3
- package/templates/projects/packer/README.md +0 -15
- package/templates/projects/packer/main.pkr.hcl +0 -15
- package/templates/projects/python/.github/workflows/ci.yml +0 -34
- package/templates/projects/python/README.md +0 -7
- package/templates/projects/python/pyproject.toml +0 -25
- package/templates/projects/python/src/__PROJECT_NAME__/__init__.py +0 -2
- package/templates/projects/python/tests/test_basic.py +0 -3
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# ADR-007: Multi-Shell Parity Strategy
|
|
6
|
-
|
|
7
|
-
## Status
|
|
8
|
-
|
|
9
|
-
Accepted
|
|
10
|
-
|
|
11
|
-
## Date
|
|
12
|
-
|
|
13
|
-
2026-03-08
|
|
14
|
-
|
|
15
|
-
## Context
|
|
16
|
-
|
|
17
|
-
The dotfiles distribution supports three shells: Zsh (default since macOS Catalina), Fish (modern interactive shell), and Nushell (structured data shell). The codebase has 98 alias files and 52+ functions written in POSIX/Bash. Without a parity strategy, each shell gets a fragmented subset of functionality.
|
|
18
|
-
|
|
19
|
-
**Problem:** Fish had zero access to the alias/function library until v0.2.501 added bridge templates. Nushell had only 6 hardcoded aliases and no function access.
|
|
20
|
-
|
|
21
|
-
**Constraints:**
|
|
22
|
-
|
|
23
|
-
- Nushell's `source` is parse-time evaluated (no dynamic sourcing)
|
|
24
|
-
- Fish syntax differs significantly from POSIX (no `$()`, different `if`, no `[[`)
|
|
25
|
-
- Maintaining N copies of every alias/function is unsustainable
|
|
26
|
-
|
|
27
|
-
## Decision
|
|
28
|
-
|
|
29
|
-
Adopt a **hub-and-spoke bridge architecture**:
|
|
30
|
-
|
|
31
|
-
1. **Hub:** Canonical definitions live in `.chezmoitemplates/aliases/` (Bash/POSIX) and `.chezmoitemplates/functions/` (Bash)
|
|
32
|
-
2. **Bash/Zsh spoke:** Direct inclusion via `90-ux-aliases.sh.tmpl` and `50-logic-functions.sh.tmpl`
|
|
33
|
-
3. **Fish spoke:** Runtime bash bridge with caching (`aliases.fish.tmpl`, `functions.fish.tmpl`)
|
|
34
|
-
4. **Nushell spoke:** Hybrid approach:
|
|
35
|
-
- Aliases: Runtime bash extraction cached to `~/.cache/nushell/bash-aliases.nu` (in `env.nu.tmpl`), sourced by `aliases.nu.tmpl`
|
|
36
|
-
- Functions: Chezmoi template-generated `def` wrappers delegating to bash (in `functions.nu.tmpl`)
|
|
37
|
-
|
|
38
|
-
**Parity tiers:**
|
|
39
|
-
|
|
40
|
-
- **Tier 1 (Full):** Zsh, Bash — all aliases, functions, lazy loading, cached eval
|
|
41
|
-
- **Tier 2 (Bridged):** Fish — all simple aliases, all functions via wrappers, `_cached_eval` caching
|
|
42
|
-
- **Tier 3 (Compatible):** Nushell — simple aliases (no complex bash syntax), all functions via bash delegation
|
|
43
|
-
|
|
44
|
-
## Consequences
|
|
45
|
-
|
|
46
|
-
### Positive
|
|
47
|
-
|
|
48
|
-
- Single source of truth for aliases and functions
|
|
49
|
-
- Adding a new alias/function automatically propagates to all shells
|
|
50
|
-
- Nushell users get access to 40+ functions that were previously unavailable
|
|
51
|
-
- Fish users get mtime-aware caching via `_cached_eval`
|
|
52
|
-
|
|
53
|
-
### Negative
|
|
54
|
-
|
|
55
|
-
- Complex bash aliases (pipes, conditionals) are skipped for Nushell
|
|
56
|
-
- Function calls in Fish/Nushell incur bash subprocess overhead (~5ms per call)
|
|
57
|
-
- Cache invalidation requires shell restart or manual cache clear
|
|
58
|
-
|
|
59
|
-
### Risks
|
|
60
|
-
|
|
61
|
-
- Nushell's rapid development may break bridge syntax in future versions
|
|
62
|
-
- Very large alias sets may slow Nushell startup during cache generation
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# ADR-008: Alias System Architecture
|
|
6
|
-
|
|
7
|
-
## Status
|
|
8
|
-
|
|
9
|
-
Accepted
|
|
10
|
-
|
|
11
|
-
## Date
|
|
12
|
-
|
|
13
|
-
2026-03-08
|
|
14
|
-
|
|
15
|
-
## Context
|
|
16
|
-
|
|
17
|
-
The dotfiles manage 98 alias files across 30+ categories (git, docker, kubernetes, python, security, etc.). These need to load fast, support per-machine toggling, and work across Zsh, Bash, Fish, and Nushell.
|
|
18
|
-
|
|
19
|
-
**Design questions:**
|
|
20
|
-
|
|
21
|
-
1. How to organize alias files for maintainability?
|
|
22
|
-
2. How to control which aliases load on which machines?
|
|
23
|
-
3. How to balance startup speed with alias availability?
|
|
24
|
-
4. How to bridge POSIX aliases to non-POSIX shells?
|
|
25
|
-
|
|
26
|
-
## Decision
|
|
27
|
-
|
|
28
|
-
### Organization
|
|
29
|
-
|
|
30
|
-
Aliases are organized by tool/domain in `.chezmoitemplates/aliases/<category>/<name>.aliases.sh`:
|
|
31
|
-
|
|
32
|
-
```text
|
|
33
|
-
aliases/
|
|
34
|
-
git/git.aliases.sh, signing.aliases.sh
|
|
35
|
-
docker/docker.aliases.sh
|
|
36
|
-
kubernetes/kubernetes.aliases.sh
|
|
37
|
-
security/crypto-utils.aliases.sh, ssh-keys.aliases.sh, ...
|
|
38
|
-
default/default.aliases.sh
|
|
39
|
-
...
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Profile Tiers
|
|
43
|
-
|
|
44
|
-
Three profiles control alias scope (set in `.chezmoidata.toml`):
|
|
45
|
-
|
|
46
|
-
| Profile | Scope | Use Case |
|
|
47
|
-
|---------|-------|----------|
|
|
48
|
-
| `minimal` | Core only, excludes interactive/sudo | Servers, containers |
|
|
49
|
-
| `standard` | All core + selected ecosystem | Laptops, workstations |
|
|
50
|
-
| `full` | Everything including heavy/specialized | Dev machines |
|
|
51
|
-
|
|
52
|
-
### Bucket Toggles
|
|
53
|
-
|
|
54
|
-
Per-category flags in `.chezmoidata.toml` under `[aliases.buckets]`:
|
|
55
|
-
|
|
56
|
-
```toml
|
|
57
|
-
[aliases.buckets]
|
|
58
|
-
system = true
|
|
59
|
-
svn = false # disable on machines without SVN
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Two-Phase Loading
|
|
63
|
-
|
|
64
|
-
1. **Eager (90-ux-aliases.sh):** Core categories loaded at shell startup (~40KB). Includes: archives, cd, clear, configuration, default, diagnostics, disk-usage, editor, git, interactive, installer, mkdir, modern, ps, rsync, sudo, system.
|
|
65
|
-
|
|
66
|
-
2. **Lazy (91-ux-aliases-lazy.sh):** Ecosystem aliases deferred until first prompt via `precmd` hook. Includes: docker, kubernetes, terraform, gcloud, python, npm, rust, security, etc.
|
|
67
|
-
|
|
68
|
-
### Function Groups (groups.json)
|
|
69
|
-
|
|
70
|
-
Functions use a parallel system with `groups.json` as a registry:
|
|
71
|
-
|
|
72
|
-
- Groups: api, curl, text, system, files, interactive, nav, security, misc
|
|
73
|
-
- Lazy-loaded per group on first invocation
|
|
74
|
-
- Stub functions replaced with real implementations on first call
|
|
75
|
-
|
|
76
|
-
## Consequences
|
|
77
|
-
|
|
78
|
-
### Positive
|
|
79
|
-
|
|
80
|
-
- Adding aliases is self-service: create a file in the right category
|
|
81
|
-
- Per-machine customization without forking
|
|
82
|
-
- Lazy loading keeps startup under 200ms even with 98 alias files
|
|
83
|
-
- `groups.json` enables automated bridge generation for Fish/Nushell
|
|
84
|
-
|
|
85
|
-
### Negative
|
|
86
|
-
|
|
87
|
-
- Alias definitions wrap in functions (`set_default_aliases()`) for sourcing safety, adding complexity
|
|
88
|
-
- Two-phase loading means some aliases aren't available until after first prompt
|
|
89
|
-
- Profile/bucket system requires understanding .chezmoidata.toml
|
|
90
|
-
|
|
91
|
-
### Trade-offs
|
|
92
|
-
|
|
93
|
-
- Chose file-per-category over monolithic alias file for maintainability
|
|
94
|
-
- Chose runtime extraction for Fish/Nushell over maintaining parallel definitions
|
|
95
|
-
- Chose lazy loading over compile-time bundling for flexibility
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# ADR-009: Wallpaper-Driven Theming Engine
|
|
6
|
-
|
|
7
|
-
## Status
|
|
8
|
-
|
|
9
|
-
Accepted
|
|
10
|
-
|
|
11
|
-
## Date
|
|
12
|
-
|
|
13
|
-
2026-05-12
|
|
14
|
-
|
|
15
|
-
## Context
|
|
16
|
-
|
|
17
|
-
Most dotfiles distributions ship a small fixed palette (Solarized, Gruvbox,
|
|
18
|
-
Tokyo Night) chosen once and recycled across every terminal, editor, and
|
|
19
|
-
status bar. When the user changes wallpapers — a daily occurrence on macOS
|
|
20
|
-
with HEIC dark/light variants and on Linux with `swww`/`hyprpaper` —
|
|
21
|
-
terminal chrome stays static, creating visual incoherence between the
|
|
22
|
-
chosen wallpaper and the surrounding tooling.
|
|
23
|
-
|
|
24
|
-
Manual palette switching solves coherence but adds friction: it requires
|
|
25
|
-
the user to (a) generate a palette, (b) regenerate config for every tool
|
|
26
|
-
(`alacritty.toml`, `kitty.conf`, `wezterm.lua`, neovim themes, …), and
|
|
27
|
-
(c) reload each tool. Tools like pywal/wal automate (a) and (b), but
|
|
28
|
-
pywal palettes routinely fail WCAG contrast thresholds (especially for
|
|
29
|
-
bright wallpapers) and lack support for many of the format files this
|
|
30
|
-
project ships.
|
|
31
|
-
|
|
32
|
-
**Problem:** Reuse the user's chosen wallpaper as the single source of
|
|
33
|
-
truth for terminal + status-bar colors, with accessibility guaranteed and
|
|
34
|
-
no manual regeneration step.
|
|
35
|
-
|
|
36
|
-
**Constraints:**
|
|
37
|
-
|
|
38
|
-
- Output must satisfy **WCAG 2.2 AAA contrast** (≥ 7:1 for normal text,
|
|
39
|
-
≥ 4.5:1 for large text) — non-negotiable, the dotfiles ship as
|
|
40
|
-
workstation infrastructure.
|
|
41
|
-
- Palette extraction must work offline on both macOS (HEIC, dynamic
|
|
42
|
-
wallpapers with embedded dark/light variants) and Linux (PNG/JPEG via
|
|
43
|
-
`swww`, `hyprpaper`, `feh`, GNOME).
|
|
44
|
-
- Total time from "user changes wallpaper" → "all terminals retinted"
|
|
45
|
-
must be ≤ 3 seconds (rebuild trigger + write of templated configs).
|
|
46
|
-
- Targets include Warp, iTerm2, Alacritty, Ghostty, Kitty, Wezterm,
|
|
47
|
-
Tmux, Neovim (multiple themes), VS Code, Firefox theme JSON, Niri
|
|
48
|
-
borders, Waybar, GTK/Qt (matugen pipeline).
|
|
49
|
-
|
|
50
|
-
## Decision
|
|
51
|
-
|
|
52
|
-
Build a self-contained theming engine — `dot theme rebuild` —
|
|
53
|
-
implemented in `scripts/theme/` with the following pipeline:
|
|
54
|
-
|
|
55
|
-
1. **Source detection** — locate the active wallpaper across macOS
|
|
56
|
-
(`defaults read … wallpaper`), GNOME/dconf, KDE, Niri, swww,
|
|
57
|
-
hyprpaper. HEIC dynamic wallpapers decompose into dark and light
|
|
58
|
-
variants; both feed the engine.
|
|
59
|
-
|
|
60
|
-
2. **Color extraction** — **K-Means clustering in CIELAB** (not RGB).
|
|
61
|
-
CIELAB is perceptually uniform, so distances correlate with the way
|
|
62
|
-
humans see color similarity. 8-cluster K-Means yields a 16-color
|
|
63
|
-
ANSI palette (8 normal + 8 bright) plus 4 accent slots.
|
|
64
|
-
|
|
65
|
-
3. **Contrast enforcement** — compute WCAG 2.2 contrast against the
|
|
66
|
-
chosen background; nudge each foreground hue along the lightness
|
|
67
|
-
axis until the ratio passes AAA. The nudge stays within the cluster
|
|
68
|
-
to preserve aesthetic intent. If AAA cannot be reached, fall back to
|
|
69
|
-
AA with a logged warning (never silently regress).
|
|
70
|
-
|
|
71
|
-
4. **Format generation** — emit one canonical TOML palette to
|
|
72
|
-
`.chezmoidata/themes.toml`, then run `chezmoi apply` so every
|
|
73
|
-
theme-aware template (terminals, editors, status bars, browsers)
|
|
74
|
-
regenerates from a single declarative source.
|
|
75
|
-
|
|
76
|
-
5. **Companion pipelines** — `dot-theme-sync` feeds the same accent
|
|
77
|
-
colors to **matugen** for Material You-style GTK/Qt theming on
|
|
78
|
-
Linux, keeping desktop chrome in lockstep with the terminal.
|
|
79
|
-
|
|
80
|
-
The whole flow is idempotent (`chezmoi apply` is no-op if nothing
|
|
81
|
-
changed), repeatable, and tested under `tests/unit/theme/`.
|
|
82
|
-
|
|
83
|
-
## Consequences
|
|
84
|
-
|
|
85
|
-
### Positive
|
|
86
|
-
|
|
87
|
-
- Single source of truth: change the wallpaper, every tool retints in
|
|
88
|
-
one keystroke.
|
|
89
|
-
- Accessibility is structural, not opt-in — every shipped palette
|
|
90
|
-
passes WCAG AAA before it touches a config file.
|
|
91
|
-
- No competing "premium" dotfiles distribution (mathiasbynens, holman,
|
|
92
|
-
paulirish, omakub) ships anything similar. The engine is a defining
|
|
93
|
-
differentiator and surfaced in the README hero.
|
|
94
|
-
- Reuses chezmoi's templating — no new templating layer to maintain.
|
|
95
|
-
|
|
96
|
-
### Negative
|
|
97
|
-
|
|
98
|
-
- K-Means on a 4K wallpaper takes ~500–800 ms; cached after first run,
|
|
99
|
-
but the cold path is non-trivial.
|
|
100
|
-
- HEIC handling on Linux requires `libheif` (extra dep on Debian/Ubuntu
|
|
101
|
-
before 24.04).
|
|
102
|
-
- Contrast enforcement can produce slightly different palettes from the
|
|
103
|
-
same wallpaper across major OS versions when system color profiles
|
|
104
|
-
differ (mitigated by snapshot tests).
|
|
105
|
-
|
|
106
|
-
### Risks
|
|
107
|
-
|
|
108
|
-
- Wallpapers with extreme dynamic range (pure-white backgrounds, deep
|
|
109
|
-
monochrome) may fail to produce an aesthetically pleasing 16-color
|
|
110
|
-
palette even when WCAG AAA is satisfied. Mitigation: maintainer
|
|
111
|
-
curation of a fallback theme set in `.chezmoidata/themes.toml`.
|
|
112
|
-
- Future Wayland compositors may not expose a stable wallpaper-detection
|
|
113
|
-
API. The engine isolates source detection in a single module so the
|
|
114
|
-
blast radius of compositor churn is one file.
|
|
115
|
-
|
|
116
|
-
## Alternatives Considered
|
|
117
|
-
|
|
118
|
-
| Alternative | Why rejected |
|
|
119
|
-
|---|---|
|
|
120
|
-
| pywal/wal | RGB K-Means, no WCAG enforcement, limited target list. |
|
|
121
|
-
| matugen alone | Excellent for GTK/Qt; not terminal-aware. We use it *in addition*, not instead. |
|
|
122
|
-
| Static curated themes (Tokyo Night et al.) | Loses the "wallpaper coherence" property that motivates the whole project. |
|
|
123
|
-
| Hand-roll per-terminal scripts | Doesn't compose with chezmoi; loses the single-source-of-truth invariant. |
|
|
124
|
-
|
|
125
|
-
## References
|
|
126
|
-
|
|
127
|
-
- WCAG 2.2 contrast: <https://www.w3.org/TR/WCAG22/#contrast-minimum>
|
|
128
|
-
- CIELAB color space: <https://en.wikipedia.org/wiki/CIELAB_color_space>
|
|
129
|
-
- `scripts/theme/` — engine source
|
|
130
|
-
- `.chezmoidata/themes.toml` — output palette schema
|
|
131
|
-
- Issue #873 — captures this ADR alongside `llms.txt`
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# ADR-010: Enable Starship Transient Prompt in Zsh and Fish
|
|
6
|
-
|
|
7
|
-
## Status
|
|
8
|
-
|
|
9
|
-
Accepted
|
|
10
|
-
|
|
11
|
-
## Date
|
|
12
|
-
|
|
13
|
-
2026-05-12
|
|
14
|
-
|
|
15
|
-
## Context
|
|
16
|
-
|
|
17
|
-
Starship is the prompt renderer for both zsh and fish in this
|
|
18
|
-
distribution (pinned via `mise.toml`: `starship = "1.24.2"`).
|
|
19
|
-
A typical Starship prompt for this project renders 4–6 lines including
|
|
20
|
-
the directory, git branch + dirty markers, language toolchain version,
|
|
21
|
-
duration of the previous command, and a final `❯` line.
|
|
22
|
-
|
|
23
|
-
By default Starship emits this multi-line prompt on **every** previous
|
|
24
|
-
command as well as the current one. After 50 commands in a session, the
|
|
25
|
-
terminal scrollback contains 200–300 lines of historical prompts — most
|
|
26
|
-
of which only convey context that was relevant at the time the command
|
|
27
|
-
ran. Search through scrollback (Ctrl-r history, copy-paste, screenshots,
|
|
28
|
-
asciinema replay) is noisy.
|
|
29
|
-
|
|
30
|
-
Starship 1.24+ supports a **transient prompt** feature: when a command
|
|
31
|
-
finishes, the prompt that produced it is rewritten to a compact form
|
|
32
|
-
(e.g., `❯`) and the full prompt is re-emitted only at the live editing
|
|
33
|
-
line. The current command always shows the full prompt; history shows
|
|
34
|
-
only the compact form.
|
|
35
|
-
|
|
36
|
-
**Problem:** Reduce scrollback noise without sacrificing the live prompt's
|
|
37
|
-
rich context, and apply it consistently across the two interactive
|
|
38
|
-
shells we support as first-class.
|
|
39
|
-
|
|
40
|
-
**Constraints:**
|
|
41
|
-
|
|
42
|
-
- Must work in zsh and fish (the two Tier-1 shells per ADR-007).
|
|
43
|
-
- Must not interfere with `_cached_eval`'s startup-cost optimization
|
|
44
|
-
(the transient hook fires per-prompt, not per-shell-start).
|
|
45
|
-
- Must not break copy-paste of previous commands: the compact line
|
|
46
|
-
must still be `❯` (or similar) so `<Ctrl-shift-c>` over scrollback
|
|
47
|
-
yields runnable shell content if the user includes the prompt.
|
|
48
|
-
|
|
49
|
-
## Decision
|
|
50
|
-
|
|
51
|
-
Call Starship's `enable_transience` shell function after the cached
|
|
52
|
-
`starship init` runs in each shell. We share one `starship.toml.tmpl`
|
|
53
|
-
across both shells; the transient prompt content is the existing
|
|
54
|
-
`[character]` block (no separate `[transient_*]` section needed).
|
|
55
|
-
|
|
56
|
-
- **Fish**: `dot_config/fish/conf.d/init.fish.tmpl` calls
|
|
57
|
-
`enable_transience` once the function is defined. `starship init
|
|
58
|
-
fish` defines it via `--print-full-init`. Result: `$fish_transient_prompt`
|
|
59
|
-
flips to `1` and the Enter handler is bound to
|
|
60
|
-
`__starship_transient_execute`. The compact prompt collapses past
|
|
61
|
-
scrollback as soon as the next command runs.
|
|
62
|
-
|
|
63
|
-
- **Zsh**: `dot_config/zsh/dot_zshrc.tmpl` carries the same
|
|
64
|
-
`enable_transience` call, guarded by
|
|
65
|
-
`(( ${+functions[enable_transience]} ))`. **Upstream Starship does
|
|
66
|
-
not ship a zsh-side `enable_transience` function yet** (tracked by
|
|
67
|
-
[starship/starship#3522](https://github.com/starship/starship/issues/3522)).
|
|
68
|
-
The guard returns 0, the block no-ops, and zsh keeps its full multi-
|
|
69
|
-
line prompt in scrollback for now. The code is a forward-compatibility
|
|
70
|
-
hook: when upstream ships the zsh function, the feature activates
|
|
71
|
-
automatically on the next `mise upgrade starship` with no zshrc edit.
|
|
72
|
-
|
|
73
|
-
Alternatives we rejected for zsh:
|
|
74
|
-
|
|
75
|
-
- **Roll our own `zle` widget that rewrites `$PROMPT` on Enter.**
|
|
76
|
-
Possible (the standard recipe overrides `accept-line` with a
|
|
77
|
-
transient widget). Rejected because:
|
|
78
|
-
(a) any hand-rolled implementation will conflict with upstream
|
|
79
|
-
once they ship the official function, forcing a removal,
|
|
80
|
-
(b) Starship's prompt is multi-line and ANSI-coloured; correctly
|
|
81
|
-
rewriting it from a custom widget requires duplicating
|
|
82
|
-
Starship's escape-code generation, which drifts with every
|
|
83
|
-
Starship release,
|
|
84
|
-
(c) it'd run inside `_cached_eval`'s eager-init path, complicating
|
|
85
|
-
the cache-invalidation semantics we documented in ADR-002.
|
|
86
|
-
- **Third-party zsh plugin (e.g. zsh-autocomplete's transient mode).**
|
|
87
|
-
Rejected because the upstream Starship fix is in active discussion
|
|
88
|
-
and a plugin adds a permanent dependency we'd then have to remove.
|
|
89
|
-
- **Disable zsh transient until upstream lands.** The current state.
|
|
90
|
-
Zsh users see the same scrollback density they had before this PR;
|
|
91
|
-
the visible improvement is fish-only. Honest trade-off.
|
|
92
|
-
|
|
93
|
-
- **Transient prompt content**: `❯` plus optional exit-code dot
|
|
94
|
-
(red dot if `$status != 0`). Keep it 1–3 characters so scrollback
|
|
95
|
-
density actually improves.
|
|
96
|
-
|
|
97
|
-
The toggle is exposed in `.chezmoidata.toml` as
|
|
98
|
-
`features.starship_transient = true`. Users on bandwidth-constrained
|
|
99
|
-
terminals (slow SSH, serial console) can flip it off without editing
|
|
100
|
-
the canonical config.
|
|
101
|
-
|
|
102
|
-
## Consequences
|
|
103
|
-
|
|
104
|
-
### Positive (fish only, until upstream lands zsh support)
|
|
105
|
-
|
|
106
|
-
- Scrollback is 4–5× denser **in fish**. A 100-command session that previously
|
|
107
|
-
filled the screen 20× over now fills it ~4×.
|
|
108
|
-
- Asciinema recordings (relevant for the showcase commits in #874)
|
|
109
|
-
read much more naturally — fewer screens of historical prompts
|
|
110
|
-
between actions.
|
|
111
|
-
- The live prompt still surfaces all the rich context Starship was
|
|
112
|
-
configured for; only history is compacted.
|
|
113
|
-
|
|
114
|
-
### Negative
|
|
115
|
-
|
|
116
|
-
- Slightly more complex Starship config; the maintainer must remember
|
|
117
|
-
that `[character]` and `[transient_*]` are distinct modules.
|
|
118
|
-
- Users who rely on visual scanning of historical prompts (e.g., "what
|
|
119
|
-
branch was I on when I ran that?") lose that signal. Mitigation: the
|
|
120
|
-
feature flag.
|
|
121
|
-
|
|
122
|
-
### Risks
|
|
123
|
-
|
|
124
|
-
- Starship's transient API is stable since 1.16 (2023) but the exact
|
|
125
|
-
config surface evolves. If Starship breaks the schema in a future
|
|
126
|
-
major, the pinned version in `mise.toml` insulates us; we vet new
|
|
127
|
-
releases through `dot upgrade --dry-run` before bumping.
|
|
128
|
-
|
|
129
|
-
## Alternatives Considered
|
|
130
|
-
|
|
131
|
-
| Alternative | Why rejected |
|
|
132
|
-
|---|---|
|
|
133
|
-
| Single-line Starship prompt | Sacrifices live-prompt richness for the same scrollback-density goal. The transient feature gives both. |
|
|
134
|
-
| Custom zsh `precmd` rewriter | Would have to be reimplemented in fish. Starship already solved it. |
|
|
135
|
-
| Disable Starship entirely on history | Loses the whole reason we use Starship. |
|
|
136
|
-
|
|
137
|
-
## References
|
|
138
|
-
|
|
139
|
-
- Starship transient prompt docs:
|
|
140
|
-
<https://starship.rs/advanced-config/#transientprompt-and-transientrightprompt-in-zsh>
|
|
141
|
-
- ADR-002 (Shell Performance Optimization) — establishes the
|
|
142
|
-
`_cached_eval` constraint this ADR respects.
|
|
143
|
-
- ADR-007 (Multi-Shell Parity) — establishes zsh + fish as Tier-1.
|
|
144
|
-
- Issue #873 — captures this ADR alongside `llms.txt`.
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# ADR-011: Keep Nushell as Tier-3 Reference with Minimum-Viable Caching
|
|
6
|
-
|
|
7
|
-
## Status
|
|
8
|
-
|
|
9
|
-
Accepted
|
|
10
|
-
|
|
11
|
-
## Date
|
|
12
|
-
|
|
13
|
-
2026-05-13
|
|
14
|
-
|
|
15
|
-
## Context
|
|
16
|
-
|
|
17
|
-
ADR-007 (Multi-Shell Parity Strategy) classified the three supported
|
|
18
|
-
shells:
|
|
19
|
-
|
|
20
|
-
| Tier | Shells | Definition |
|
|
21
|
-
|---|---|---|
|
|
22
|
-
| Tier 1 (Full) | zsh, bash | Native aliases, functions, lazy loading, `_cached_eval` |
|
|
23
|
-
| Tier 2 (Bridged) | fish | Aliases + functions via bridge, `_cached_eval` |
|
|
24
|
-
| Tier 3 (Compatible) | nushell | Simple aliases only, functions via bash delegation |
|
|
25
|
-
|
|
26
|
-
The 2026 audit (slice 3 of #880's deep-dive) flagged Nushell as a
|
|
27
|
-
maintenance candidate:
|
|
28
|
-
|
|
29
|
-
- < 5% feature parity with zsh.
|
|
30
|
-
- No async / deferred-load support.
|
|
31
|
-
- No equivalent of `_cached_eval` — meaning every Nushell start spawns
|
|
32
|
-
`starship init nu`, `mise activate nu`, `zoxide init nushell`,
|
|
33
|
-
`atuin init nu` as fresh subprocesses, costing 100–200 ms aggregated.
|
|
34
|
-
- 5 config files (`config.nu.tmpl`, `env.nu.tmpl`, `aliases.nu`,
|
|
35
|
-
`completions.nu.tmpl`, `functions.nu.tmpl`) totalling ~270 lines —
|
|
36
|
-
enough to be meaningful, not enough to be self-sustaining.
|
|
37
|
-
|
|
38
|
-
Three paths were proposed:
|
|
39
|
-
|
|
40
|
-
1. **Keep as-is** — accept the gap, defer maintenance.
|
|
41
|
-
2. **Reduce to a stub** — leave the config but stop investing.
|
|
42
|
-
3. **Remove entirely** — delete all references.
|
|
43
|
-
|
|
44
|
-
## Decision
|
|
45
|
-
|
|
46
|
-
**Keep Nushell as Tier-3 with explicit limitations + a minimum-viable
|
|
47
|
-
`_cached_eval` equivalent.**
|
|
48
|
-
|
|
49
|
-
Specifically:
|
|
50
|
-
|
|
51
|
-
- Ship `dot_config/nushell/cached_eval.nu` — a Nushell module that
|
|
52
|
-
ports the binary-mtime-based init caching pattern from zsh/fish.
|
|
53
|
-
It handles the four tools that matter most for shell start:
|
|
54
|
-
starship, mise, zoxide, atuin. See the Nushell-specific tradeoffs
|
|
55
|
-
in the "Consequences" section below.
|
|
56
|
-
- Wire `env.nu.tmpl` to use the new module so subsequent shells skip
|
|
57
|
-
the subprocess spawns when binaries haven't moved.
|
|
58
|
-
- Continue maintaining the existing `aliases.nu` (hand-curated simple
|
|
59
|
-
aliases — `l`, `ll`, `la`, etc.) but accept that the bash-bridge
|
|
60
|
-
approach for full alias parity isn't worth the complexity.
|
|
61
|
-
- Update `README.md`'s shell list to call Nushell out as "best-effort
|
|
62
|
-
/ Tier-3" so users have correct expectations.
|
|
63
|
-
- Reject the "remove entirely" option for now (see Rationale below).
|
|
64
|
-
|
|
65
|
-
## Rationale
|
|
66
|
-
|
|
67
|
-
**Why not remove**: Nushell is shipped with the canonical `mise`
|
|
68
|
-
toolchain in this repo (it's installable via `mise install nushell`)
|
|
69
|
-
and is gaining adoption in the Rust + data-engineering communities
|
|
70
|
-
that overlap with this distribution's audience. Removing it would
|
|
71
|
-
break promises to a small-but-vocal segment of users. The maintenance
|
|
72
|
-
cost of the current 270-line surface is low.
|
|
73
|
-
|
|
74
|
-
**Why not reduce to a stub**: A stub config is worse than the current
|
|
75
|
-
moderate config — users who type `nu` and get a featureless shell
|
|
76
|
-
without any of the integrations the README promised would feel
|
|
77
|
-
betrayed. Either we keep the shell working well enough to use, or we
|
|
78
|
-
delete it.
|
|
79
|
-
|
|
80
|
-
**Why the minimum-viable cache layer**: The biggest waste on every
|
|
81
|
-
Nushell start was the four uncached subprocess spawns
|
|
82
|
-
(`starship init nu` etc.). Adding mtime-based caching for those costs
|
|
83
|
-
~50 lines of Nushell code and saves 100–200 ms per shell. That's the
|
|
84
|
-
cheapest meaningful improvement; deeper investments (async hydration,
|
|
85
|
-
plugin system, bash bridge for aliases) await an actual user request.
|
|
86
|
-
|
|
87
|
-
## Consequences
|
|
88
|
-
|
|
89
|
-
### Positive
|
|
90
|
-
|
|
91
|
-
- Nushell starts substantially faster than before (TBD — needs
|
|
92
|
-
measurement on a host with all four tools installed). The
|
|
93
|
-
subprocess elimination saves ~50–80 ms per cached tool, per cold
|
|
94
|
-
shell after the cache is populated.
|
|
95
|
-
- The mtime-invalidation pattern matches what zsh / fish do, so a
|
|
96
|
-
contributor familiar with one of the other shells can read the
|
|
97
|
-
Nushell code without learning a new mental model.
|
|
98
|
-
- Explicit Tier-3 documentation avoids the "wait, this is supposed to
|
|
99
|
-
be at parity" surprise.
|
|
100
|
-
|
|
101
|
-
### Negative
|
|
102
|
-
|
|
103
|
-
- Nushell's parse-time evaluator means we can't wrap source calls in
|
|
104
|
-
the cache function — the caller has to `source <path>` directly.
|
|
105
|
-
Slightly more boilerplate than the zsh/fish APIs.
|
|
106
|
-
- No malware-pattern screening in the cached output. The zsh / fish
|
|
107
|
-
implementations grep for `curl ... | sh`, `nc -e`, etc. before
|
|
108
|
-
sourcing; the Nushell version trusts its inputs. For the four tools
|
|
109
|
-
we ship (`starship`, `mise`, `zoxide`, `atuin`) this is acceptable
|
|
110
|
-
— they're official binaries pinned via `mise.toml`. Future tools
|
|
111
|
-
added to the cache must be similarly trusted.
|
|
112
|
-
- No per-tool timing telemetry. The `EVALCACHE_TIMING` infrastructure
|
|
113
|
-
zsh has (#863) isn't ported. If Nushell perf becomes a sustained
|
|
114
|
-
user concern, this is the next layer to add.
|
|
115
|
-
|
|
116
|
-
### Risks
|
|
117
|
-
|
|
118
|
-
- Nushell's syntax evolves quickly between 0.x releases. The
|
|
119
|
-
`cached_eval.nu` module uses `path exists`, `ls | get -i modified`,
|
|
120
|
-
and `run-external` which have been stable since 0.86 (Q3 2024).
|
|
121
|
-
If a future Nushell release breaks the API, the module fails fast
|
|
122
|
-
(saving an empty cache file) rather than corrupting state.
|
|
123
|
-
- Cache invalidation by mtime is fragile when the user installs a
|
|
124
|
-
tool via a non-mtime-respecting method (e.g. unpacking a tarball
|
|
125
|
-
with `--no-touch-mtimes`). The fallback is the user running
|
|
126
|
-
`dot prewarm` or deleting `~/.cache/nushell/*.nu`. Documented in
|
|
127
|
-
`docs/operations/PERFORMANCE.md`.
|
|
128
|
-
|
|
129
|
-
## Alternatives Considered
|
|
130
|
-
|
|
131
|
-
| Alternative | Why rejected |
|
|
132
|
-
|---|---|
|
|
133
|
-
| **Bash bridge for full alias parity** | Adds a `bash --norc --noprofile -c '...'` subprocess on every Nushell start (~30 ms). Defeats the perf gain from the cache layer. |
|
|
134
|
-
| **Port `_cached_eval` 1:1 (malware screen + JSONL telemetry)** | The full zsh implementation is 100+ lines. The Nushell version covers the 80% case at 50 lines; the remaining 20% (advanced features) aren't load-bearing for Tier-3 status. |
|
|
135
|
-
| **Delete Nushell entirely** | See "Why not remove" above. |
|
|
136
|
-
| **Reduce to a stub** | See "Why not reduce to a stub" above. |
|
|
137
|
-
|
|
138
|
-
## References
|
|
139
|
-
|
|
140
|
-
- [`dot_config/nushell/cached_eval.nu`](https://github.com/sebastienrousseau/dotfiles/blob/main/defaults/dot_config/nushell/cached_eval.nu) — the new module.
|
|
141
|
-
- [`dot_config/nushell/env.nu.tmpl`](https://github.com/sebastienrousseau/dotfiles/blob/main/defaults/dot_config/nushell/env.nu.tmpl) — adopter.
|
|
142
|
-
- ADR-007 (Multi-Shell Parity Strategy) — establishes the tier definitions.
|
|
143
|
-
- ADR-002 (Shell Performance Optimization Strategy) — establishes `_cached_eval` semantics this module ports.
|
|
144
|
-
- Issue [#880](https://github.com/sebastienrousseau/dotfiles/issues/880).
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
render_with_liquid: false
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# ADR-012: AI Fleet — Native Local Claude Proxy and Cockpit
|
|
6
|
-
|
|
7
|
-
## Status
|
|
8
|
-
|
|
9
|
-
Accepted
|
|
10
|
-
|
|
11
|
-
## Date
|
|
12
|
-
|
|
13
|
-
2026-06-27
|
|
14
|
-
|
|
15
|
-
## Context
|
|
16
|
-
|
|
17
|
-
The dotfiles manage a fleet of ~18 AI CLIs (claude, codex, copilot, goose,
|
|
18
|
-
crush, amp, cursor-agent, grok, aider, opencode, agy, sgpt, ollama, autohand, vibe,
|
|
19
|
-
qwen, zai, kiro-cli). Three problems had accumulated:
|
|
20
|
-
|
|
21
|
-
1. **Incoherent command surface.** The fleet was driven by three incompatible
|
|
22
|
-
shapes — `dot ai <thing>`, `dot <tool>`, and `dot ai-<thing>` — with opaque
|
|
23
|
-
names (`cl`, `agy`, `dash`) and no stated reason to prefer `dot ai` over
|
|
24
|
-
running a tool directly.
|
|
25
|
-
2. **No way to share one subscription.** Each tool needed its own provider/key.
|
|
26
|
-
Running the whole fleet on a single Claude subscription required a gateway,
|
|
27
|
-
but adding a third-party proxy (e.g. Meridian) meant a new runtime dependency
|
|
28
|
-
and 7k+ lines of engine to track.
|
|
29
|
-
3. **No unified cockpit.** Status, cost, and launching were scattered.
|
|
30
|
-
|
|
31
|
-
## Decision
|
|
32
|
-
|
|
33
|
-
Build the capability **in-tree**, with no third-party runtime dependency, and
|
|
34
|
-
present it behind a flat, verb-first surface modelled on the Claude CLI.
|
|
35
|
-
|
|
36
|
-
- **Command surface.** A single `dot ai` namespace: bare opens a cockpit; a
|
|
37
|
-
bare prompt runs a one-shot on Claude; `<tool> "<prompt>"` targets a tool;
|
|
38
|
-
plus `chat`, `tools`, `install`, `serve`, `cost`, `login`, `doctor`, and a
|
|
39
|
-
`--style` steering flag. Old forms remain as deprecated aliases that print a
|
|
40
|
-
one-line hint. (`scripts/dot/commands/ai.sh`, `lib/dot/ai-commands.sh`.)
|
|
41
|
-
- **Local gateway (`dot ai serve`).** `dot-ai-serve` is a stdlib-only Python
|
|
42
|
-
server that wraps the already-installed `claude` CLI in headless
|
|
43
|
-
`stream-json` mode and exposes the Anthropic (`/v1/messages`) and OpenAI
|
|
44
|
-
(`/v1/chat/completions`) protocols. The `claude` CLI owns auth, caching, and
|
|
45
|
-
rate limits — the server only translates wire formats. There is **no API key
|
|
46
|
-
anywhere**; the native Claude session is the credential.
|
|
47
|
-
- **Routing safety.** The primary `claude` is **never** routed through the
|
|
48
|
-
gateway (it keeps its native session and claude.ai connectors). Routing is
|
|
49
|
-
applied per-invocation to non-Claude tools only and is never written into the
|
|
50
|
-
interactive shell environment.
|
|
51
|
-
- **Cockpit (`dot-ai-tui`).** A Bubble Tea (Go) TUI built on `chezmoi apply`
|
|
52
|
-
via the mise-managed Go toolchain. It shells out to the `dot ai` verbs so
|
|
53
|
-
behaviour has one source of truth.
|
|
54
|
-
|
|
55
|
-
## Consequences
|
|
56
|
-
|
|
57
|
-
- **No new dependency for the headline feature.** The gateway leans on the
|
|
58
|
-
`claude` CLI the user already has; the cockpit is the only Go artefact and is
|
|
59
|
-
opt-in (built when `DOTFILES_AI` is set or already installed).
|
|
60
|
-
- **Single source of truth.** The cockpit and completions both derive from the
|
|
61
|
-
`ai.sh` verb dispatch; a completion-parity test and the docs-coverage contract
|
|
62
|
-
keep them from drifting.
|
|
63
|
-
- **Scope (v2).** The gateway does chat/completions for both protocols with
|
|
64
|
-
real token-by-token streaming, model routing/aliases, cost metering
|
|
65
|
-
(`/metrics`, `/v1/usage`), an optional daily budget cap, `/v1/models`, and
|
|
66
|
-
`/health`. Because it wraps the `claude` CLI (an agent, not the raw API),
|
|
67
|
-
tool-call passthrough and multimodal image input are handled gracefully but
|
|
68
|
-
not forwarded, and session resumption stays out of scope — documented in
|
|
69
|
-
[`docs/AI.md`](../AI.md).
|
|
70
|
-
- **Naming churn.** Existing muscle memory (`dot cl`, `dot ai dashboard`,
|
|
71
|
-
`dot ai proxy`) is preserved via deprecated aliases, so nothing breaks while
|
|
72
|
-
users migrate.
|
|
73
|
-
|
|
74
|
-
## References
|
|
75
|
-
|
|
76
|
-
- [`docs/AI.md`](../AI.md) — user guide for the full surface
|
|
77
|
-
- [ADR-004](ADR-004-cli-architecture.md) — the `dot` CLI wrapper this extends
|
|
78
|
-
- [ADR-008](ADR-008-alias-system-architecture.md) — the alias system the
|
|
79
|
-
deprecated bridges live in
|