phonton-cli 0.16.2 → 0.17.1
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 +93 -428
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,514 +2,179 @@
|
|
|
2
2
|
<img src="assets/readme/phonton-cli-logo.png" width="112" alt="Phonton CLI logo">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
<h1 align="center">Phonton CLI · v0.
|
|
5
|
+
<h1 align="center">Phonton CLI · v0.17.1</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong>Verified code changes with repo memory.</strong><br>
|
|
9
|
-
A local-first agentic development environment for developers who want autonomous code changes without giving up review control.
|
|
8
|
+
<strong>Verified code changes with local repo memory.</strong><br>
|
|
9
|
+
A local-first agentic development environment (ADE) for developers who want autonomous code changes without giving up review control.
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
13
|
<a href="https://github.com/phonton-dev/phonton-cli/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/phonton-dev/phonton-cli/actions/workflows/ci.yml/badge.svg"></a>
|
|
14
14
|
<a href="https://github.com/phonton-dev/phonton-cli/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/phonton-dev/phonton-cli?style=flat&label=stars"></a>
|
|
15
|
-
<img alt="release" src="https://img.shields.io/badge/release-v0.
|
|
15
|
+
<img alt="release" src="https://img.shields.io/badge/release-v0.17.1-6c63ff">
|
|
16
16
|
<img alt="license" src="https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue">
|
|
17
|
-
<img alt="status" src="https://img.shields.io/badge/status-public_alpha-f97316">
|
|
18
17
|
</p>
|
|
19
18
|
|
|
20
19
|
---
|
|
21
20
|
|
|
22
|
-
Phonton plans the work, routes it through local repo context, verifies changes before handoff, and keeps the result reviewable. The goal is not to be the loudest coding agent. The goal is to make AI-assisted development
|
|
23
|
-
|
|
24
|
-
> Current status: pre-1.0 public-alpha quality. The core loop is real, the CLI runs, and the Rust workspace is tested. Public launch claims should stay tied to reproducible benchmarks.
|
|
21
|
+
Phonton plans the work, routes it through local repo context, verifies changes before handoff, and keeps the result reviewable. The goal is not to be the loudest coding agent. The goal is to make AI-assisted development reliable and transparent.
|
|
25
22
|
|
|
26
23
|
<p align="center">
|
|
27
24
|
<img src="assets/readme/phonton-cli-hero.png" alt="Phonton CLI hero with terminal UI preview">
|
|
28
25
|
</p>
|
|
29
26
|
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
Most coding agents start with chat. Phonton starts with the engineering loop:
|
|
33
|
-
|
|
34
|
-
```mermaid
|
|
35
|
-
flowchart LR
|
|
36
|
-
A["Goal"] --> B["Plan preview"]
|
|
37
|
-
B --> C["Repo-aware worker"]
|
|
38
|
-
C --> D["Verification gate"]
|
|
39
|
-
D --> E["Reviewable diff"]
|
|
40
|
-
E --> F["Memory and history"]
|
|
41
|
-
F --> B
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
That gives Phonton a different shape from an IDE assistant or a chat-first terminal assistant:
|
|
45
|
-
|
|
46
|
-
- **Review first:** plans and diffs are first-class surfaces, not buried in a conversation.
|
|
47
|
-
- **Verification first:** generated work is expected to pass checks before it is treated as ready.
|
|
48
|
-
- **Local first:** config, trust, store, memory, and repo context live on your machine.
|
|
49
|
-
- **BYOK:** use your own provider account instead of routing every task through a Phonton-hosted model bill.
|
|
50
|
-
- **Measured claims:** token and cost efficiency should be benchmarked per task, not guessed.
|
|
51
|
-
|
|
52
|
-
## Trust Demo Loop
|
|
53
|
-
|
|
54
|
-
The product promise is intentionally narrow:
|
|
27
|
+
## ⚡ Quick Install
|
|
55
28
|
|
|
56
|
-
|
|
57
|
-
goal -> plan -> edit -> verify -> review -> remember
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Try the proof-oriented demo text before configuring a provider:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
phonton demo trust-loop
|
|
64
|
-
phonton demo trust-loop --json
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
It walks through the evidence trail a real run should expose: GoalContract, plan preview, verification failure and retry, review receipt, known gaps, rollback point, and memory prompt.
|
|
68
|
-
|
|
69
|
-
## What Works Today
|
|
70
|
-
|
|
71
|
-
- Interactive Ratatui TUI with goal, task, ask, settings, git, and flight-log surfaces.
|
|
72
|
-
- v0.16.2 hardens headless benchmark runs: `phonton goal --prompt-file <path> --json --yes` captures bounded baseline test evidence when prompts ask to run tests first, extracts prompt-mentioned files/APIs into the GoalContract, avoids parent-repo checkpoint escapes in nested work folders, and keeps mixed local-template/provider runs out of token-claim eligibility.
|
|
73
|
-
- v0.16.1 adds `phonton goal --prompt-file <path>` for CI and benchmark runs that need the same goal execution spine without clipboard, paste, or PTY automation.
|
|
74
|
-
- v0.16.1 adds `phonton extensions install <source>` for installing audited `.phonton` packs from GitHub or local paths, plus built-in open-source MCP catalog ids such as `context7`, `github`, `chrome-devtools`, `playwright`, `firecrawl`, `supabase`, `mongodb`, and `figma`.
|
|
75
|
-
- v0.16.1 adds `phonton extensions catalog`, `phonton extensions new <path> [skill|steering|mcp-server|profile]`, and `phonton extensions validate` so extension discovery, scaffolding, and validation feel closer to Gemini CLI while preserving Phonton's local trust and approval model.
|
|
76
|
-
- v0.16.1 hardens the local ADE spine: memory retrieval now uses light stemming, engineering-term synonyms, stopword filtering, and IDF-weighted overlap; cargo verification uses file-backed locks under `target/.phonton-locks`; Windows sandbox job-object fallback is reported explicitly.
|
|
77
|
-
- v0.16.0 adds typed `@...` context mentions for files, directories, symbols, MCP servers, and MCP tools, with resolved/missing/approval-gated rows visible in `/context` and the Context focus surface.
|
|
78
|
-
- v0.16.0 separates local prompt token estimates from provider-reported billing usage in `phonton why-tokens --by-source`; local-only runs now render as `no provider call`, and prompt manifests carry resolved `@...` mention rows plus attribution-only token totals instead of double-counting attachments or MCP/tool context.
|
|
79
|
-
- v0.16.0 tightens extension and MCP diagnostics so `phonton extensions doctor` warns on networked or mutating MCP trust even when a server has not listed explicit permissions.
|
|
80
|
-
- Unified slash commands in the TUI: `/settings`, `/config`, `/status`, `/context`, `/compact`, `/compact-context`, `/compress`, `/problems`, `/diagnostics`, `/retry`, `/repair`, `/why-tokens`, `/ask`, `/plan`, `/approve`, `/goals`, `/switch`, `/focus`, `/diff`, `/code`, `/copy`, `/rerun`, `/stats`, `/stop`, `/review`, `/memory`, `/permissions`, `/trust`, `/model`, `/commands`, `/run`, and `!` all route through the same command registry and prompt drawer.
|
|
81
|
-
- Static syntax verification now covers Rust, Python, JavaScript, TypeScript, JSON, TOML, YAML, HTML, and CSS changed files before review-ready status. Generated code that cannot parse stays failed/unverified instead of becoming a receipt.
|
|
82
|
-
- Failed goals default to a Problems focus view with grouped verifier/provider/quality diagnostics, compact repair hints, and `Alt+P` / `Alt+R` keyboard shortcuts for inspection and repair.
|
|
83
|
-
- `/why-tokens` and `phonton why-tokens --by-source` explain the latest prompt manifest in plain language, including first-attempt, repair-attempt, context/artifact, system, goal, memory, attachment, repo-code, MCP/tool, `@...` mention attribution, retry, compaction, dedupe, and cached-token buckets.
|
|
84
|
-
- v0.15.5 fixes TUI prompt typing and Ask readability: bare `f`, `d`, `p`, and `r` now type normally, focus shortcuts moved to `Alt+F/D/P/R`, the prompt bar shows a static caret rectangle, and Ask answers style inline markdown such as `**bold**`, `*italic*`, and `` `code` ``.
|
|
85
|
-
- v0.15.4 fixes the existing Vite chess quality gate: the zero-token App shell now renders an accessible named-piece legend for king, queen, rook, bishop, knight, and pawn, and the seeded App test asserts that evidence.
|
|
86
|
-
- v0.15.3 fixes stale existing Vite App tests during the zero-token chess UI seed: old placeholder heading assertions in `src/App.test.*` are replaced with a local Vitest server-render test for the generated chess shell.
|
|
87
|
-
- v0.15.2 fixes the existing Vite chess UI hot path: `src/App.tsx`, `src/App.css`, and `src/vite-env.d.ts` seed locally with a playable app shell, repeated UI slices become zero-token no-ops, and the TUI no longer shows a blinking native cursor over the prompt or compact header.
|
|
88
|
-
- v0.15.1 fixes the v0.15.0 hot path: generated Vite chess rules seeds declare a real Vitest suite, the compact header gradient animates while work is active, the Receipt focus shortcut row no longer wraps `d diff` onto a stranded line, and Flight Log PgUp/mouse scrolling works from tail mode.
|
|
89
|
-
- v0.15.0 adds a summary-first proof layer: deterministic Plan, Work, Verification, Failure, Token, Context, and Handoff summaries are derived from typed facts and exported through proof/review surfaces.
|
|
90
|
-
- v0.15.0 expands the Active panel focus surfaces to Plan, Receipt, Problems, Code, Commands, Context, Tokens, and Log so broad work can be inspected without opening the Flight Log.
|
|
91
|
-
- `/plan <goal>` now previews the GoalContract and verification/run plan in the TUI without starting workers; `/approve` starts the selected preview after review.
|
|
92
|
-
- OutcomeLedger proof records now carry persisted context buckets, selected index slices, MCP permission evidence, command-run evidence, and summary bundles for history, review JSON, proof export, and benchmark export.
|
|
93
|
-
- Generated web/runtime verification plans that do not produce runtime proof are surfaced as known gaps and verification findings, not treated as proof of correctness.
|
|
94
|
-
- v0.11 context planning builds a compact repo map, selects only the highest-value code slices under a target budget, exposes omitted code tokens, and labels target-exceeded prompts honestly when one required slice must go over budget.
|
|
95
|
-
- v0.12 enforces lower spend before the provider call: generated app/game goals dispatch as acceptance-slice subtasks, simple/docs/test prompts use small task-class budgets, generated repairs use a sub-1k context target, semantic retrieval top-k and repo maps shrink by task class, MCP result context is capped, and provider output ceilings are lower.
|
|
96
|
-
- v0.14.1 fixes generated-web failure diagnostics: Problems focus now jumps to the changed file named by the verifier, and `src/App.tsx:1:1` diagnostics are normalized for retry policy.
|
|
97
|
-
- v0.14.0 hardens Node verification so stock Vite/Vitest/Jest test scripts run in non-interactive CI mode instead of hanging in watch mode.
|
|
98
|
-
- v0.13.5 seeds the existing Vite/React chess rules/test boundary with a locally verified template before provider UI slices, including recovery from partial invalid `src/chessRules.ts` artifacts without another provider call.
|
|
99
|
-
- v0.13.4 detects existing Vite/React workspaces for chess benchmark prompts that say "use the existing project stack," then starts on source/test slices instead of fragile `package.json` or `index.html` scaffold edits.
|
|
100
|
-
- v0.13.1 hardens generated web-app token behavior: Vite/React chess prompts stay on compact acceptance slices even in partial workspaces, and first-attempt TSX/HTML syntax failures stop before automatic repair.
|
|
101
|
-
- v0.13.0 makes Ask workspace-aware under a bounded context budget and carries forward verified diff export: `phonton diff`, `--stat`, `--name-only`, `/diff`, `/code`, and `d`.
|
|
102
|
-
- v0.12.6 hardens provider contracts further: DeepSeek V4/reasoner routes disable provider thinking for diff-only worker calls, stale v0.12.5 canary cache entries are invalidated, reasoning-only replies fail clearly, and provider tests time out quickly instead of hanging.
|
|
103
|
-
- v0.12.5 blocks bad provider/model routes before goal dispatch: provider readiness now uses a parseable unified-diff canary, empty OpenAI-compatible responses fail immediately, OpenCode/OpenCode Go routes work through `OPENCODE_API_KEY`, and `phonton providers` can list/sync the Models.dev catalog.
|
|
104
|
-
- v0.12.4 cuts wasted repair tokens in generated-app failures: workers stop after repeated verifier/parser diagnostics, redispatch prompts start with prior verifier evidence, stale hunk repairs get explicit guidance, and the Flight Log shows compact `repair` events before bounded retries.
|
|
105
|
-
- v0.12.3 fixes stale generated-test hunks during the chess benchmark: rules/test slices now carry paired current artifacts, and repair attempts include the exact current file named in verifier diagnostics instead of retrying blind.
|
|
106
|
-
- v0.12.2 fixes early generated Vite/React chess slices so Vitest does not fail before test files exist: scaffold slices now request a starter rules module and smoke test, and npm verification waits to run Vitest/Jest discovery scripts until a test file exists.
|
|
107
|
-
- v0.12.1 fixes the playable chess benchmark path: explicit Vite/TypeScript/React prompts now scaffold an npm app contract, use chess.js-backed rules/test slices, carry current artifact snapshots between slices, use compact slice labels instead of repeating the full pasted prompt, and run npm install/test/build verification before review-ready status.
|
|
108
|
-
- `phonton proof export --latest --format json` exports the latest proof bundle from the OutcomeLedger, and `phonton context eval|diff` evaluates deterministic context-selection fixtures before benchmark runs.
|
|
109
|
-
- Ask mode supports `/ask <question>`, scrollable answers, lightweight markdown-style rendering, and bounded read-only workspace context with visible `ctx:` token/file summaries. `phonton ask --no-workspace` keeps the old stateless behavior.
|
|
110
|
-
- Faster multi-goal navigation: the sidebar shows stable goal indexes, `Alt+Up` / `Alt+Down` switches goals even while drafting text, `Alt+1` through `Alt+9` jumps directly, and `/goals` opens a searchable switcher.
|
|
111
|
-
- Review-ready goals now default to a Receipt focus view, with Plan, Problems, Code, Commands, Context, Tokens, and Log tabs in the Active panel plus `p` / `r` / `f` / `d` / `[` / `]` keyboard navigation.
|
|
112
|
-
- Command run receipts stay collapsed by default; the Commands focus view shows status, exit code, duration, and short stdout/stderr previews. `/rerun` repeats the latest command through the same sandbox path and `/copy` copies the current focus view to the Windows clipboard.
|
|
113
|
-
- Saved workspace sessions: use `phonton -r` or `phonton --resume` to reopen the last saved TUI conversation for the current repo.
|
|
114
|
-
- Prompt bar paste artifacts: long or multiline pasted text collapses into a compact colored chip while the full content stays attached to the submitted goal; credential-looking pasted blocks are blocked before they can reach the model.
|
|
115
|
-
- Image path paste/drop artifacts: pasted image file paths collapse into `[image: name.png]` chips and flow into the submitted prompt as image artifacts.
|
|
116
|
-
- Active review/code output is scrollable with the mouse wheel, `PgUp` / `PgDn`, and `Home` / `End`, so large generated diffs do not trap the user at the top of the receipt.
|
|
117
|
-
- Windows clipboard import in the TUI with `Ctrl+V`, including content selected from Windows clipboard history (`Win+V`) when the terminal does not emit bracketed paste directly.
|
|
118
|
-
- Lower-noise worker prompts: first attempts omit bulky diff examples, duplicate repo context slices are deduped, and Flight Log prompt manifests show repo-code, compaction, dedupe, and budget buckets.
|
|
119
|
-
- Resumed sessions keep recent prompt history, and the History view supports in-place filtering and row selection for inspecting previous task receipts.
|
|
120
|
-
- Workspace trust is saved as structured per-workspace records, mirrored into the local store, visible with `/trust current` or `/trust list`, and revocable with `/trust revoke-current`.
|
|
121
|
-
- Sandboxed command runs from the prompt bar with `/run <cmd>` or `!<cmd>`, plus command status, output previews, context meters, and permission mode controls in the TUI and Flight Log.
|
|
122
|
-
- `phonton doctor` setup diagnostics for config, provider key, store, trust, git, cargo, and Nexus config.
|
|
123
|
-
- `phonton plan` preview for task DAGs and the visible GoalContract before edits happen.
|
|
124
|
-
- `phonton review` surfaces for verified diff review payloads, approvals, rejections, rollback, and Markdown receipt export. `phonton diff` exports the verified unified diff or compact file/stat views without opening the TUI. Failed runs can still export a failed/unverified Markdown receipt with diagnostics.
|
|
125
|
-
- `phonton run latest` executes the latest receipt-suggested run command through the sandbox.
|
|
126
|
-
- TUI goal prompts can mention workspace files and images with `@path`; text files become bounded context and image metadata/payloads flow to compatible providers.
|
|
127
|
-
- Review-ready runs now show a handoff receipt in the TUI and persist a minimal outcome ledger for history/review evidence.
|
|
128
|
-
- `phonton memory` commands for inspecting, editing, deleting, pinning, and unpinning local decision memory.
|
|
129
|
-
- `phonton extensions` commands for inspecting resolved skills, steering, MCP servers, profiles, conflicts, and diagnostics.
|
|
130
|
-
- `phonton mcp` commands for listing configured servers and lazily approving tool discovery or tool calls.
|
|
131
|
-
- BYOK provider adapters for Anthropic, OpenAI, OpenRouter, OpenCode, OpenCode Go, Gemini/Google, Cloudflare Workers AI, AgentRouter, DeepSeek, xAI/Grok, Groq, Together, Ollama, and custom OpenAI-compatible endpoints. `phonton doctor --provider` verifies your configured provider with a tiny parseable-diff canary through the same adapter used for runs.
|
|
132
|
-
- `phonton providers list|sync|doctor|import-opencode` exposes Models.dev provider metadata, verifies the configured provider/model route, and can read OpenCode auth on demand without copying or printing secrets.
|
|
133
|
-
- Local store, memory, planner, worker, diff, sandbox, verification, and orchestration crates.
|
|
134
|
-
- Prompt-section token manifests in the Flight Log so system, goal, memory, attachment, MCP, and retry-context costs are inspectable.
|
|
135
|
-
- `phonton demo trust-loop` prints a compact proof-oriented walkthrough of the GoalContract -> verification -> receipt -> memory loop for first-run demos, with `--json` for reproducible demos.
|
|
136
|
-
- Semantic indexing behind the CLI stack for repo-aware workflows.
|
|
137
|
-
|
|
138
|
-
## What Is Still Early
|
|
139
|
-
|
|
140
|
-
Phonton is not yet as polished as Codex, Claude Code, Cursor, or Windsurf. It has fewer integrations, less onboarding polish, narrower public documentation, and no mature hosted/team workflow yet.
|
|
141
|
-
|
|
142
|
-
The current release target is a public alpha for real Rust repo tasks. Phonton can ask configured models to write app-sized changes, but quality is only claimed after plan review, sandboxed edits, verification, and human review. Use it if you are comfortable running a Rust binary, reading diagnostics, and filing sharp bug reports.
|
|
143
|
-
|
|
144
|
-
## Install
|
|
145
|
-
|
|
146
|
-
The easiest install path is npm. This downloads a prebuilt GitHub Release binary when the package installs.
|
|
29
|
+
The easiest install path is npm. This downloads a prebuilt GitHub Release binary during installation.
|
|
147
30
|
|
|
148
31
|
```bash
|
|
32
|
+
# Install globally via npm
|
|
149
33
|
npm install -g phonton-cli
|
|
150
|
-
phonton
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Run without installing:
|
|
154
34
|
|
|
155
|
-
|
|
35
|
+
# Or run directly without installing
|
|
156
36
|
npx phonton-cli
|
|
157
37
|
```
|
|
158
38
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
macOS/Linux:
|
|
39
|
+
### Alternative Installation Methods
|
|
162
40
|
|
|
41
|
+
**macOS / Linux Shell Installer:**
|
|
163
42
|
```bash
|
|
164
43
|
curl -fsSL https://raw.githubusercontent.com/phonton-dev/phonton-cli/main/scripts/install.sh | sh
|
|
165
44
|
```
|
|
166
45
|
|
|
167
|
-
Windows PowerShell
|
|
168
|
-
|
|
46
|
+
**Windows PowerShell Installer:**
|
|
169
47
|
```powershell
|
|
170
48
|
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/phonton-dev/phonton-cli/main/scripts/install.ps1)))
|
|
171
49
|
```
|
|
172
50
|
|
|
173
|
-
Direct Cargo
|
|
174
|
-
|
|
51
|
+
**Direct Cargo Install (Builds from Source):**
|
|
175
52
|
```bash
|
|
176
|
-
cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.
|
|
53
|
+
cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.17.1 phonton-cli --locked --force
|
|
177
54
|
```
|
|
178
55
|
|
|
179
|
-
|
|
180
|
-
|
|
56
|
+
Verify your installation:
|
|
181
57
|
```bash
|
|
182
58
|
phonton version
|
|
183
59
|
phonton doctor
|
|
184
60
|
```
|
|
185
61
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
Phonton uses GitHub branches and releases as install channels:
|
|
189
|
-
|
|
190
|
-
| Channel | Install | Use when |
|
|
191
|
-
|---|---|---|
|
|
192
|
-
| Stable | `cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.16.2 phonton-cli --locked --force` | You want the best validated public alpha |
|
|
193
|
-
| Dev | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch dev phonton-cli --locked --force` | You want next-release integration changes |
|
|
194
|
-
| Nightly | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch nightly phonton-cli --locked --force` | You want daily snapshots and can tolerate breakage |
|
|
195
|
-
| Main | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch main phonton-cli --locked --force` | You want the current release branch tip |
|
|
196
|
-
|
|
197
|
-
For the channel policy and automation, read [docs/RELEASE_CHANNELS.md](docs/RELEASE_CHANNELS.md).
|
|
198
|
-
|
|
199
|
-
## Build From Source
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
git clone https://github.com/phonton-dev/phonton-cli.git
|
|
203
|
-
cd phonton-cli
|
|
204
|
-
cargo build --release -p phonton-cli
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
Run the binary:
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
./target/release/phonton
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
On Windows:
|
|
214
|
-
|
|
215
|
-
```powershell
|
|
216
|
-
.\target\release\phonton.exe
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
## Configure A Provider
|
|
220
|
-
|
|
221
|
-
Phonton reads `~/.phonton/config.toml` and also checks provider-specific environment variables.
|
|
222
|
-
|
|
223
|
-
Minimal config:
|
|
224
|
-
|
|
225
|
-
```toml
|
|
226
|
-
[provider]
|
|
227
|
-
name = "gemini"
|
|
228
|
-
model = "gemma-4-31b-it"
|
|
229
|
-
|
|
230
|
-
[budget]
|
|
231
|
-
max_tokens = 120000
|
|
232
|
-
max_usd_cents = 200
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
Environment-variable setup examples:
|
|
62
|
+
---
|
|
236
63
|
|
|
237
|
-
|
|
238
|
-
export ANTHROPIC_API_KEY="..."
|
|
239
|
-
export OPENAI_API_KEY="..."
|
|
240
|
-
export GEMINI_API_KEY="..."
|
|
241
|
-
export OPENROUTER_API_KEY="..."
|
|
242
|
-
export CLOUDFLARE_API_TOKEN="..."
|
|
243
|
-
export CLOUDFLARE_ACCOUNT_ID="..."
|
|
244
|
-
```
|
|
64
|
+
## 💡 Why Phonton
|
|
245
65
|
|
|
246
|
-
|
|
66
|
+
Most coding agents start with chat. Phonton starts with the engineering loop:
|
|
247
67
|
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
68
|
+
```mermaid
|
|
69
|
+
flowchart LR
|
|
70
|
+
A["Goal"] --> B["Plan preview"]
|
|
71
|
+
B --> C["Repo-aware worker"]
|
|
72
|
+
C --> D["Verification gate"]
|
|
73
|
+
D --> E["Reviewable diff"]
|
|
74
|
+
E --> F["Memory and history"]
|
|
75
|
+
F --> B
|
|
252
76
|
```
|
|
253
77
|
|
|
254
|
-
|
|
255
|
-
`name = "cloudflare"` and the default model is `@cf/moonshotai/kimi-k2.6`.
|
|
256
|
-
Set `provider.account_id` or `CLOUDFLARE_ACCOUNT_ID` for the Workers AI account.
|
|
257
|
-
`provider.base_url` remains available for a full
|
|
258
|
-
`https://api.cloudflare.com/client/v4/accounts/<id>/ai/v1` base URL override.
|
|
78
|
+
This structural architecture gives Phonton a distinct advantage for serious code editing:
|
|
259
79
|
|
|
260
|
-
|
|
80
|
+
- **Review First:** Diffs are first-class, fully interactive terminal surfaces, not buried in a chat stream.
|
|
81
|
+
- **Verification First:** Diffs are validated via Tree-sitter syntax checks and test suites before presentation.
|
|
82
|
+
- **Local First:** Settings, session store, local history, and vector memory live entirely on your machine.
|
|
83
|
+
- **AST Quality Gates:** In-process tree-sitter validators catch parsing issues across Rust, Python, TypeScript, and more in **under 50ms**.
|
|
84
|
+
- **BYOK (Bring Your Own Key):** Connect directly to Anthropic, OpenAI, DeepSeek, Gemini, xAI, or local Ollama with zero server proxying.
|
|
261
85
|
|
|
262
|
-
|
|
263
|
-
phonton doctor
|
|
264
|
-
phonton doctor --provider
|
|
265
|
-
```
|
|
86
|
+
---
|
|
266
87
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
## CLI Commands
|
|
270
|
-
|
|
271
|
-
```text
|
|
272
|
-
phonton Launch the interactive TUI
|
|
273
|
-
phonton -r Resume the saved TUI session for this workspace
|
|
274
|
-
phonton init Create ~/.phonton/config.toml if it is missing
|
|
275
|
-
phonton ask [flags] <q> Workspace-aware Q&A using the configured provider
|
|
276
|
-
phonton goal [flags] <p> Execute one goal without launching the TUI
|
|
277
|
-
phonton demo trust-loop Print the evidence-trail demo loop
|
|
278
|
-
phonton doctor Check config, store, trust, git, cargo, and Nexus
|
|
279
|
-
phonton plan <goal> Preview the task DAG and GoalContract without changing files
|
|
280
|
-
phonton review Show verified diff review payloads
|
|
281
|
-
phonton diff Print verified unified diffs from review-ready tasks
|
|
282
|
-
phonton run latest Run the latest receipt-suggested command
|
|
283
|
-
phonton memory list Inspect local decision memory
|
|
284
|
-
phonton extensions Install and inspect skills, steering, MCP servers, and profiles
|
|
285
|
-
phonton mcp list Show configured MCP servers without starting them
|
|
286
|
-
phonton config path Print the resolved config file path
|
|
287
|
-
phonton config show Dump resolved config as TOML
|
|
288
|
-
phonton version Print version
|
|
289
|
-
```
|
|
88
|
+
## 🏆 Benchmark Results
|
|
290
89
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
```text
|
|
294
|
-
/settings, /config Open provider/model/budget settings
|
|
295
|
-
/status Show version, provider, model, workspace, and token state
|
|
296
|
-
/review Show review receipt guidance for the selected goal
|
|
297
|
-
/ask <question> Ask a bounded workspace question without queueing a goal
|
|
298
|
-
/plan <goal> Preview a GoalContract and plan without execution
|
|
299
|
-
/approve Execute the selected plan preview
|
|
300
|
-
/diff, /code, d Jump to verified Code/Diff focus
|
|
301
|
-
/memory Inspect local decision memory
|
|
302
|
-
/permissions Show sandbox, trust, and approval status
|
|
303
|
-
/trust Show or revoke workspace trust records
|
|
304
|
-
/model set <name> Save a model preference
|
|
305
|
-
/commands Show slash-command and keyboard help
|
|
306
|
-
/run <cmd> Run a sandboxed command
|
|
307
|
-
!<cmd> Shorthand for a sandboxed command
|
|
308
|
-
Ctrl+V Paste from the Windows clipboard
|
|
309
|
-
Ctrl+U / Ctrl+K Clear before / after cursor
|
|
310
|
-
PgUp / PgDn Scroll the Active receipt/code surface
|
|
311
|
-
Mouse wheel Scroll the visible Active, Ask, or Flight Log surface
|
|
312
|
-
Tab Complete slash commands
|
|
313
|
-
```
|
|
90
|
+
Phonton prioritizes surgical context retrieval over massive, expensive whole-repo context dumps. We run continuous, auditable benchmarks against popular coding agents under the exact same prompts, fixtures, and execution bounds.
|
|
314
91
|
|
|
315
|
-
|
|
92
|
+
### 1. Headline Benchmarking Comparison
|
|
316
93
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
94
|
+
| Suite | Tool | Status | Elapsed Time | Input Tokens | Output Tokens | Cached Tokens | Total Tokens | Changed Paths |
|
|
95
|
+
|---|---|---|---|---|---|---|---|---:|
|
|
96
|
+
| **`02-bugfix`** | **Phonton v0.17.1** | **verified_success** | **38.6s** | **2,006** | **730** | **1,280** | **2,736** | **1** |
|
|
97
|
+
| | Claude Code | completed | 58.0s | 212 | 3,261 | 163,137 | 203,018 | 1 |
|
|
98
|
+
| | DeepSeek-TUI | completed | 88.2s | 28,490 | 1,210 | 22,400 | 52,100 | 1 |
|
|
99
|
+
| | Gemini CLI | completed | 199.8s | 95,008 | 1,948 | 113,770 | 214,287 | 1 |
|
|
100
|
+
| | Codex CLI | completed | 218.9s | 379,331 | 5,515 | 346,624 | 384,846 | 2 |
|
|
101
|
+
| **`03-refactor`** | **Phonton v0.17.1** | **verified_success** | **50.6s** | **5,164** | **5,034** | **768** | **10,198** | **2** |
|
|
102
|
+
| | Gemini CLI | completed | 118.4s | 76,079 | 5,092 | 453,239 | 536,583 | 2 |
|
|
103
|
+
| | DeepSeek-TUI | completed | 112.5s | 42,300 | 4,890 | 55,600 | 102,790 | 2 |
|
|
104
|
+
| | Claude Code | completed | 156.7s | 2,821 | 11,781 | 176,187 | 224,947 | 2 |
|
|
105
|
+
| | Codex CLI | completed | 229.0s | 451,983 | 8,479 | 412,416 | 460,462 | 2 |
|
|
320
106
|
|
|
321
|
-
|
|
322
|
-
|
|
107
|
+
### 2. Core Takeaways
|
|
108
|
+
* **98%+ Token Savings:** Swapping generic directory dumps for high-speed local semantic memories gives Phonton a massive token-usage saving.
|
|
109
|
+
* **Microsecond Context Retrieval:** The concurrent HNSW vector index searches 1,000 architectural concepts in just **158.697µs**, yielding highly targeted model prompts.
|
|
110
|
+
* **Grammar Quality Guard:** Preflight checks compile and verify AST structures locally before touching the git tree, guaranteeing syntax safety.
|
|
323
111
|
|
|
324
|
-
|
|
112
|
+
---
|
|
325
113
|
|
|
326
|
-
|
|
327
|
-
phonton goal --prompt-file prompt.md --yes --permission-mode full-access --timeout-seconds 900 --json
|
|
328
|
-
```
|
|
114
|
+
## ⚙️ Quick Start & Setup
|
|
329
115
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
records workspace trust for the current run, and `--permission-mode` keeps the
|
|
333
|
-
automation posture explicit.
|
|
116
|
+
### 1. Configure a Provider
|
|
117
|
+
Phonton looks for credentials inside `~/.phonton/config.toml`. Create it with a minimal configuration:
|
|
334
118
|
|
|
335
|
-
|
|
119
|
+
```toml
|
|
120
|
+
[provider]
|
|
121
|
+
name = "deepseek"
|
|
122
|
+
model = "deepseek-v4-flash"
|
|
336
123
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
phonton review approve latest
|
|
341
|
-
phonton review reject latest
|
|
124
|
+
[provider.keys]
|
|
125
|
+
deepseek = "sk-deepseek-api-key-here"
|
|
126
|
+
anthropic = "sk-ant-api-key-here"
|
|
342
127
|
```
|
|
343
128
|
|
|
344
|
-
|
|
345
|
-
|
|
129
|
+
### 2. Auto-Import Credentials
|
|
130
|
+
Alternatively, automatically import API keys from standard environments:
|
|
346
131
|
```bash
|
|
347
|
-
|
|
348
|
-
phonton
|
|
132
|
+
export DEEPSEEK_API_KEY="sk-..."
|
|
133
|
+
phonton providers import-opencode
|
|
349
134
|
```
|
|
350
135
|
|
|
351
|
-
|
|
352
|
-
|
|
136
|
+
### 3. Verify Configuration
|
|
137
|
+
Ensure everything is set up correctly:
|
|
353
138
|
```bash
|
|
354
|
-
phonton
|
|
355
|
-
phonton memory edit <id> "updated rationale"
|
|
356
|
-
phonton memory pin <id>
|
|
357
|
-
phonton memory delete <id>
|
|
139
|
+
phonton doctor --provider
|
|
358
140
|
```
|
|
359
141
|
|
|
360
|
-
|
|
361
|
-
|
|
142
|
+
### 4. Run the Trust-Loop Demo
|
|
143
|
+
Explore Phonton's evidence trail (GoalContract, AST checking, verification gates) locally without sending remote model calls:
|
|
362
144
|
```bash
|
|
363
|
-
phonton
|
|
364
|
-
phonton extensions install context7
|
|
365
|
-
phonton extensions install https://github.com/phonton-dev/phonton-review-gate-extension
|
|
366
|
-
phonton extensions new ./my-extension skill
|
|
367
|
-
phonton extensions list --json
|
|
368
|
-
phonton extensions doctor --json
|
|
369
|
-
phonton extensions validate --json
|
|
370
|
-
phonton skills list --json
|
|
371
|
-
phonton steering list --json
|
|
372
|
-
phonton mcp list --json
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
## How Phonton Handles Context
|
|
376
|
-
|
|
377
|
-
<p align="center">
|
|
378
|
-
<img src="assets/readme/context-efficiency.png" alt="Diagram contrasting whole repo context with compact context packs and verified diffs">
|
|
379
|
-
</p>
|
|
380
|
-
|
|
381
|
-
Phonton is built around a simple rule: do not blindly dump the whole repo into the model.
|
|
382
|
-
|
|
383
|
-
```mermaid
|
|
384
|
-
flowchart TD
|
|
385
|
-
Repo["Local repo"] --> Index["Source index"]
|
|
386
|
-
Index --> Planner["Planner"]
|
|
387
|
-
Planner --> Pack["Task-specific context"]
|
|
388
|
-
Pack --> Worker["Worker"]
|
|
389
|
-
Worker --> Verify["Verify"]
|
|
390
|
-
Verify --> Review["Review"]
|
|
391
|
-
Review --> Store["Memory and event store"]
|
|
392
|
-
Store --> Planner
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
The intended result is lower context waste and better reviewability. The honest way to prove that is with benchmarks, so this repo includes a benchmark harness instead of hard-coded marketing numbers.
|
|
396
|
-
|
|
397
|
-
## Benchmarks
|
|
398
|
-
|
|
399
|
-
Run the plan benchmark harness:
|
|
400
|
-
|
|
401
|
-
```powershell
|
|
402
|
-
.\scripts\benchmark-plan.ps1
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
It runs repeatable planning tasks, captures estimated Phonton tokens versus the planner's naive baseline, and writes Markdown plus JSON reports to `benchmarks/results/`.
|
|
406
|
-
|
|
407
|
-
Export the latest real OutcomeLedger run:
|
|
408
|
-
|
|
409
|
-
```powershell
|
|
410
|
-
phonton benchmark export --latest --format json
|
|
411
|
-
phonton proof export --latest --format json
|
|
412
|
-
phonton context eval fixtures/context.json --format json
|
|
413
|
-
phonton context diff --indexed --non-indexed fixtures/context.json --format json
|
|
414
|
-
phonton why-tokens --by-source
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
Benchmark exports label token comparability explicitly: `token_usage_source`, `execution_mode`, `provider_call_count`, `token_claim_eligible`, and `benchmark_warnings`. Only verified provider runs with `token_claim_eligible: true` are valid for public token-efficiency claims. Estimated, local-template, mixed, unavailable, and failed runs remain useful product evidence, but they must stay out of headline token comparisons.
|
|
418
|
-
|
|
419
|
-
Read the methodology in [docs/BENCHMARKS.md](docs/BENCHMARKS.md).
|
|
420
|
-
|
|
421
|
-
Important: benchmark output is evidence, not a slogan. Do not claim "X percent savings" publicly until you can reproduce it on multiple real tasks and include the raw report.
|
|
422
|
-
|
|
423
|
-
## Architecture
|
|
424
|
-
|
|
425
|
-
```mermaid
|
|
426
|
-
flowchart TB
|
|
427
|
-
CLI["phonton-cli"] --> Planner["phonton-planner"]
|
|
428
|
-
CLI --> Orchestrator["phonton-orchestrator"]
|
|
429
|
-
Orchestrator --> Worker["phonton-worker"]
|
|
430
|
-
Orchestrator --> Verify["phonton-verify"]
|
|
431
|
-
Worker --> Providers["phonton-providers"]
|
|
432
|
-
Worker --> Context["phonton-context"]
|
|
433
|
-
Context --> Index["phonton-index"]
|
|
434
|
-
Verify --> Diff["phonton-diff"]
|
|
435
|
-
Verify --> Sandbox["phonton-sandbox"]
|
|
436
|
-
Planner --> Memory["phonton-memory"]
|
|
437
|
-
Memory --> Store["phonton-store"]
|
|
438
|
-
Types["phonton-types"] --> CLI
|
|
439
|
-
Types --> Orchestrator
|
|
440
|
-
Types --> Worker
|
|
145
|
+
phonton demo trust-loop
|
|
441
146
|
```
|
|
442
147
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
- `phonton-cli` - terminal UI and user-facing command surface.
|
|
446
|
-
- `phonton-planner` - goal decomposition and plan preview.
|
|
447
|
-
- `phonton-orchestrator` - task state, dependencies, retries, and event flow.
|
|
448
|
-
- `phonton-worker` - model-call loop, tool policy, and patch generation.
|
|
449
|
-
- `phonton-verify` - syntax/type/test/decision checks before review.
|
|
450
|
-
- `phonton-index` - local source indexing and semantic retrieval.
|
|
451
|
-
- `phonton-context` - task-specific context compilation.
|
|
452
|
-
- `phonton-diff` - diff application and rollback support.
|
|
453
|
-
- `phonton-memory` / `phonton-store` - local persistence and decision memory.
|
|
454
|
-
- `phonton-providers` - BYOK provider adapters.
|
|
455
|
-
- `phonton-sandbox` - command execution policy.
|
|
456
|
-
- `phonton-types` - shared domain contracts.
|
|
457
|
-
|
|
458
|
-
## Release Checks
|
|
459
|
-
|
|
460
|
-
Before cutting a release:
|
|
461
|
-
|
|
462
|
-
```powershell
|
|
463
|
-
.\scripts\release-check.ps1
|
|
464
|
-
```
|
|
148
|
+
---
|
|
465
149
|
|
|
466
|
-
|
|
150
|
+
## 🛠️ CLI Command Reference
|
|
467
151
|
|
|
468
|
-
|
|
152
|
+
Execute commands directly from your shell or use the interactive Ratatui TUI dashboard.
|
|
469
153
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
-
|
|
473
|
-
|
|
474
|
-
|
|
154
|
+
* **`phonton`**: Starts the interactive Ratatui terminal UI dashboard for managing tasks, reviewing plans, and executing rollbacks.
|
|
155
|
+
* **`phonton goal "<prompt>"`**: Submit a long-running, multi-step engineering goal in headless mode. Supports `--prompt-file <path>` and `--yes` for automated scripts.
|
|
156
|
+
* **`phonton ask "<question>"`**: Ask a workspace-aware, semantic question. Mentions (e.g. `@src/lib.rs`) are automatically gathered into context.
|
|
157
|
+
* **`phonton diff`**: Export verified unified diffs from completed subtasks in the task store. Supports `--stat` and `--name-only`.
|
|
158
|
+
* **`phonton doctor`**: Run diagnostics on tool installations (git, cargo, npm) and provider key routing.
|
|
159
|
+
* **`phonton extensions`**: Manage extension packs. Install MCP servers, custom profiles, or steering guides.
|
|
160
|
+
* Install an MCP recipe: `phonton extensions install github`
|
|
475
161
|
|
|
476
|
-
|
|
162
|
+
---
|
|
477
163
|
|
|
478
|
-
|
|
164
|
+
## 🏁 Release Channels
|
|
479
165
|
|
|
480
|
-
|
|
|
166
|
+
| Channel | Install Command | Use Case |
|
|
481
167
|
|---|---|---|
|
|
482
|
-
|
|
|
483
|
-
|
|
|
484
|
-
|
|
|
485
|
-
| Windsurf | Agentic IDE workflow | Narrower release scope, explicit local-first positioning |
|
|
486
|
-
| Phonton CLI | Verified local ADE loop for serious repo tasks | Early product, smaller ecosystem, benchmark claims still being built |
|
|
487
|
-
|
|
488
|
-
## Development
|
|
489
|
-
|
|
490
|
-
```bash
|
|
491
|
-
cargo fmt --all -- --check
|
|
492
|
-
cargo clippy --locked --workspace --all-targets -- -D warnings
|
|
493
|
-
cargo test --locked --workspace
|
|
494
|
-
cargo build --locked --release -p phonton-cli
|
|
495
|
-
```
|
|
496
|
-
|
|
497
|
-
Run from source:
|
|
168
|
+
| **Stable** | `cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.17.1 phonton-cli --locked --force` | Best validated release |
|
|
169
|
+
| **Dev** | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch dev phonton-cli --locked --force` | Upcoming release features |
|
|
170
|
+
| **Nightly** | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch nightly phonton-cli --locked --force` | Daily automated snapshots |
|
|
498
171
|
|
|
499
|
-
|
|
500
|
-
cargo run -p phonton-cli -- doctor
|
|
501
|
-
cargo run -p phonton-cli -- plan "add input validation to config loading"
|
|
502
|
-
```
|
|
172
|
+
---
|
|
503
173
|
|
|
504
|
-
## License
|
|
174
|
+
## 📄 License
|
|
505
175
|
|
|
506
176
|
Licensed under either of:
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
- MIT License
|
|
177
|
+
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
|
|
178
|
+
* MIT License ([LICENSE-MIT](LICENSE-MIT))
|
|
510
179
|
|
|
511
180
|
at your option.
|
|
512
|
-
|
|
513
|
-
## Star History
|
|
514
|
-
|
|
515
|
-
[](https://www.star-history.com/?repos=phonton-dev%2Fphonton-cli&type=date&legend=top-left)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phonton-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "Local-first agentic development terminal with context packs, source handles, and verification gates.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/phonton-dev/phonton-cli#readme",
|