@paean-ai/zero-cli 0.7.1 → 0.8.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.
Files changed (5) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +15 -0
  3. package/README.md +61 -10
  4. package/dist/_cli.js +1487 -1584
  5. package/package.json +4 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 a8e
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,15 @@
1
+ Zero CLI
2
+ Copyright (c) 2025-2026 a8e
3
+
4
+ This software is based on Claude Code
5
+ (https://github.com/anthropics/claude-code)
6
+ which is Copyright (c) Anthropic, Inc. and licensed under the MIT License.
7
+
8
+ Portions of this software remain derived from the original Claude Code
9
+ sources. Substantial modifications have been made by a8e, including (but not
10
+ limited to) brand identity, authentication flows, default provider
11
+ configuration, and harness-layer optimizations targeted at third-party
12
+ Anthropic-protocol-compatible LLM API providers.
13
+
14
+ Zero CLI is an independent project and is not affiliated with, endorsed by,
15
+ or sponsored by Anthropic, Inc.
package/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  > *Start from zero. Ship from anywhere.*
4
4
 
5
- A geometric, multi-model AI coding agent for the terminal — concentric, focused, and at home in any shell. Talk to Claude, Gemini, GLM, Qwen, DeepSeek and more from a single, brand-distinct CLI marked by the `⌬` Zero glyph.
5
+ A geometric, multi-model AI coding agent for the terminal — concentric, focused, and at home in any shell. Drives Anthropic-protocol-compatible LLM APIs (Anthropic Claude, Zhipu GLM, DeepSeek, Volcengine, Alibaba Qwen, Moonshot, and more) from a single, brand-distinct CLI marked by the `⌬` Zero glyph.
6
+
7
+ Zero CLI focuses on optimizing the harness layer (context window management, token budgeting, request headers, timeouts, agent runtime) for *third-party* Anthropic-protocol providers. For the official Anthropic Claude models, use Anthropic's official Claude Code — that's where they're tuned best.
6
8
 
7
9
  ## Install
8
10
 
@@ -43,7 +45,7 @@ zero auth logout
43
45
 
44
46
  ## `zero provider` — Third-party API provider
45
47
 
46
- Use this when you want Zero to talk to a non-Paean, Anthropic-compatible endpoint (e.g. z.ai / GLM Coding Plan). All commands are scriptable — no TUI required.
48
+ Use this when you want Zero to talk to a non-Paean, Anthropic-protocol-compatible endpoint. Three presets ship out of the box: **z.ai (GLM)**, **Volcengine (Ark)**, **DeepSeek**. All commands are scriptable — no TUI required.
47
49
 
48
50
  ```bash
49
51
  # Show currently active provider (if any)
@@ -53,8 +55,10 @@ zero provider status --json
53
55
  # List available provider presets
54
56
  zero provider list
55
57
 
56
- # Configure z.ai (GLM Coding Plan)
57
- zero provider set zai --api-key <YOUR_GLM_API_KEY>
58
+ # Configure a preset (writes the API key to userSettings + cache)
59
+ zero provider set zai --api-key <YOUR_GLM_API_KEY>
60
+ zero provider set volcengine --api-key <YOUR_ARK_API_KEY>
61
+ zero provider set deepseek --api-key <YOUR_DEEPSEEK_API_KEY>
58
62
 
59
63
  # Optional: override model IDs per tier
60
64
  zero provider set zai --api-key <KEY> \
@@ -66,16 +70,63 @@ zero provider clear
66
70
 
67
71
  The API key may also be supplied via the `ZERO_PROVIDER_API_KEY` environment variable (useful in CI). Restart `zero` after changing the provider for the new config to take effect.
68
72
 
69
- ### z.ai (GLM Coding Plan) defaults
73
+ ### Quick switch between providers (cached credentials)
74
+
75
+ Once a preset has been configured at least once with `zero provider set`, its credentials are cached in `userSettings.providerCache`. You can then jump between providers without retyping the API key:
76
+
77
+ ```bash
78
+ # Re-activate a preset from cache (no --api-key needed)
79
+ zero provider use zai
80
+ zero provider use volcengine
81
+ zero provider use deepseek
82
+
83
+ # Inspect what's cached (API keys are masked)
84
+ zero provider cache list
85
+ zero provider cache list --json
86
+
87
+ # Evict one entry, or wipe the whole cache
88
+ zero provider cache clear deepseek
89
+ zero provider cache clear
90
+ ```
91
+
92
+ `zero provider use <preset>` fails fast if no cache entry exists — you'll be told to run `zero provider set` first.
93
+
94
+ ### Preset defaults
95
+
96
+ #### z.ai (GLM Coding Plan)
70
97
 
71
- | Tier | Model | Notes |
72
- |------|-------|-------|
73
- | **opus** (default) | `GLM-5.1` | Daily driver when the preset is active |
74
- | **sonnet** | `GLM-4.7` | Switch with `/model sonnet` |
75
- | **haiku** | `GLM-4.5-Air` | Fast/cheap tier |
98
+ | Tier | Model | Context |
99
+ |------|-------|---------|
100
+ | **opus** (default) | `GLM-5.1` | 200K |
101
+ | **sonnet** | `GLM-4.7` | 200K |
102
+ | **haiku** | `GLM-4.5-Air` | 128K |
76
103
 
77
104
  Get an API key at https://bigmodel.cn/usercenter/proj-mgmt/apikeys.
78
105
 
106
+ #### Volcengine (火山引擎 Ark Coding Plan)
107
+
108
+ | Tier | Model | Context |
109
+ |------|-------|---------|
110
+ | **opus** (default) | `ark-code-latest` | 256K |
111
+ | **sonnet** | `ark-code-latest` | 256K |
112
+ | **haiku** | `ark-code-latest` | 256K |
113
+
114
+ Volcengine's coding endpoint serves a single unified model (`ark-code-latest`) across all tiers. Pin to a specific snapshot with `zero provider set volcengine --opus <snapshot-id>` or via the wizard.
115
+
116
+ Get an API key at https://console.volcengine.com/ark.
117
+
118
+ #### DeepSeek (Official)
119
+
120
+ | Tier | Model | Context |
121
+ |------|-------|---------|
122
+ | **opus** | `deepseek-v4-pro` | 1M |
123
+ | **sonnet** (default) | `deepseek-v4-flash` | 1M |
124
+ | **haiku** | `deepseek-v4-flash` | 1M |
125
+
126
+ Two-model lineup: `pro` is the flagship (opus tier), `flash` is the daily driver (sonnet/haiku). The default tier is `sonnet`, mirroring DeepSeek's own pricing-page recommendation.
127
+
128
+ Get an API key at https://platform.deepseek.com/api_keys.
129
+
79
130
  ## Model Selection
80
131
 
81
132
  Zero maps three capability tiers — **opus** (flagship), **sonnet** (standard), and **haiku** (fast) — to any supported model. `zero provider set` writes the right env vars for you; to override manually: