@paean-ai/zero-cli 0.5.4 → 0.5.6

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 (3) hide show
  1. package/README.md +72 -24
  2. package/dist/_cli.js +1400 -1376
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
- # Zero CLI
1
+ # Zero CLI
2
2
 
3
- AI coding agent for the terminal. Multi-model support with Claude, Gemini, GLM, Qwen, DeepSeek and more.
3
+ > *Start from zero. Ship from anywhere.*
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.
4
6
 
5
7
  ## Install
6
8
 
@@ -14,30 +16,74 @@ npm install -g @paean-ai/zero-cli
14
16
 
15
17
  ## Quick Start
16
18
 
19
+ Zero supports two backends, picked at the CLI level without opening the TUI:
20
+
17
21
  ```bash
18
- # Login to Paean AI
22
+ # 1) Paean AI (default, recommended)
19
23
  zero login
20
24
 
21
- # Start a session
22
- zero
25
+ # 2) Third-party provider (e.g. z.ai's GLM Coding Plan)
26
+ zero provider set zai --api-key <YOUR_GLM_API_KEY>
27
+ ```
28
+
29
+ Then start a session:
23
30
 
24
- # Or run a one-shot prompt
25
- zero -p "explain this codebase"
31
+ ```bash
32
+ zero # interactive
33
+ zero -p "explain this repo" # one-shot
26
34
  ```
27
35
 
28
- ## Model Selection
36
+ ## `zero login` — Paean AI account
29
37
 
30
- Zero maps three capability tiers — **opus** (flagship), **sonnet** (standard), and **haiku** (fast) — to any supported model. Configure via environment variables:
38
+ ```bash
39
+ zero login # browser-based OAuth
40
+ zero auth status # check who you're logged in as
41
+ zero auth logout
42
+ ```
43
+
44
+ ## `zero provider` — Third-party API provider
45
+
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.
31
47
 
32
48
  ```bash
33
- # Use GLM-5 as the flagship model
34
- export ANTHROPIC_DEFAULT_OPUS_MODEL=glm-5
49
+ # Show currently active provider (if any)
50
+ zero provider
51
+ zero provider status --json
52
+
53
+ # List available provider presets
54
+ zero provider list
35
55
 
36
- # Use Gemini 3 Flash as the standard model
37
- export ANTHROPIC_DEFAULT_SONNET_MODEL=gemini-3-flash-preview
56
+ # Configure z.ai (GLM Coding Plan)
57
+ zero provider set zai --api-key <YOUR_GLM_API_KEY>
38
58
 
39
- # Use Gemini 3.1 Flash Lite as the fast model
40
- export ANTHROPIC_DEFAULT_HAIKU_MODEL=gemini-3.1-flash-lite-preview
59
+ # Optional: override model IDs per tier
60
+ zero provider set zai --api-key <KEY> \
61
+ --opus GLM-5.1 --sonnet GLM-4.7 --haiku GLM-4.5-Air
62
+
63
+ # Switch back to Paean.ai
64
+ zero provider clear
65
+ ```
66
+
67
+ 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
+
69
+ ### z.ai (GLM Coding Plan) defaults
70
+
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 |
76
+
77
+ Get an API key at https://bigmodel.cn/usercenter/proj-mgmt/apikeys.
78
+
79
+ ## Model Selection
80
+
81
+ 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:
82
+
83
+ ```bash
84
+ export ZERO_CLI_DEFAULT_OPUS_MODEL=GLM-5.1
85
+ export ZERO_CLI_DEFAULT_SONNET_MODEL=GLM-4.7
86
+ export ZERO_CLI_DEFAULT_HAIKU_MODEL=GLM-4.5-Air
41
87
  ```
42
88
 
43
89
  Or switch models in-session with `/model`.
@@ -50,9 +96,9 @@ Or switch models in-session with `/model`.
50
96
  | `claude-opus-4-5` | Claude (Vertex AI) | Flagship |
51
97
  | `gemini-3-flash-preview` | Google AI Studio | Standard |
52
98
  | `gemini-3.1-flash-lite-preview` | Google AI Studio | Fast |
53
- | `glm-5` | ZhipuAI (DashScope) | Flagship |
54
- | `glm-4.7` | ZhipuAI (DashScope) | Flagship |
55
- | `glm-4.5-air` | ZhipuAI (DashScope) | Fast |
99
+ | `GLM-5.1` | z.ai / ZhipuAI | Flagship |
100
+ | `GLM-4.7` | z.ai / ZhipuAI | Standard |
101
+ | `GLM-4.5-Air` | z.ai / ZhipuAI | Fast |
56
102
  | `qwen3-max` | Alibaba (DashScope) | Flagship |
57
103
  | `qwen-plus` | Alibaba (DashScope) | Standard |
58
104
  | `deepseek-v3.2` | DeepSeek (DashScope) | Standard |
@@ -65,12 +111,14 @@ Zero stores config in `~/.zero/`. Key environment variables:
65
111
 
66
112
  | Variable | Description |
67
113
  |----------|-------------|
68
- | `ANTHROPIC_API_KEY` | API key (Paean AI or Anthropic) |
69
- | `ANTHROPIC_BASE_URL` | API base URL (defaults to Paean AI) |
70
- | `ANTHROPIC_MODEL` | Override the default model |
71
- | `ANTHROPIC_DEFAULT_OPUS_MODEL` | Model for the "opus" tier |
72
- | `ANTHROPIC_DEFAULT_SONNET_MODEL` | Model for the "sonnet" tier |
73
- | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | Model for the "haiku" tier |
114
+ | `ZERO_CLI_AUTH_TOKEN` | API key for the configured provider |
115
+ | `ZERO_CLI_BASE_URL` | API base URL (defaults to Paean AI) |
116
+ | `ZERO_CLI_DEFAULT_OPUS_MODEL` | Model for the "opus" (flagship) tier |
117
+ | `ZERO_CLI_DEFAULT_SONNET_MODEL` | Model for the "sonnet" (standard) tier |
118
+ | `ZERO_CLI_DEFAULT_HAIKU_MODEL` | Model for the "haiku" (fast) tier |
119
+ | `ZERO_PROVIDER_API_KEY` | Fallback key read by `zero provider set` in CI |
120
+
121
+ Legacy `ANTHROPIC_*` equivalents are still honored but the `ZERO_CLI_*` names are preferred.
74
122
 
75
123
  ## License
76
124