@paean-ai/zero-cli 0.5.4 → 0.5.5

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