phonton-cli 0.2.1 → 0.4.0
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 +32 -5
- package/npm/bin/phonton.js +9 -1
- package/npm/test-wrapper.js +41 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.4.0</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<strong>Verified code changes with repo memory.</strong><br>
|
|
@@ -12,7 +12,7 @@
|
|
|
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.4.0-6c63ff">
|
|
16
16
|
<img alt="license" src="https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue">
|
|
17
17
|
<img alt="status" src="https://img.shields.io/badge/status-public_alpha-f97316">
|
|
18
18
|
</p>
|
|
@@ -55,8 +55,12 @@ That gives Phonton a different shape from an IDE assistant or a terminal chatbot
|
|
|
55
55
|
- `phonton doctor` setup diagnostics for config, provider key, store, trust, git, cargo, and Nexus config.
|
|
56
56
|
- `phonton plan` preview for task DAGs before edits happen.
|
|
57
57
|
- `phonton review` surfaces for verified diff review payloads, approvals, rejections, and rollback.
|
|
58
|
+
- TUI goal prompts can mention workspace files and images with `@path`; text files become bounded context and image metadata/payloads flow to compatible providers.
|
|
59
|
+
- Review-ready runs now show a handoff receipt in the TUI and persist a minimal outcome ledger for history/review evidence.
|
|
58
60
|
- `phonton memory` commands for inspecting, editing, deleting, pinning, and unpinning local decision memory.
|
|
59
|
-
-
|
|
61
|
+
- `phonton extensions` commands for inspecting resolved skills, steering, MCP servers, profiles, conflicts, and diagnostics.
|
|
62
|
+
- `phonton mcp` commands for listing configured servers and lazily approving tool discovery or tool calls.
|
|
63
|
+
- BYOK provider adapters for Anthropic, OpenAI, OpenRouter, Gemini, Cloudflare Workers AI, AgentRouter, DeepSeek, xAI/Grok, Groq, Together, Ollama, and custom OpenAI-compatible endpoints. `phonton doctor --provider` verifies your configured provider by checking model discovery and a tiny completion call through the same adapter used for runs.
|
|
60
64
|
- Local store, memory, planner, worker, diff, sandbox, verification, and orchestration crates.
|
|
61
65
|
- Semantic indexing behind the CLI stack for repo-aware workflows.
|
|
62
66
|
|
|
@@ -98,7 +102,7 @@ Windows PowerShell:
|
|
|
98
102
|
Direct Cargo install:
|
|
99
103
|
|
|
100
104
|
```bash
|
|
101
|
-
cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.
|
|
105
|
+
cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.4.0 phonton-cli --locked --force
|
|
102
106
|
```
|
|
103
107
|
|
|
104
108
|
Check the install:
|
|
@@ -114,7 +118,7 @@ Phonton uses GitHub branches and releases as install channels:
|
|
|
114
118
|
|
|
115
119
|
| Channel | Install | Use when |
|
|
116
120
|
|---|---|---|
|
|
117
|
-
| Stable | `cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.
|
|
121
|
+
| Stable | `cargo install --git https://github.com/phonton-dev/phonton-cli --tag v0.4.0 phonton-cli --locked --force` | You want the best validated public alpha |
|
|
118
122
|
| Dev | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch dev phonton-cli --locked --force` | You want next-release integration changes |
|
|
119
123
|
| 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 |
|
|
120
124
|
| Main | `cargo install --git https://github.com/phonton-dev/phonton-cli --branch main phonton-cli --locked --force` | You want the current release branch tip |
|
|
@@ -164,14 +168,24 @@ export ANTHROPIC_API_KEY="..."
|
|
|
164
168
|
export OPENAI_API_KEY="..."
|
|
165
169
|
export GEMINI_API_KEY="..."
|
|
166
170
|
export OPENROUTER_API_KEY="..."
|
|
171
|
+
export CLOUDFLARE_API_TOKEN="..."
|
|
172
|
+
export CLOUDFLARE_ACCOUNT_ID="..."
|
|
167
173
|
```
|
|
168
174
|
|
|
169
175
|
Windows PowerShell:
|
|
170
176
|
|
|
171
177
|
```powershell
|
|
172
178
|
$env:GEMINI_API_KEY = "..."
|
|
179
|
+
$env:CLOUDFLARE_API_TOKEN = "..."
|
|
180
|
+
$env:CLOUDFLARE_ACCOUNT_ID = "..."
|
|
173
181
|
```
|
|
174
182
|
|
|
183
|
+
Cloudflare Workers AI uses the OpenAI-compatible endpoint. Set
|
|
184
|
+
`name = "cloudflare"` and the default model is `@cf/moonshotai/kimi-k2.6`.
|
|
185
|
+
Set `provider.account_id` or `CLOUDFLARE_ACCOUNT_ID` for the Workers AI account.
|
|
186
|
+
`provider.base_url` remains available for a full
|
|
187
|
+
`https://api.cloudflare.com/client/v4/accounts/<id>/ai/v1` base URL override.
|
|
188
|
+
|
|
175
189
|
Check the install:
|
|
176
190
|
|
|
177
191
|
```bash
|
|
@@ -190,6 +204,8 @@ phonton doctor Check config, store, trust, git, cargo, and Nexus
|
|
|
190
204
|
phonton plan <goal> Preview the task DAG without changing files
|
|
191
205
|
phonton review Show verified diff review payloads
|
|
192
206
|
phonton memory list Inspect local decision memory
|
|
207
|
+
phonton extensions list Inspect skills, steering, MCP servers, and profiles
|
|
208
|
+
phonton mcp list Show configured MCP servers without starting them
|
|
193
209
|
phonton config path Print the resolved config file path
|
|
194
210
|
phonton config show Dump resolved config as TOML
|
|
195
211
|
phonton version Print version
|
|
@@ -218,6 +234,17 @@ phonton memory pin <id>
|
|
|
218
234
|
phonton memory delete <id>
|
|
219
235
|
```
|
|
220
236
|
|
|
237
|
+
Extension visibility:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
phonton extensions list --json
|
|
241
|
+
phonton extensions doctor --json
|
|
242
|
+
phonton extensions skills --json
|
|
243
|
+
phonton extensions steering --json
|
|
244
|
+
phonton extensions mcp --json
|
|
245
|
+
phonton mcp list --json
|
|
246
|
+
```
|
|
247
|
+
|
|
221
248
|
## How Phonton Handles Context
|
|
222
249
|
|
|
223
250
|
<p align="center">
|
package/npm/bin/phonton.js
CHANGED
|
@@ -5,13 +5,21 @@ const path = require("path");
|
|
|
5
5
|
const { spawn, spawnSync } = require("child_process");
|
|
6
6
|
|
|
7
7
|
const binaryName = process.platform === "win32" ? "phonton.exe" : "phonton";
|
|
8
|
-
const
|
|
8
|
+
const configuredBinary = process.env.PHONTON_BINARY || process.env.PHONTON_CLI_BINARY;
|
|
9
|
+
const binaryPath = configuredBinary
|
|
10
|
+
? path.resolve(configuredBinary)
|
|
11
|
+
: path.join(__dirname, "..", "vendor", binaryName);
|
|
9
12
|
|
|
10
13
|
function ensureBinary() {
|
|
11
14
|
if (fs.existsSync(binaryPath)) {
|
|
12
15
|
return;
|
|
13
16
|
}
|
|
14
17
|
|
|
18
|
+
if (configuredBinary) {
|
|
19
|
+
console.error(`Configured Phonton binary does not exist: ${binaryPath}`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
15
23
|
const installScript = path.join(__dirname, "..", "install.js");
|
|
16
24
|
const result = spawnSync(process.execPath, [installScript], { stdio: "inherit" });
|
|
17
25
|
if (result.status !== 0 || !fs.existsSync(binaryPath)) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const { spawnSync } = require("child_process");
|
|
6
|
+
|
|
7
|
+
const root = path.resolve(__dirname, "..");
|
|
8
|
+
const packageJson = require(path.join(root, "package.json"));
|
|
9
|
+
const binaryName = process.platform === "win32" ? "phonton.exe" : "phonton";
|
|
10
|
+
const candidates = [
|
|
11
|
+
path.join(root, "target", "release", binaryName),
|
|
12
|
+
path.join(root, "target", "debug", binaryName),
|
|
13
|
+
];
|
|
14
|
+
const binary = candidates.find((candidate) => fs.existsSync(candidate));
|
|
15
|
+
|
|
16
|
+
if (!binary) {
|
|
17
|
+
console.error("No built Phonton binary found under target/release or target/debug.");
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const result = spawnSync(process.execPath, [path.join(root, "npm", "bin", "phonton.js"), "version"], {
|
|
22
|
+
cwd: root,
|
|
23
|
+
encoding: "utf8",
|
|
24
|
+
env: {
|
|
25
|
+
...process.env,
|
|
26
|
+
PHONTON_BINARY: binary,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
process.stdout.write(result.stdout || "");
|
|
31
|
+
process.stderr.write(result.stderr || "");
|
|
32
|
+
|
|
33
|
+
if (result.status !== 0) {
|
|
34
|
+
process.exit(result.status || 1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const expected = `phonton ${packageJson.version}`;
|
|
38
|
+
if (!result.stdout.includes(expected)) {
|
|
39
|
+
console.error(`Expected npm wrapper to report ${expected}.`);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phonton-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
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",
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"postinstall": "node npm/install.js",
|
|
20
|
-
"test:npm-wrapper": "node npm/
|
|
20
|
+
"test:npm-wrapper": "node npm/test-wrapper.js"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"npm/bin/phonton.js",
|
|
24
24
|
"npm/install.js",
|
|
25
|
+
"npm/test-wrapper.js",
|
|
25
26
|
"README.md",
|
|
26
27
|
"LICENSE-MIT",
|
|
27
28
|
"LICENSE-APACHE"
|