zarz 0.3.5-alpha → 0.5.1-alpha
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/CHANGELOG.md +25 -0
- package/README.md +58 -12
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.5.0-ALPHA
|
|
4
|
+
|
|
5
|
+
### New Native tooling
|
|
6
|
+
- Added native `read_file`, `list_dir`, `grep_files`, and `apply_patch` handlers; the AI no longer needs to shell out to `bash` for routine context gathering.
|
|
7
|
+
- `apply_patch` now applies Zarz-style diffs directly (Add/Update/Delete blocks) with safe path resolution.
|
|
8
|
+
- Tool invocations log like “• Explored…” summaries so the terminal stays concise while OpenAI still receives the full output.
|
|
9
|
+
|
|
10
|
+
### Prompt and UX cleanup
|
|
11
|
+
- Updated README.md to describe the new tool stack and exploration logs.
|
|
12
|
+
|
|
13
|
+
### Codex authentication
|
|
14
|
+
- Added full ChatGPT OAuth wizard, including PKCE, `originator=zarz_cli`, and first-party success page branded “Signed in to ZarzCLI”.
|
|
15
|
+
- Stored access/refresh/id tokens plus `project_id`, `organization_id`, and `chatgpt_account_id` in `~/.zarz/config.toml` with automatic refresh before every run.
|
|
16
|
+
- Exported Codex environment variables (`OPENAI_API_URL`, `OpenAI-Beta`, `originator`, etc.) so GPT‑5 presets transparently call the ChatGPT backend without requiring an API key.
|
|
17
|
+
|
|
18
|
+
### Responses API compatibility
|
|
19
|
+
- OpenAI provider now detects when Codex headers are required, converts system prompts into Codex “instructions”, filters unsupported roles, and parses SSE responses with encrypted reasoning content.
|
|
20
|
+
- Removed legacy tool-call throttling and forced filler replies—models can keep invoking tools with clean, autonomous logs.
|
|
21
|
+
|
|
22
|
+
### User-facing polish
|
|
23
|
+
- login-success HTML (with ZarzCLI branding) for a consistent OAuth experience.
|
|
24
|
+
- Documented the new flow, GPT‑5 presets, and References workspace inside `README.md`.
|
|
25
|
+
- Ignored `References/` in git so upstream mirrors don’t pollute commits.
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ZarzCLI
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/zarz)
|
|
4
|
-
[](https://www.npmjs.com/package/zarz)
|
|
5
5
|
[](https://github.com/zarzet/ZarzCLI/releases)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
@@ -12,10 +12,11 @@
|
|
|
12
12
|
### Core Capabilities
|
|
13
13
|
- **Interactive Chat** - Real-time streaming responses with multiple AI models
|
|
14
14
|
- **Multi-Provider Support** - Claude (Anthropic), GPT (OpenAI), and GLM (Z.AI)
|
|
15
|
-
- **
|
|
15
|
+
- **Built-In Tools** - `read_file`, `list_dir`, `grep_files`, and `apply_patch` run natively
|
|
16
16
|
- **File Operations** - Direct file editing, creation, and management
|
|
17
17
|
- **Smart Context** - Automatic symbol search and relevant file detection
|
|
18
18
|
- **MCP Support** - Model Context Protocol integration for extended capabilities
|
|
19
|
+
- **ChatGPT OAuth (Codex backend)** - `/login` signs into ChatGPT Plus/Pro, tokens auto-refresh, and GPT‑5 presets call the same Codex endpoint as OpenAI’s CLI
|
|
19
20
|
- **Auto Update** - Automatic update checks and notifications for new versions
|
|
20
21
|
- **Cross-Platform** - Works seamlessly on Windows, Linux, and macOS
|
|
21
22
|
|
|
@@ -28,14 +29,27 @@ ZarzCLI v0.3.4+ includes autonomous bash tool execution, allowing AI models to:
|
|
|
28
29
|
- **Navigate structure**: `ls -la src/` or `tree -L 2`
|
|
29
30
|
- **Check git**: `git log --oneline -10` or `git diff`
|
|
30
31
|
|
|
31
|
-
The AI automatically decides when to execute commands for better context - no manual `/run` needed!
|
|
32
|
-
|
|
33
32
|
### User Experience
|
|
34
33
|
- **Status Line** - Shows current mode and notifications
|
|
35
34
|
- **Double Ctrl+C** - Confirmation before exit (prevents accidental exits)
|
|
36
35
|
- **Colored Diff Display** - Beautiful file change visualization with context
|
|
36
|
+
- **Exploration Logs** - File reads, directory listings, and searches are summarized concisely (no more full file dumps unless requested)
|
|
37
37
|
- **Persistent Sessions** - Resume previous conversations anytime
|
|
38
38
|
|
|
39
|
+
### Built-In Tools
|
|
40
|
+
ZarzCLI now has tool set:
|
|
41
|
+
|
|
42
|
+
| Tool | Description |
|
|
43
|
+
|------|-------------|
|
|
44
|
+
| `read_file` | Reads files with optional line slices; stdout just shows a summary |
|
|
45
|
+
| `list_dir` | Returns file/dir counts with a short preview instead of dumping everything |
|
|
46
|
+
| `grep_files` | Greps inside a file (simple substring match) |
|
|
47
|
+
| `apply_patch` | Applies Zarz-style `*** Begin Patch` diffs directly on disk |
|
|
48
|
+
|
|
49
|
+
These tools run natively in Rust, so the terminal output is clean and the model still receives full context in the background.
|
|
50
|
+
|
|
51
|
+
> **No more artificial tool-call limits** – ZarzCLI lets the agent keep digging until it’s satisfied. The old “Stopping tool execution after 3 calls” guardrails have been removed.
|
|
52
|
+
|
|
39
53
|
## Installation
|
|
40
54
|
|
|
41
55
|
### Via NPM (Recommended)
|
|
@@ -99,8 +113,20 @@ zarz --model claude-sonnet-4-5-20250929
|
|
|
99
113
|
# Manage configuration
|
|
100
114
|
zarz config --show # Show current config
|
|
101
115
|
zarz config --reset # Reconfigure API keys
|
|
116
|
+
zarz config --login-chatgpt # Sign in via ChatGPT OAuth to fetch an OpenAI key
|
|
102
117
|
```
|
|
103
118
|
|
|
119
|
+
### ChatGPT OAuth (Codex-compatible)
|
|
120
|
+
|
|
121
|
+
When you run `zarz config --login-chatgpt` or `/login` → “Sign in with ChatGPT”, ZarzCLI mirrors the official Codex CLI flow:
|
|
122
|
+
|
|
123
|
+
1. OpenAI’s OAuth screen appears (PKCE + `originator=zarz_cli`).
|
|
124
|
+
2. After you approve, ZarzCLI shows the **“Signed in to ZarzCLI”** success page.
|
|
125
|
+
3. The CLI stores the returned `access_token`, `refresh_token`, `id_token`, plus `project_id`, `organization_id`, and `chatgpt_account_id` in `~/.zarz/config.toml`.
|
|
126
|
+
4. Before every run, ZarzCLI automatically refreshes the token if it’s near expiry and exports
|
|
127
|
+
|
|
128
|
+
All GPT‑5 presets then hit the ChatGPT Codex backend (`OpenAI-Beta: responses=experimental`, `originator: codex_cli_rs`) with the official Codex instructions so behavior matches OpenAI’s CLI exactly.
|
|
129
|
+
|
|
104
130
|
## Available Commands
|
|
105
131
|
|
|
106
132
|
Once inside the interactive chat:
|
|
@@ -116,6 +142,7 @@ Once inside the interactive chat:
|
|
|
116
142
|
| `/context <query>` | Find relevant files for a query |
|
|
117
143
|
| `/files` | List currently loaded files |
|
|
118
144
|
| `/model <name>` | Switch to a different AI model |
|
|
145
|
+
| `/login` | Open auth wizard (API keys or ChatGPT OAuth) |
|
|
119
146
|
| `/mcp` | Show MCP servers and available tools |
|
|
120
147
|
| `/resume` | Resume a previous chat session |
|
|
121
148
|
| `/clear` | Clear conversation history |
|
|
@@ -127,17 +154,26 @@ Once inside the interactive chat:
|
|
|
127
154
|
Best for coding tasks and autonomous agents:
|
|
128
155
|
- `claude-sonnet-4-5-20250929` (Latest, most capable)
|
|
129
156
|
- `claude-haiku-4-5` (Fast, cost-effective)
|
|
130
|
-
- `claude-opus-4-
|
|
131
|
-
|
|
132
|
-
### OpenAI GPT
|
|
133
|
-
|
|
134
|
-
- `gpt-5-codex`
|
|
135
|
-
- `gpt-
|
|
136
|
-
- `gpt-
|
|
157
|
+
- `claude-opus-4-1` (Most powerful)
|
|
158
|
+
|
|
159
|
+
### OpenAI GPT (ChatGPT OAuth)
|
|
160
|
+
Run `zarz config --login-chatgpt` to fetch an OpenAI key, then choose any of these GPT‑5 variants optimized for OAuth access:
|
|
161
|
+
- `gpt-5-codex` – Default coding agent
|
|
162
|
+
- `gpt-5-codex-low` – Lower reasoning effort
|
|
163
|
+
- `gpt-5-codex-medium` – Balanced reasoning depth
|
|
164
|
+
- `gpt-5-codex-high` – High reasoning effort with detailed summaries
|
|
165
|
+
- `gpt-5-minimal` – Minimal reasoning, terse responses
|
|
166
|
+
- `gpt-5-low` – Low-effort general GPT-5
|
|
167
|
+
- `gpt-5-medium` – Balanced GPT-5 experience
|
|
168
|
+
- `gpt-5-high` – High reasoning-effort GPT-5
|
|
169
|
+
- `gpt-5-mini` – Lightweight GPT-5 for quick tasks
|
|
170
|
+
- `gpt-5-nano` – Fastest GPT-5 tier with minimal reasoning
|
|
171
|
+
|
|
172
|
+
When you run `/model gpt-5-*`, ZarzCLI now prompts you to pick a **reasoning effort** (Auto, Minimal, Low, Medium, High). The choice is saved to `~/.zarz/config.toml` and applied to every Responses API call along with `text.verbosity = "medium"` and `include = ["reasoning.encrypted_content"]`, matching the Codex OAuth defaults.
|
|
137
173
|
|
|
138
174
|
### GLM (Z.AI)
|
|
139
175
|
Cost-effective coding with 200K context window:
|
|
140
|
-
- `glm-
|
|
176
|
+
- `glm-4.6` ($3/month subscription)
|
|
141
177
|
- 200,000 token context window
|
|
142
178
|
- Specialized for coding tasks
|
|
143
179
|
|
|
@@ -185,6 +221,16 @@ ZarzCLI automatically checks for updates on startup and notifies you when a new
|
|
|
185
221
|
|
|
186
222
|
> **Note**: Rust is **NOT required** for installation. Pre-built binaries are automatically downloaded for your platform (Windows, macOS, Linux).
|
|
187
223
|
|
|
224
|
+
### References workspace
|
|
225
|
+
|
|
226
|
+
Need to keep upstream repos (Codex, plugins, docs) handy? Drop them into `References/`:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
git clone https://github.com/openai/codex References/codex-main
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
The folder is `.gitignore`d, so you can mirror large sources locally without polluting commits. ZarzCLI’s Codex instructions and login success page were generated from those references.
|
|
233
|
+
|
|
188
234
|
## Contributing
|
|
189
235
|
|
|
190
236
|
Contributions are welcome! ZarzCLI is now open source under MIT license.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zarz",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1-alpha",
|
|
4
4
|
"description": "Fast AI coding assistant for terminal built with Rust",
|
|
5
5
|
"main": "bin/zarz.js",
|
|
6
6
|
"bin": {
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"files": [
|
|
42
42
|
"bin/",
|
|
43
43
|
"scripts/",
|
|
44
|
-
"README.md"
|
|
44
|
+
"README.md",
|
|
45
|
+
"CHANGELOG.md"
|
|
45
46
|
],
|
|
46
47
|
"dependencies": {},
|
|
47
48
|
"devDependencies": {},
|