@sebastienrousseau/dotfiles 0.2.505 → 0.2.507

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/README.md CHANGED
@@ -9,13 +9,13 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <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=github" alt="Build" /></a>
13
- <a href="https://github.com/sebastienrousseau/dotfiles/releases/latest"><img src="https://img.shields.io/badge/Version-v0.2.505-blue?style=for-the-badge" alt="Version" /></a>
14
- <a href="https://github.com/sebastienrousseau/dotfiles/releases"><img src="https://img.shields.io/github/downloads/sebastienrousseau/dotfiles/total?style=for-the-badge" alt="Downloads" /></a>
15
- <a href="https://codespaces.new/sebastienrousseau/dotfiles"><img src="https://img.shields.io/badge/Open%20in-Codespaces-blue?style=for-the-badge&logo=github" alt="Open in GitHub Codespaces" /></a>
16
- <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&label=OpenSSF%20Scorecard" alt="OpenSSF Scorecard" /></a>
17
- <a href="https://www.bestpractices.dev/projects/12840"><img src="https://img.shields.io/cii/percentage/12840?style=for-the-badge&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" alt="License: MIT" /></a>
12
+ <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.507-blue?style=for-the-badge&logo=semanticrelease&logoColor=white" alt="Version" /></a>
14
+ <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
+ <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
+ <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
+ <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>
19
19
  </p>
20
20
 
21
21
  ---
@@ -52,7 +52,7 @@
52
52
 
53
53
  ```bash
54
54
  curl -fsSL -o /tmp/dotfiles-install.sh \
55
- https://raw.githubusercontent.com/sebastienrousseau/dotfiles/v0.2.505/install.sh
55
+ https://raw.githubusercontent.com/sebastienrousseau/dotfiles/v0.2.507/install.sh
56
56
  echo "d5a04c5e2813a93a63c8ecce9655cf3d107f6068862c6eba84a92cf22f801c7e /tmp/dotfiles-install.sh" \
57
57
  | shasum -a 256 -c
58
58
  bash /tmp/dotfiles-install.sh
@@ -110,7 +110,7 @@ Most dotfiles repos are personal collections. This one ships as workstation infr
110
110
  | **Fleet management** | Multi-node drift dashboard, per-host profiles. | `dot fleet` |
111
111
  | **Self-healing** | Auto-repair tools, chezmoi drift, broken symlinks, missing files. | `dot heal`, `dot chaos`, `dot rollback`, `dot bundle` |
112
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. 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` |
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
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
115
  | **Encrypted secrets** | Age and SOPS keep per-machine secrets out of plaintext history. | `dot secrets` |
116
116
  | **Portable runtimes** | Mise for managed toolchains. Nix Flakes for strict reproducibility. | `dot env`, `dot upgrade` |
@@ -212,7 +212,7 @@ A [Claude Code skill](defaults/dot_claude/skills/dotfiles-bootstrap/SKILL.md) is
212
212
 
213
213
  | | |
214
214
  |:---|:---|
215
- | `dot ai` | Show installed AI tools |
215
+ | `dot ai` | AI fleet cockpit run, chat, install, serve a local Claude gateway, cost |
216
216
  | `dot mcp` | Inspect MCP policy and registry |
217
217
  | `dot mode` | Show or set the agent profile (ask / plan / apply / audit) |
218
218
  | `dot agent` | Agent metadata, logs, checkpoints, conformance |
@@ -300,7 +300,7 @@ See the [Migration Guide](docs/operations/MIGRATION.md) for version upgrades.
300
300
  - **Pattern library** (`dot patterns`) — architect, hardener, and refactor patterns bundled in `dot_config/ai/patterns/`
301
301
  - **MCP policy enforcement** (`dot mcp`) — validate the Model Context Protocol registry against policy
302
302
  - **AI commit messages** (`dot commit`) — conventional commits generated from the staged diff
303
- - **AI tools** (`dot ai`) — Codex, GitHub Copilot, Gemini CLI, and friends managed via Mise; Claude Code via Anthropic's native installer
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
304
  - **Attestation logs** — every agent session is logged with a policy hash and an outcome
305
305
 
306
306
  </details>
package/docs/AI.md CHANGED
@@ -6,92 +6,161 @@ render_with_liquid: false
6
6
 
7
7
  AI helpers are **off by default**. You choose if and when to turn them on.
8
8
 
9
- ## Enable AI helpers
10
-
11
9
  ```bash
12
10
  export DOTFILES_AI=1
13
11
  exec zsh
14
12
  ```
15
13
 
16
- This turns on the local helper scripts for context suggestions and error analysis. It does not install any AI tools.
14
+ This enables the local helper scripts and the `dot ai` command surface. It does **not** install any AI tools or run any background service.
15
+
16
+ ## Why `dot ai`?
17
+
18
+ `claude` is one tool. **`dot ai` is the cockpit for your whole AI-CLI fleet.** Use it to install the tools, launch any of them with one keystroke, meter their cost in one place, and — the headline — run every one of them on your single Claude subscription through a built-in local gateway.
19
+
20
+ You use `claude` to talk to Claude. You use `dot ai` to run *everything else* on Claude and keep one cockpit over all of it.
21
+
22
+ ## Quick start
23
+
24
+ ```bash
25
+ dot ai install all # install the fleet (only what's missing)
26
+ dot ai # open the cockpit (TUI)
27
+ dot ai "fix the auth bug" # one-shot on Claude — just like `claude "…"`
28
+ dot ai serve # serve your Claude subscription locally to the fleet
29
+ ```
30
+
31
+ ## Command surface
32
+
33
+ The interface is flat and verb-first, modelled on the Claude CLI: bare opens an interactive view, a prompt runs it, and old commands keep working as deprecated aliases.
34
+
35
+ | Command | What it does |
36
+ |---------|--------------|
37
+ | `dot ai` | Open the **cockpit** — a Bubble Tea TUI for the fleet, gateway, and cost |
38
+ | `dot ai "<prompt>"` | One-shot prompt on Claude |
39
+ | `dot ai <tool> "<prompt>"` | One-shot prompt on a named tool (e.g. `dot ai codex "add tests"`) |
40
+ | `dot ai chat [tool]` | Open an interactive session (picker if no tool) |
41
+ | `dot ai tools` | Install / manage the fleet |
42
+ | `dot ai install [all\|<tool>]` | Install all missing tools, or one |
43
+ | `dot ai serve [stop\|status]` | Start the local Claude gateway **and** route the fleet through it |
44
+ | `dot ai cost` | Spend report across providers |
45
+ | `dot ai login [tool]` | Authenticate a tool |
46
+ | `dot ai doctor` | Health-check the fleet and the gateway |
47
+ | `--style <name>` | Steer any prompt with a pattern (see [Steering styles](#steering-styles)) |
48
+
49
+ ## The cockpit (`dot ai`)
50
+
51
+ Running `dot ai` on a terminal opens a glamorous, chat-centric TUI (built with [Bubble Tea](https://github.com/charmbracelet/bubbletea), Charm/Crush-style):
52
+
53
+ - **Header** — the `◆ dot ai` wordmark plus gateway status (`● :3456` / `○ off`) and today's cost as colour chips.
54
+ - **Left** — the fleet grouped by role, with `●`/`○` install markers and a `▌` selection accent.
55
+ - **Right** — a **chat panel**: pick a tool, type a prompt in the input box, press `Enter`, and the response streams back in the transcript — all without leaving the TUI.
56
+
57
+ ```text
58
+ Tab focus ↑↓ move ⏎ send s serve i install c refresh q quit
59
+ ```
60
+
61
+ Two modes per tool: **Enter on the fleet** opens the tool's *full native session* (where its own `/exit`, `/model`, `/clear`, … work); **Tab / `/`** drops into the quick in-cockpit streaming chat. In the chat input, typing `/` opens a **tool-aware command palette** — the cockpit commands (`/help /clear /style /tool /serve /cost /exit`, which run in-chat) plus the selected provider's common REPL commands (`/compact /model /resume /agents` for claude; `/add /diff /commit` for aider; `/approvals /status` for codex; …), tagged `→ <tool> session`. Navigate with `↑↓`, `Tab` to complete, `Enter` to run. Prompts run through `dot ai <tool>`, so the cockpit and the command line behave identically.
62
+
63
+ The cockpit also offers a **model picker** (`/model <name>` or the `m` key cycles `default → opus → sonnet → haiku`; the active model shows in the header and is applied to the Claude engine via `ANTHROPIC_MODEL`), **session persistence** (each completed turn is saved to `$XDG_STATE_HOME/dot-ai-tui/session.json`; `/resume` restores your last conversation, `/save` snapshots the current one), and **desktop notifications** when a reply takes longer than ~8s (macOS `osascript` / Linux `notify-send`). In non-interactive contexts (CI, pipes) `dot ai` falls back to a plain text fleet listing. The cockpit binary (`dot-ai-tui`) is built on `chezmoi apply` via the mise-managed Go toolchain; `DOT_AI_SNAPSHOT=1 dot-ai-tui` prints a single frame for previews.
17
64
 
18
- ## Steering Patterns
65
+ ## Steering styles
19
66
 
20
- Patterns in `~/.dotfiles/dot_config/ai/patterns/` add focused context to AI requests.
67
+ Styles in `~/.dotfiles/dot_config/ai/patterns/` add focused context to any prompt with `--style <name>`:
21
68
 
22
- - **Architect** — shell setup and stack tuning
23
- - **Hardener** — security, encryption, and compliance
24
- - **Refactor** — POSIX compatibility, performance, and linting
69
+ - **architect** — shell setup and stack tuning
70
+ - **hardener** — security, encryption, and compliance
71
+ - **refactor** — POSIX compatibility, performance, and linting
72
+
73
+ ```bash
74
+ dot ai claude --style architect "optimize my zshrc"
75
+ dot ai agy --style hardener "audit my ssh config"
76
+ ```
25
77
 
26
- ### Contextual Bridge
78
+ The bridge also injects system details (OS, architecture, date) so the model has the context it needs. Quick aliases ship for the common combinations: `dcla` (Claude + architect), `dagyh` (Antigravity + hardener), `dkir` (Kiro + refactor).
27
79
 
28
- Use the `dot` CLI to run AI tools with added context:
80
+ ## Running tools
29
81
 
30
82
  ```bash
31
- # General usage
32
- dot cl|codex|copilot|gemini|goose|kiro|sgpt|ollama|opencode|aider|autohand|vibe|qwen|zai --pattern <name> "prompt"
83
+ dot ai "explain this stack trace" # one-shot on Claude
84
+ dot ai codex "add a test for parse()" # one-shot on a specific tool
85
+ dot ai chat # pick a tool and open its session
86
+ dot ai chat aider # open aider directly
87
+ ```
88
+
89
+ ## The local Claude gateway (`dot ai serve`)
33
90
 
34
- # Quick aliases
35
- dcla "Optimize my zshrc" # Claude + Architect
36
- dgmnh "Audit my ssh config" # Gemini + Hardener
37
- dkir "Refactor this script" # Kiro + Refactorer
91
+ Run one Claude subscription locally and point your whole fleet at it — with **no third-party dependency**. `dot-ai-serve` is a small, stdlib-only Python server (no pip packages) that wraps the `claude` CLI you already have and exposes the standard Anthropic (`/v1/messages`) **and** OpenAI (`/v1/chat/completions`) endpoints. Any tool that speaks either protocol — codex, aider, Open WebUI, an OpenAI SDK — connects to `http://127.0.0.1:3456` and gets Claude on your existing subscription.
92
+
93
+ ```bash
94
+ claude login # one-time: authenticate the engine
95
+ dot ai serve # start the gateway AND route the non-Claude fleet
96
+ dot ai serve status # process + /health + routing state
97
+ dot ai serve stop # stop the gateway and un-route
38
98
  ```
39
99
 
40
- The bridge adds system details (OS, architecture, date) to the prompt. This gives the AI the context it needs for accurate answers.
100
+ **Native session, never a key.** The gateway authenticates through your `claude` CLI's native session — there is no API key anywhere. Routing is applied **per-invocation** to non-Claude tools (`dot ai codex "…"`); it is **not** sourced into your interactive shell. The primary `claude` is never routed it always uses its own native session, so claude.ai connectors stay enabled. (Setting `ANTHROPIC_API_KEY` in your shell would disable those connectors, which is exactly why routing stays scoped to each tool's subprocess.)
101
+
102
+ **Streaming, routing & metering.** Replies stream **token-by-token** (real SSE for both protocols). Model **aliases/routing** map friendly names to a Claude tier — `cheap`/`fast` → haiku, `smart` → opus, and common OpenAI ids (`gpt-4` → sonnet, `gpt-3.5-turbo` → haiku); extend with `DOT_AI_MODEL_MAP`. Every request is **metered**: `GET /metrics` (Prometheus text) and `GET /v1/usage` (JSON) report requests, tokens, and estimated cost per model. An optional `DOT_AI_DAILY_BUDGET` (USD) caps daily spend — once reached, requests get `429`.
103
+
104
+ **Config:** `DOT_AI_HOST` (default `127.0.0.1`), `DOT_AI_PORT` (default `3456`), `DOT_AI_DEFAULT_MODEL` (default `sonnet`), `DOT_AI_API_KEY` (optional shared secret), `DOT_AI_DAILY_BUDGET` (USD, `0` = off), `DOT_AI_MODEL_MAP` / `DOT_AI_PRICING` (JSON overrides).
105
+
106
+ **Security:** the server binds to loopback by default. If you set `DOT_AI_HOST` to a LAN address, both the launcher *and* the server itself refuse to start unless `DOT_AI_API_KEY` is set — an unprotected network proxy leaks your subscription.
41
107
 
42
- Supported bridge commands:
108
+ **Engine limits.** The gateway wraps the `claude` CLI (an agent), not the raw API, so two things are handled gracefully rather than forwarded: **image** blocks are acknowledged inline but not sent (the engine is text-only), and **function/tool-calling** requests are answered in plain text (the CLI can't return caller-defined `tool_use` blocks). Session resumption is still out of scope.
43
109
 
44
- | Command | Provider |
45
- |---------|----------|
46
- | `dot cl` | Claude Code |
47
- | `dot codex` | OpenAI Codex CLI |
48
- | `dot copilot` | GitHub Copilot CLI |
49
- | `dot gemini` | Gemini CLI |
50
- | `dot goose` | Goose (Block) |
51
- | `dot kiro` | Kiro CLI |
52
- | `dot sgpt` | Shell-GPT |
53
- | `dot ollama` | Ollama |
54
- | `dot opencode` | OpenCode |
55
- | `dot aider` | Aider |
56
- | `dot autohand` | Autohand Code |
57
- | `dot vibe` | Mistral Vibe |
58
- | `dot qwen` | Qwen Code |
59
- | `dot zai` | ZAI (Zhipu AI) |
110
+ ## The fleet
60
111
 
61
- ### `dot ai` status and launcher
112
+ These tools are not installed for you. Install what you want with `dot ai install <tool>` (or `dot ai install all`):
62
113
 
63
- `dot ai` shows which AI CLIs are installed, grouped by category. If `gum` is available, it also opens a quick launcher.
114
+ - **Agents (autonomous)** full coding agents that plan and execute:
115
+ - `claude` — Anthropic's flagship agentic coder (Claude Code)
116
+ - `codex` — OpenAI's autonomous coding agent
117
+ - `copilot` — GitHub Copilot in the terminal
118
+ - `goose` — Block's open-source coding agent
119
+ - `crush` — Charm's glamorous TUI coding agent
120
+ - `amp` — Sourcegraph's agentic coder
121
+ - `cursor-agent` — Cursor's terminal agent
122
+ - `grok` — xAI's terminal coding agent (Grok Build; needs a SuperGrok / X Premium+ plan)
64
123
 
65
- Current categories:
124
+ - **Coding (interactive)** — focused pair-programming assistants:
125
+ - `aider` — Git-aware AI pair programmer
126
+ - `opencode` — open-source terminal coding agent
127
+ - `autohand` — autonomous multi-file coding agent
128
+ - `vibe` — Mistral's coding agent
129
+ - `qwen` — Alibaba Qwen coding assistant
130
+ - `zai` — Zhipu GLM coding agent
66
131
 
67
- - Agents (autonomous)
68
- - Coding (interactive)
69
- - General (prompt-based)
70
- - Runtime (local)
71
- - Cloud (platform)
132
+ - **General (prompt-based)** — quick prompt/shell helpers:
133
+ - `agy` — Google's Antigravity agent
134
+ - `sgpt` — ChatGPT for the shell (Shell-GPT)
72
135
 
73
- The launcher is simple and fast. It shows short role labels like `agent`, `coding`, `general`, `local`, and `cloud` so you can pick quickly.
136
+ - **Runtime (local)**:
137
+ - `ollama` — run local **and** cloud-hosted open models (`ollama signin` for cloud)
74
138
 
75
- To stay fast, `dot ai` caches provider info in `~/.cache/dotfiles/ai/status.tsv` for 5 minutes. You can change this with `DOTFILES_AI_STATUS_TTL`.
139
+ - **Cloud (platform)**:
140
+ - `kiro-cli` — AWS's agentic dev assistant
76
141
 
77
- Related AI commands:
142
+ `dot ai tools` shows install status grouped by role and offers an interactive install picker. Status is cached in `~/.cache/dotfiles/ai/status.tsv` for 5 minutes (tune with `DOTFILES_AI_STATUS_TTL`).
78
143
 
79
- - `dot ai` — check status and launch tools
80
- - `dot ai-setup` — set up AI CLIs step by step
81
- - `dot ai-query` — run context-aware queries on the dotfiles repo
144
+ ## Run cost and telemetry
82
145
 
83
- ## Optional AI CLI tools
146
+ Every run through the bridge is logged to a local SQLite database (`~/.local/share/dotfiles-ai.db`). `dot ai cost` reports spend across providers, and the cockpit's cost panel and recent-runs list read from the same log. Token-level cost is populated for providers that surface it (and for everything routed through `dot ai serve`).
84
147
 
85
- These tools are not installed for you. Pick and install only the ones you want:
148
+ ## Deprecated commands
86
149
 
87
- - **Agents**: `claude`, `codex`, `copilot`, `goose`
88
- - **Coding assistants**: `aider`, `opencode`
89
- - **General AI**: `gemini`, `sgpt`
90
- - **Local-first**: `ollama`
91
- - **Coding agents**: `autohand`, `vibe`, `qwen`, `zai`
92
- - **Cloud / platform**: `kiro-cli`
150
+ The old command shapes still work, but print a one-line hint pointing at the new name. Update your muscle memory when convenient — the shortcut aliases (`dcl`, `dagy`, `dki`, …) already target the new surface.
93
151
 
94
- Once installed, the dotfiles add helper functions and shortcuts. These only load when `DOTFILES_AI=1` is set.
152
+ | Deprecated | Use instead |
153
+ |------------|-------------|
154
+ | `dot cl` | `dot ai claude` |
155
+ | `dot codex` / `dot copilot` / `dot agy` / `dot goose` | `dot ai codex` / `dot ai copilot` / `dot ai agy` / `dot ai goose` |
156
+ | `dot kiro` / `dot sgpt` / `dot ollama` / `dot opencode` | `dot ai kiro` / `dot ai sgpt` / `dot ai ollama` / `dot ai opencode` |
157
+ | `dot aider` / `dot autohand` / `dot vibe` / `dot qwen` / `dot zai` | `dot ai aider` / `dot ai autohand` / `dot ai vibe` / `dot ai qwen` / `dot ai zai` |
158
+ | `dot ai status` | `dot ai tools` |
159
+ | `dot ai dashboard` / `dot ai dash` | `dot ai` (the cockpit) |
160
+ | `dot ai proxy …` / `dot ai local on\|off` | `dot ai serve` |
161
+ | `dot ai-setup` | `dot ai login` |
162
+ | `dot ai-query` | `dot ai ask` |
163
+ | `--pattern <name>` | `--style <name>` |
95
164
 
96
165
  ## Agentic terminal workflows
97
166
 
@@ -104,5 +173,6 @@ If your terminal has built-in AI agents, keep your shell lean and fast:
104
173
  ## Privacy and safety
105
174
 
106
175
  - No AI tools are installed for you.
107
- - No background services run by default.
176
+ - No background services run by default; the gateway runs only while you keep `dot ai serve` up.
108
177
  - You control AI helpers with `DOTFILES_AI=1`.
178
+ - The gateway uses your native Claude session — no API keys are stored or required.
package/docs/COPYRIGHT CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.505) - <https://github.com/sebastienrousseau/dotfiles>
2
+ * 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.507) - <https://github.com/sebastienrousseau/dotfiles>
3
3
  * Made With ❤️ in London, United Kingdom
4
4
  * Designed by
5
5
  * Copyright (c) 2015-2026. All rights reserved.
package/docs/STRUCTURE.md CHANGED
@@ -55,7 +55,7 @@ See `docs/operations/ROADMAP_V0_2_503.md` for the full history.
55
55
  | `mise.toml` / `mise-versions.lock.json` | ci | Pinned tool versions (mise as the package manager). |
56
56
  | **Misc + agents** | | |
57
57
  | `AGENTS.md` | docs | Cross-harness AI agent context (the standard read by Codex/Cursor/etc.). |
58
- | `.cursor/`, `.codex/`, `.windsurf/`, `.zed/`, `.roo/`, `.clinerules`, `.aider.conf.yml`, `.continuerc.json`, `.jules/`, `.gemini/` | agents | Per-harness AGENTS.md renderings. Generated by `dot agents render`. Each one points back at `CLAUDE.md` as canonical. |
58
+ | `.cursor/`, `.codex/`, `.windsurf/`, `.zed/`, `.roo/`, `.clinerules`, `.aider.conf.yml`, `.continuerc.json`, `.jules/`, `.agy/` | agents | Per-harness AGENTS.md renderings. Generated by `dot agents render`. Each one points back at `CLAUDE.md` as canonical. |
59
59
  | `CLAUDE.md` | docs | Project guidelines (the canonical source — `dot agents render` propagates it). |
60
60
  | `CONTRIBUTING.md` | docs | Contributor guide (must stay at root for GitHub auto-discovery). |
61
61
  | `docs/CONFIG_STRATEGY.md`, `docs/OPENCODE.md` | docs | Strategy + OpenCode-CLI guidance. Moved out of root for cleanliness in v0.2.503. |
@@ -0,0 +1,79 @@
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
@@ -22,6 +22,7 @@ significant architectural decisions made in this project.
22
22
  | [ADR-009](ADR-009-wallpaper-driven-theming.md) | Wallpaper-Driven Theming Engine | Accepted |
23
23
  | [ADR-010](ADR-010-starship-transient-prompt.md) | Enable Starship Transient Prompt in Zsh and Fish | Accepted |
24
24
  | [ADR-011](ADR-011-nushell-tier3-keep.md) | Keep Nushell as Tier-3 Reference with Minimum-Viable Caching | Accepted |
25
+ | [ADR-012](ADR-012-ai-fleet-local-proxy.md) | AI Fleet — Native Local Claude Proxy and Cockpit | Accepted |
25
26
 
26
27
  ## ADR Format
27
28
 
package/docs/index.md CHANGED
@@ -7,7 +7,7 @@ render_with_liquid: false
7
7
  Cross-platform, signed, local-first dotfiles for macOS, Linux, and WSL.
8
8
 
9
9
  [![Build](https://img.shields.io/github/actions/workflow/status/sebastienrousseau/dotfiles/ci.yml?style=for-the-badge&logo=github)](https://github.com/sebastienrousseau/dotfiles/actions)
10
- [![Version](https://img.shields.io/badge/Version-v0.2.505-blue?style=for-the-badge)](https://github.com/sebastienrousseau/dotfiles/releases/tag/v0.2.505)
10
+ [![Version](https://img.shields.io/badge/Version-v0.2.507-blue?style=for-the-badge)](https://github.com/sebastienrousseau/dotfiles/releases/tag/v0.2.507)
11
11
  [![Downloads](https://img.shields.io/github/downloads/sebastienrousseau/dotfiles/total?style=for-the-badge)](https://github.com/sebastienrousseau/dotfiles/releases)
12
12
 
13
13
  This site is published from the `docs/` directory on `master` and tracks the current workstation baseline, operational guidance, and security material for the repository.
@@ -38,6 +38,6 @@ This site is published from the `docs/` directory on `master` and tracks the cur
38
38
 
39
39
  ## Current Release
40
40
 
41
- - Current tagged release: [`v0.2.505`](https://github.com/sebastienrousseau/dotfiles/releases/tag/v0.2.505)
41
+ - Current tagged release: [`v0.2.507`](https://github.com/sebastienrousseau/dotfiles/releases/tag/v0.2.507)
42
42
  - Latest release feed: [GitHub releases](https://github.com/sebastienrousseau/dotfiles/releases/latest)
43
43
  - Source repository: [sebastienrousseau/dotfiles](https://github.com/sebastienrousseau/dotfiles)
@@ -4,7 +4,7 @@ render_with_liquid: false
4
4
 
5
5
  # Introduction
6
6
 
7
- This manual describes `.dotfiles` v0.2.505 — a trusted agent workstation baseline for macOS, Linux, and WSL.
7
+ This manual describes `.dotfiles` v0.2.507 — a trusted agent workstation baseline for macOS, Linux, and WSL.
8
8
 
9
9
  The repository is more than a personal dotfiles collection. It ships as workstation infrastructure: signed, attested, multi-platform, AI-aware, and self-healing. Chezmoi handles templating and platform differences. The `dot` CLI sits on top and coordinates lifecycle operations.
10
10
 
@@ -70,7 +70,7 @@ All three must pass for a commit to be merged.
70
70
 
71
71
  ## Agent Policy Enforcement
72
72
 
73
- AI agent operations (Claude Code, Codex, Copilot, Gemini, etc.) are governed by the **Model Context Protocol (MCP)** policy in `dot_config/dotfiles/mcp.json` and validated by `dot mcp`.
73
+ AI agent operations (Claude Code, Codex, Copilot, Antigravity CLI, etc.) are governed by the **Model Context Protocol (MCP)** policy in `dot_config/dotfiles/mcp.json` and validated by `dot mcp`.
74
74
 
75
75
  ### Policy Structure
76
76
 
@@ -184,7 +184,7 @@ After `dot doctor` reports a healthy score, you have:
184
184
  | **Editor** | Neovim with lazy.nvim + LSP + theme-synced colorscheme |
185
185
  | **Terminal** | Ghostty/Alacritty/Kitty/WezTerm configs (pick whichever is installed) |
186
186
  | **Git** | Signed commits, delta diff, conventional commit template |
187
- | **AI tooling** | Codex, Copilot CLI, Gemini CLI via mise; Claude Code via Anthropic's native installer |
187
+ | **AI tooling** | Codex, Copilot CLI, Antigravity CLI (`agy`) via native installer; Claude Code via Anthropic's native installer |
188
188
  | **Secret store** | Age key, SOPS config, `dot secrets` command ready |
189
189
  | **Security** | Gitleaks, detect-secrets baseline, signed attestation log |
190
190
  | **Theme engine** | K-Means wallpaper extractor, system + custom wallpaper discovery |
@@ -189,12 +189,27 @@ Measure heavy-layer (nvm, rbenv, direnv) readiness time.
189
189
 
190
190
  ### `dot ai`
191
191
 
192
- Show installed AI tools with versions and status.
192
+ The cockpit for your AI-CLI fleet. Bare `dot ai` opens a Bubble Tea TUI;
193
+ a prompt runs a one-shot; `dot ai serve` serves your Claude subscription
194
+ locally to any Anthropic/OpenAI-protocol tool.
193
195
 
194
196
  ```
195
- dot ai
197
+ dot ai # open the cockpit (TUI)
198
+ dot ai "fix the auth bug" # one-shot on Claude
199
+ dot ai codex "add tests" # one-shot on a named tool
200
+ dot ai chat [tool] # interactive session
201
+ dot ai tools # install / manage the fleet
202
+ dot ai install [all|<tool>] # install fleet tools
203
+ dot ai serve [stop|status] # local Claude gateway (start also routes the fleet)
204
+ dot ai cost # spend report
205
+ dot ai login [tool] # authenticate
206
+ dot ai doctor # health-check fleet + gateway
196
207
  ```
197
208
 
209
+ Add `--style <name>` (architect, hardener, refactor) to steer a prompt.
210
+ Old forms (`dot cl`, `dot ai dashboard`, `dot ai proxy`, `dot ai-setup`, …)
211
+ still work as deprecated aliases. See [AI.md](../../AI.md) for the full guide.
212
+
198
213
  ### `dot mcp`
199
214
 
200
215
  Inspect MCP policy and registry.
@@ -326,7 +341,7 @@ dot agents check # exit 0 if AGENTS.md tracks CLAUDE.md; 1 if drifted
326
341
  dot agents render # regenerate AGENTS.md + 10 harness-specific files
327
342
  ```
328
343
 
329
- Harnesses covered: `AGENTS.md` (canonical cross-harness), Cursor (`.cursor/rules/dotfiles.mdc`), Codex (`.codex/config.toml`), Windsurf (`.windsurf/rules.md`), Zed (`.zed/agent-config.toml`), Roo (`.roo/rules.md`), Cline (`.clinerules`), Aider (`.aider.conf.yml`), Continue (`.continuerc.json`), Jules (`.jules/system.md`), Gemini (`.gemini/GEMINI.md`).
344
+ Harnesses covered: `AGENTS.md` (canonical cross-harness), Cursor (`.cursor/rules/dotfiles.mdc`), Codex (`.codex/config.toml`), Windsurf (`.windsurf/rules.md`), Zed (`.zed/agent-config.toml`), Roo (`.roo/rules.md`), Cline (`.clinerules`), Aider (`.aider.conf.yml`), Continue (`.continuerc.json`), Jules (`.jules/system.md`), Antigravity (`.agy/AGY.md`).
330
345
 
331
346
  Edit `CLAUDE.md` first, then run `dot agents render`; do not hand-edit `AGENTS.md` or any of the per-harness files. The check subcommand is suitable for pre-commit hooks.
332
347
 
@@ -12,7 +12,8 @@ job `lint/command-index` fails when this file is stale.
12
12
  |---------|---------|
13
13
  | `dot add` | Add a file to chezmoi source |
14
14
  | `dot agent` | Profile-aware execution, agent card, a2a-card, session log, checkpoints, and conformance |
15
- | `dot ai` | AI CLI status, delegate, and cost report |
15
+ | `dot agy` | Antigravity CLI with context patterns |
16
+ | `dot ai` | AI fleet cockpit, gateway, and cost |
16
17
  | `dot ai-query` | Context-aware RAG query over your dotfiles |
17
18
  | `dot ai-setup` | Interactive setup for all AI CLI tools |
18
19
  | `dot aider` | Aider with context patterns |
@@ -38,7 +39,6 @@ job `lint/command-index` fails when this file is stale.
38
39
  | `dot fleet` | events Show recent fleet events from local event log |
39
40
  | `dot fleet` | namespace Show or set the active namespace for multi-tenant isolation |
40
41
  | `dot fonts` | Install Nerd Fonts (JetBrainsMono by default) |
41
- | `dot gemini` | Gemini CLI with context patterns |
42
42
  | `dot help` | Show this help message |
43
43
  | `dot history` | Shell history analysis |
44
44
  | `dot keys` | Keybindings (sign-check: verify git signing) |
@@ -99,7 +99,7 @@ Detailed guide: [AI.md](../AI.md).
99
99
  | **Claude CLI** | Anthropic's terminal assistant |
100
100
  | **Copilot CLI** | GitHub Copilot in the terminal |
101
101
  | **Kiro CLI** | Agentic AI terminal assistant |
102
- | **Gemini CLI** | Google's multi-modal CLI tool |
102
+ | **Antigravity CLI** | Google's Antigravity CLI (`agy`) |
103
103
  | **Mods/Fabric** | Pipeline-friendly AI processing |
104
104
  | **sgpt** | Shell-GPT for terminal AI queries |
105
105
  | **Ollama** | Run large language models locally |
@@ -56,9 +56,9 @@ The `dot` command is the main interface for managing dotfiles. Run `dot version`
56
56
  | `dot history` | Analyse shell history |
57
57
  | `dot security-score` | Score workstation security (`--verbose/-v`,`--quiet/-q`,`--json/-j`) |
58
58
  | `dot snapshot` | Capture workstation state (`--baseline/-b`,`--force/-f`) |
59
- | `dot ai` | Show categorized AI CLI status and launch an installed provider |
60
- | `dot ai-setup` | Bootstrap supported AI CLIs interactively |
61
- | `dot ai-query` | Run context-aware AI queries over the repo |
59
+ | `dot ai` | Open the AI fleet cockpit; run prompts, serve a local Claude gateway, install, cost |
60
+ | `dot ai-setup` | Bootstrap AI CLIs interactively (deprecated alias for `dot ai login`) |
61
+ | `dot ai-query` | Context-aware RAG query over the repo (deprecated alias for `dot ai ask`) |
62
62
  | `dot mode` | Show or switch the active agent profile |
63
63
  | `dot agent` | Inspect agent metadata, logs, checkpoints, and conformance |
64
64
  | `dot agent checkpoint` | Save, list, show, and replay bounded agent checkpoints |
@@ -110,18 +110,22 @@ POSIX scripts in `~/.local/bin/` that work across macOS, Linux, and WSL.
110
110
 
111
111
  Themes are auto-generated from wallpapers — `themes.toml` is not hand-edited. See [Theming Guide](../guides/THEMING.md) for the K-Means CIELAB extraction model and Apple-compatible dynamic HEIC support.
112
112
 
113
- ## AI Bridges
113
+ ## AI Bridges (deprecated aliases)
114
+
115
+ These run a tool with dotfiles context injection. They still work but are
116
+ **deprecated** in favour of `dot ai <tool>` (e.g. `dot ai claude "…"`); each
117
+ prints a one-line hint. See [AI.md](../AI.md) for the full surface.
114
118
 
115
119
  | Command | Description |
116
120
  |---------|-------------|
117
- | `dot cl` | Invoke Claude Code with dotfiles context injection |
118
- | `dot copilot` | Invoke GitHub Copilot CLI with dotfiles context injection |
119
- | `dot gemini` | Invoke Gemini CLI with dotfiles context injection |
120
- | `dot kiro` | Invoke Kiro CLI with dotfiles context injection |
121
- | `dot sgpt` | Invoke Shell-GPT with dotfiles context injection |
122
- | `dot ollama` | Invoke Ollama with dotfiles context injection |
123
- | `dot opencode` | Invoke OpenCode with dotfiles context injection |
124
- | `dot aider` | Invoke Aider with dotfiles context injection |
121
+ | `dot cl` | Claude Code with context injection — use `dot ai claude` |
122
+ | `dot copilot` | GitHub Copilot CLI use `dot ai copilot` |
123
+ | `dot agy` | Antigravity CLI use `dot ai agy` |
124
+ | `dot kiro` | Kiro CLI use `dot ai kiro` |
125
+ | `dot sgpt` | Shell-GPT use `dot ai sgpt` |
126
+ | `dot ollama` | Ollama use `dot ai ollama` |
127
+ | `dot opencode` | OpenCode use `dot ai opencode` |
128
+ | `dot aider` | Aider use `dot ai aider` |
125
129
 
126
130
  ## Secrets
127
131
 
package/install.sh CHANGED
@@ -60,7 +60,7 @@ show_help() {
60
60
  Usage: install.sh [version] [options]
61
61
 
62
62
  Arguments:
63
- version The version (tag or branch) to install (default: v0.2.505)
63
+ version The version (tag or branch) to install (default: v0.2.507)
64
64
 
65
65
  Options:
66
66
  --help Show this help message
@@ -76,7 +76,7 @@ EOF
76
76
  }
77
77
 
78
78
  main() {
79
- local version="v0.2.505"
79
+ local version="v0.2.507"
80
80
  local version_set=0
81
81
  local minimal=0
82
82
  local provision="${DOTFILES_PROVISION:-0}"
@@ -106,7 +106,7 @@ main() {
106
106
  # like `foobar` doesn't trigger a 30s+ network download attempt.
107
107
  # Caught by the install.sh fuzz harness (#881).
108
108
  if [[ ! "$arg" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+([-+][a-zA-Z0-9.-]+)?$ ]]; then
109
- error "Unrecognized positional argument '$arg' — expected a semver version (e.g. v0.2.505)."
109
+ error "Unrecognized positional argument '$arg' — expected a semver version (e.g. v0.2.507)."
110
110
  fi
111
111
  version="$arg"
112
112
  version_set=1
@@ -351,7 +351,7 @@ main() {
351
351
  # 6. Initialize & Apply
352
352
  step "Applying Configuration..."
353
353
 
354
- # ── Auto-migration for v0.2.505 reorg ─────────────────────────────────
354
+ # ── Auto-migration for v0.2.507 reorg ─────────────────────────────────
355
355
  # If the user is upgrading from a pre-0.2.503 install, run the
356
356
  # migration script BEFORE `chezmoi apply` so the reorg's source-
357
357
  # path moves don't cause chezmoi to delete deployed files.
@@ -360,7 +360,7 @@ main() {
360
360
  for migrate_src in "$SOURCE_DIR" "$LEGACY_SOURCE_DIR"; do
361
361
  migrate_script="$migrate_src/install/migrate/migrate-v0_2-to-v0_2_503.sh"
362
362
  if [[ -x "$migrate_script" ]]; then
363
- echo " Running v0.2.505 migration (idempotent; safe on fresh installs)..."
363
+ echo " Running v0.2.507 migration (idempotent; safe on fresh installs)..."
364
364
  "$migrate_script" || echo " migration exited non-zero — continuing apply"
365
365
  break
366
366
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sebastienrousseau/dotfiles",
3
- "version": "0.2.505",
3
+ "version": "0.2.507",
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": {