@hanzo/dev 3.0.11 → 3.0.13
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 +493 -36
- package/bin/{dev.js → coder.js} +95 -38
- package/bin/codex.js +197 -0
- package/package.json +11 -11
- package/postinstall.js +501 -442
- package/scripts/preinstall.js +5 -5
- package/scripts/windows-cleanup.ps1 +7 -6
package/README.md
CHANGED
|
@@ -1,59 +1,516 @@
|
|
|
1
|
-
<
|
|
2
|
-
<p align="center"><strong>Codex CLI</strong> is a coding agent from OpenAI that runs locally on your computer.
|
|
3
|
-
<p align="center">
|
|
4
|
-
<img src="https://github.com/openai/codex/blob/main/.github/codex-cli-splash.png" alt="Codex CLI splash" width="80%" />
|
|
5
|
-
</p>
|
|
6
|
-
</br>
|
|
7
|
-
If you want Codex in your code editor (VS Code, Cursor, Windsurf), <a href="https://developers.openai.com/codex/ide">install in your IDE.</a>
|
|
8
|
-
</br>If you are looking for the <em>cloud-based agent</em> from OpenAI, <strong>Codex Web</strong>, go to <a href="https://chatgpt.com/codex">chatgpt.com/codex</a>.</p>
|
|
1
|
+
<img src="docs/images/every-logo.png" alt="Hanzo Dev Logo" width="400">
|
|
9
2
|
|
|
10
|
-
|
|
3
|
+
 
|
|
4
|
+
|
|
5
|
+
**Hanzo Dev** is a fast, native coding agent for your terminal. Built in Rust on top of `openai/codex`, it adds a full-featured chat TUI, multi-agent orchestration, browser automation, theming, and CLI agent piping — while syncing upstream improvements automatically.
|
|
6
|
+
|
|
7
|
+
 
|
|
8
|
+
|
|
9
|
+
## Highlights (v0.6.61)
|
|
10
|
+
|
|
11
|
+
- **Multi-agent orchestration** — `/plan`, `/solve`, `/code` coordinate Claude, Gemini, Qwen, and GPT simultaneously. Race for speed or reach consensus across models.
|
|
12
|
+
- **Auto Drive** — Hand off complex tasks; the agent coordinates sub-agents, approvals, and recovery autonomously.
|
|
13
|
+
- **Auto Review** — Background ghost-commit watcher reviews code in a separate worktree without blocking your flow.
|
|
14
|
+
- **CLI agent piping** — Spawn and orchestrate `claude`, `gemini`, `qwen`, and custom agents as sub-processes. Works alongside Claude Code, Gemini CLI, and Qwen Code.
|
|
15
|
+
- **Rich chat TUI** — Zen mode, 20+ themes, streaming markdown, syntax highlighting, session management, and card-based activity history.
|
|
16
|
+
- **Browser integration** — CDP support, headless browsing, screenshots captured inline.
|
|
17
|
+
- **MCP support** — 260+ tools via Model Context Protocol. Extend with filesystem, databases, APIs, or custom servers.
|
|
18
|
+
- **Skills system** — Dynamic tool injection with live reload. Define custom skills in `.agents/skills/`.
|
|
19
|
+
- **Upstream sync** — Automated 30-minute polling merges OpenAI Codex improvements while preserving Hanzo features.
|
|
20
|
+
|
|
21
|
+
[Full changelog](CHANGELOG.md) | [Release notes](docs/release-notes/RELEASE_NOTES.md)
|
|
22
|
+
|
|
23
|
+
 
|
|
11
24
|
|
|
12
25
|
## Quickstart
|
|
13
26
|
|
|
14
|
-
###
|
|
27
|
+
### Install & run
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Via npm (installs native Rust binary)
|
|
31
|
+
npm install -g @hanzo/dev
|
|
32
|
+
dev
|
|
33
|
+
|
|
34
|
+
# Or run directly
|
|
35
|
+
npx -y @hanzo/dev
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The binary is named `dev`. The npm package also installs `coder` as an alias.
|
|
39
|
+
|
|
40
|
+
### Authenticate
|
|
41
|
+
|
|
42
|
+
- **ChatGPT sign-in** (Plus/Pro/Team) — run `dev` and pick "Sign in with ChatGPT"
|
|
43
|
+
- **API key** — `export OPENAI_API_KEY=sk-... && dev`
|
|
44
|
+
- **Device code** — for headless environments, `dev` prompts a device code flow automatically
|
|
45
|
+
|
|
46
|
+
### Build from source
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
git clone https://github.com/hanzoai/dev.git
|
|
50
|
+
cd dev
|
|
51
|
+
./build-fast.sh # ~20 min cold, ~2 min incremental
|
|
52
|
+
./hanzo-dev/target/dev-fast/dev
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
 
|
|
56
|
+
|
|
57
|
+
## The Chat TUI
|
|
58
|
+
|
|
59
|
+
Hanzo Dev ships a full terminal UI built with Ratatui. It's not just a prompt — it's a workspace.
|
|
60
|
+
|
|
61
|
+
### Layout
|
|
62
|
+
|
|
63
|
+
The TUI has three zones: a scrollable **history pane** (streamed markdown, code blocks, tool calls, exec output), a **composer** at the bottom for input, and an optional **status line** showing model, session, and agent state.
|
|
64
|
+
|
|
65
|
+
### Key features
|
|
66
|
+
|
|
67
|
+
| Feature | How |
|
|
68
|
+
|---------|-----|
|
|
69
|
+
| **Zen mode** | Minimal chrome, flush-left borders, animated spinner. Default on. Toggle: `Alt+G` |
|
|
70
|
+
| **Themes** | 20+ presets (light/dark). `/themes` to browse and preview live |
|
|
71
|
+
| **Streaming markdown** | Syntax-highlighted code blocks, inline images, reasoning traces |
|
|
72
|
+
| **Card-based history** | Exec output, tool calls, diffs, browser screenshots — each in styled cards |
|
|
73
|
+
| **Agent terminal** | `Ctrl+A` opens a split view of all running sub-agents with live output |
|
|
74
|
+
| **Session management** | `/resume` to pick up where you left off, `/fork` to clone a session |
|
|
75
|
+
| **Session nicknames** | `/nick <name>` to label sessions for easier identification |
|
|
76
|
+
| **External editor** | `Ctrl+G` opens your `$EDITOR` for long prompts |
|
|
77
|
+
| **Plan mode** | Streamed plan items with step-by-step approval |
|
|
78
|
+
| **Undo timeline** | `Esc Esc` opens undo history to roll back changes |
|
|
79
|
+
| **GH Actions viewer** | Live progress tracking for GitHub Actions runs |
|
|
80
|
+
| **Status line** | `/statusline` to configure what's shown |
|
|
81
|
+
| **Personality** | `/personality` to set the agent's communication style |
|
|
82
|
+
|
|
83
|
+
### Keyboard shortcuts
|
|
84
|
+
|
|
85
|
+
| Key | Action |
|
|
86
|
+
|-----|--------|
|
|
87
|
+
| `Enter` | Send message |
|
|
88
|
+
| `Ctrl+C` | Cancel current operation |
|
|
89
|
+
| `Esc` | Context-dependent: close overlay, pause Auto Drive, clear composer |
|
|
90
|
+
| `Esc Esc` | Open undo timeline |
|
|
91
|
+
| `Ctrl+A` | Toggle agent terminal overlay |
|
|
92
|
+
| `Ctrl+G` | Open external editor |
|
|
93
|
+
| `Alt+G` | Toggle Zen mode |
|
|
94
|
+
| `Ctrl+L` | Clear screen |
|
|
95
|
+
| `Up/Down` | Scroll history, navigate overlays |
|
|
96
|
+
|
|
97
|
+
 
|
|
98
|
+
|
|
99
|
+
## Multi-Agent Commands
|
|
100
|
+
|
|
101
|
+
Hanzo Dev can orchestrate multiple CLI agents simultaneously. Each command spawns agents in isolated git worktrees.
|
|
102
|
+
|
|
103
|
+
### `/plan` — Consensus planning
|
|
104
|
+
|
|
105
|
+
All configured agents (Claude, Gemini, GPT) review the task and produce a consolidated plan.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
/plan "Migrate the auth system from sessions to JWT"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### `/solve` — Racing mode
|
|
112
|
+
|
|
113
|
+
Agents race to solve the problem. Fastest correct answer wins. Based on [arxiv.org/abs/2505.17813](https://arxiv.org/abs/2505.17813).
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
/solve "Why does deleting one user cascade-drop the entire users table?"
|
|
117
|
+
```
|
|
15
118
|
|
|
16
|
-
|
|
119
|
+
### `/code` — Consensus implementation
|
|
120
|
+
|
|
121
|
+
Multiple agents implement the solution, then the best result is selected.
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
/code "Add dark mode support with system preference detection"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### `/auto` — Auto Drive
|
|
128
|
+
|
|
129
|
+
Hand off a multi-step task. Auto Drive coordinates agents, manages approvals, and self-heals on failure.
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
/auto "Refactor the auth flow, add device login, and write tests"
|
|
133
|
+
/auto status
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
 
|
|
137
|
+
|
|
138
|
+
## CLI Agent Piping
|
|
139
|
+
|
|
140
|
+
Hanzo Dev spawns external CLI agents as sub-processes and streams their output back into the TUI. This lets you use `dev` as an orchestration layer on top of other AI coding tools.
|
|
141
|
+
|
|
142
|
+
### Supported agents
|
|
143
|
+
|
|
144
|
+
| Agent | CLI | Install |
|
|
145
|
+
|-------|-----|---------|
|
|
146
|
+
| **Claude Code** | `claude` | `npm install -g @anthropic-ai/claude-code` |
|
|
147
|
+
| **Gemini CLI** | `gemini` | `npm install -g @google/gemini-cli` |
|
|
148
|
+
| **Qwen Code** | `qwen` | `npm install -g @qwen-code/qwen-code` |
|
|
149
|
+
| **Custom** | any executable | define in `~/.hanzo/agents/` |
|
|
150
|
+
|
|
151
|
+
### How it works
|
|
152
|
+
|
|
153
|
+
1. Multi-agent commands (`/plan`, `/solve`, `/code`) detect installed CLIs on your `PATH`
|
|
154
|
+
2. Each agent runs in its own git worktree with the task prompt
|
|
155
|
+
3. Output streams into the TUI's agent terminal (`Ctrl+A` to view)
|
|
156
|
+
4. Results are collected, compared, and the best outcome is applied
|
|
157
|
+
|
|
158
|
+
### Custom agents
|
|
159
|
+
|
|
160
|
+
Create YAML-frontmatter markdown files in `~/.hanzo/agents/`:
|
|
161
|
+
|
|
162
|
+
```markdown
|
|
163
|
+
---
|
|
164
|
+
name: my-reviewer
|
|
165
|
+
model: claude
|
|
166
|
+
args: ["--model", "claude-sonnet-4-5-20250929"]
|
|
167
|
+
---
|
|
168
|
+
You are a code reviewer. Review the provided code for bugs, security issues,
|
|
169
|
+
and style problems. Be concise and actionable.
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Use with `/use my-reviewer` or reference in multi-agent orchestration.
|
|
173
|
+
|
|
174
|
+
 
|
|
175
|
+
|
|
176
|
+
## Commands Reference
|
|
177
|
+
|
|
178
|
+
### Browser
|
|
179
|
+
```bash
|
|
180
|
+
/chrome # Connect to external Chrome (CDP auto-detect)
|
|
181
|
+
/chrome 9222 # Connect to specific CDP port
|
|
182
|
+
/browser # Use internal headless browser
|
|
183
|
+
/browser <url> # Open URL in internal browser
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Session
|
|
187
|
+
```bash
|
|
188
|
+
/new # Start fresh conversation
|
|
189
|
+
/resume # Pick up a previous session (sortable picker)
|
|
190
|
+
/fork # Clone current session
|
|
191
|
+
/nick <name> # Label this session
|
|
192
|
+
/status # Show session info
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Settings & UI
|
|
196
|
+
```bash
|
|
197
|
+
/themes # Browse and preview themes
|
|
198
|
+
/settings # Full settings overlay
|
|
199
|
+
/model # Switch model or provider
|
|
200
|
+
/reasoning low|medium|high
|
|
201
|
+
/statusline # Configure status line
|
|
202
|
+
/personality # Set agent communication style
|
|
203
|
+
/permissions # Configure approval policies
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Auto Drive
|
|
207
|
+
```bash
|
|
208
|
+
/auto "task" # Start autonomous multi-step task
|
|
209
|
+
/auto status # Check Auto Drive progress
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Tools
|
|
213
|
+
```bash
|
|
214
|
+
/use <agent> # Run a custom agent
|
|
215
|
+
/plan "task" # Multi-agent consensus planning
|
|
216
|
+
/solve "task" # Multi-agent racing
|
|
217
|
+
/code "task" # Multi-agent consensus coding
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
 
|
|
221
|
+
|
|
222
|
+
## CLI Reference
|
|
17
223
|
|
|
18
224
|
```shell
|
|
19
|
-
|
|
20
|
-
|
|
225
|
+
dev [options] [prompt]
|
|
226
|
+
|
|
227
|
+
Options:
|
|
228
|
+
--model <name> Override model (e.g. gpt-5.1, claude-opus-4-6)
|
|
229
|
+
--read-only Prevent file modifications
|
|
230
|
+
--no-approval Skip approval prompts
|
|
231
|
+
--config <key=val> Override config values
|
|
232
|
+
--oss Use local open-source models (Ollama)
|
|
233
|
+
--sandbox <mode> Sandbox level (read-only, workspace-write)
|
|
234
|
+
--url <endpoint> Connect to custom API endpoint
|
|
235
|
+
--debug Log API requests/responses to file
|
|
236
|
+
--help Show help
|
|
237
|
+
--version Show version
|
|
21
238
|
```
|
|
22
239
|
|
|
240
|
+
`--model` changes the model name sent to the active provider. To switch providers, set `model_provider` in config. Any OpenAI-compatible API works (Chat Completions or Responses).
|
|
241
|
+
|
|
242
|
+
 
|
|
243
|
+
|
|
244
|
+
## Configuration
|
|
245
|
+
|
|
246
|
+
Config file: `~/.hanzo/config.toml`
|
|
247
|
+
|
|
248
|
+
> [!NOTE]
|
|
249
|
+
> Hanzo Dev reads from `~/.hanzo/` (primary), `~/.code/`, and `~/.codex/` for backwards compatibility. It only writes to `~/.hanzo/`.
|
|
250
|
+
|
|
251
|
+
```toml
|
|
252
|
+
# Model settings
|
|
253
|
+
model = "gpt-5.3-codex"
|
|
254
|
+
model_provider = "openai"
|
|
255
|
+
|
|
256
|
+
# Behavior
|
|
257
|
+
approval_policy = "on-request" # untrusted | on-failure | on-request | never
|
|
258
|
+
model_reasoning_effort = "medium" # low | medium | high
|
|
259
|
+
model_reasoning_summary = "detailed"
|
|
260
|
+
sandbox_mode = "workspace-write"
|
|
261
|
+
|
|
262
|
+
# TUI preferences
|
|
263
|
+
[tui]
|
|
264
|
+
alternate_screen = true
|
|
265
|
+
notifications = true
|
|
266
|
+
auto_review_enabled = true
|
|
267
|
+
|
|
268
|
+
[tui.theme]
|
|
269
|
+
name = "dark-zen"
|
|
270
|
+
zen = true
|
|
271
|
+
|
|
272
|
+
[tui.spinner]
|
|
273
|
+
name = "dots"
|
|
274
|
+
|
|
275
|
+
# Model profiles
|
|
276
|
+
[profiles.claude]
|
|
277
|
+
model = "claude-opus-4-6"
|
|
278
|
+
model_provider = "anthropic"
|
|
279
|
+
model_reasoning_effort = "high"
|
|
280
|
+
|
|
281
|
+
[profiles.fast]
|
|
282
|
+
model = "gpt-5.1"
|
|
283
|
+
model_provider = "openai"
|
|
284
|
+
approval_policy = "never"
|
|
285
|
+
|
|
286
|
+
# MCP servers
|
|
287
|
+
[mcp_servers.filesystem]
|
|
288
|
+
command = "npx"
|
|
289
|
+
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Environment variables
|
|
293
|
+
|
|
294
|
+
| Variable | Purpose |
|
|
295
|
+
|----------|---------|
|
|
296
|
+
| `HANZO_HOME` | Override config directory (default: `~/.hanzo`) |
|
|
297
|
+
| `OPENAI_API_KEY` | OpenAI API key |
|
|
298
|
+
| `ANTHROPIC_API_KEY` | Anthropic API key (for Claude agent) |
|
|
299
|
+
| `OPENAI_BASE_URL` | Custom OpenAI-compatible endpoint |
|
|
300
|
+
| `OPENAI_WIRE_API` | Force `chat` or `responses` wiring |
|
|
301
|
+
|
|
302
|
+
Legacy `CODE_HOME` and `CODEX_HOME` are still recognized.
|
|
303
|
+
|
|
304
|
+
 
|
|
305
|
+
|
|
306
|
+
## Memory & Project Context
|
|
307
|
+
|
|
308
|
+
Hanzo Dev reads project context from markdown files:
|
|
309
|
+
|
|
310
|
+
1. **`AGENTS.md`** or **`CLAUDE.md`** in your project root — loaded automatically at session start
|
|
311
|
+
2. **Session memory** — conversation history persists across `/resume`
|
|
312
|
+
3. **Codebase analysis** — automatic project structure understanding
|
|
313
|
+
4. **Skills** — custom tools in `.agents/skills/` with live reload
|
|
314
|
+
|
|
315
|
+
 
|
|
316
|
+
|
|
317
|
+
## Non-Interactive / CI Mode
|
|
318
|
+
|
|
23
319
|
```shell
|
|
24
|
-
#
|
|
25
|
-
|
|
320
|
+
# Run a task without approval prompts
|
|
321
|
+
dev --no-approval "run tests and fix any failures"
|
|
322
|
+
|
|
323
|
+
# Read-only analysis
|
|
324
|
+
dev --read-only "analyze code quality and generate report"
|
|
325
|
+
|
|
326
|
+
# With config overrides
|
|
327
|
+
dev --config output_format=json "list all TODO comments"
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
 
|
|
331
|
+
|
|
332
|
+
## Model Context Protocol (MCP)
|
|
333
|
+
|
|
334
|
+
Hanzo Dev supports the full MCP specification for tool extensibility:
|
|
335
|
+
|
|
336
|
+
- **Built-in tools** — file operations, shell exec, browser, apply-patch
|
|
337
|
+
- **External servers** — filesystem, databases, APIs, custom tools
|
|
338
|
+
- **Hot reload** — MCP servers reload without restarting the TUI
|
|
339
|
+
- **OAuth scopes** — MCP server auth with configurable scopes
|
|
340
|
+
|
|
341
|
+
Configure servers in `~/.hanzo/config.toml` under `[mcp_servers.<name>]`:
|
|
342
|
+
|
|
343
|
+
```toml
|
|
344
|
+
[mcp_servers.memory]
|
|
345
|
+
command = "npx"
|
|
346
|
+
args = ["-y", "@modelcontextprotocol/server-memory"]
|
|
347
|
+
|
|
348
|
+
[mcp_servers.postgres]
|
|
349
|
+
command = "npx"
|
|
350
|
+
args = ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
 
|
|
354
|
+
|
|
355
|
+
## Auto Review
|
|
356
|
+
|
|
357
|
+
Auto Review runs in the background during coding sessions:
|
|
358
|
+
|
|
359
|
+
1. Watches for code changes after each turn
|
|
360
|
+
2. Creates ghost commits in a separate worktree
|
|
361
|
+
3. Reviews changes using a fast model (configurable)
|
|
362
|
+
4. Reports issues and suggests fixes without blocking your flow
|
|
363
|
+
5. Runs parallel with Auto Drive tasks
|
|
364
|
+
|
|
365
|
+
Configure in settings or `config.toml`:
|
|
366
|
+
|
|
367
|
+
```toml
|
|
368
|
+
[tui]
|
|
369
|
+
auto_review_enabled = true
|
|
370
|
+
review_auto_resolve = false # true to auto-apply suggested fixes
|
|
26
371
|
```
|
|
27
372
|
|
|
28
|
-
|
|
373
|
+
 
|
|
29
374
|
|
|
30
|
-
|
|
31
|
-
<summary>You can also go to the <a href="https://github.com/openai/codex/releases/latest">latest GitHub Release</a> and download the appropriate binary for your platform.</summary>
|
|
375
|
+
## What's Different from Upstream Codex
|
|
32
376
|
|
|
33
|
-
|
|
377
|
+
| Feature | OpenAI Codex | Hanzo Dev |
|
|
378
|
+
|---------|-------------|-----------|
|
|
379
|
+
| **Multi-agent** | Single model | `/plan`, `/solve`, `/code` with Claude + Gemini + GPT |
|
|
380
|
+
| **Agent piping** | None | Spawn `claude`, `gemini`, `qwen` as sub-processes |
|
|
381
|
+
| **Custom agents** | None | YAML frontmatter loader, `/use` command |
|
|
382
|
+
| **Theme system** | Basic | 20+ themes, Zen mode, live preview |
|
|
383
|
+
| **Browser** | None | CDP + internal headless, screenshots inline |
|
|
384
|
+
| **Auto Review** | None | Ghost-commit watcher with auto-resolve |
|
|
385
|
+
| **Skills** | Static | Dynamic injection, live reload |
|
|
386
|
+
| **Sandbox** | Seatbelt | + Bubblewrap (Linux), proxy-aware routing |
|
|
387
|
+
| **Session mgmt** | Basic | Nicknames, forking, sortable resume picker |
|
|
388
|
+
| **Plan mode** | None | Streamed plan items with step approval |
|
|
389
|
+
| **Upstream sync** | N/A | Automated 30-min merge with policy-driven conflict resolution |
|
|
34
390
|
|
|
35
|
-
-
|
|
36
|
-
- Apple Silicon/arm64: `codex-aarch64-apple-darwin.tar.gz`
|
|
37
|
-
- x86_64 (older Mac hardware): `codex-x86_64-apple-darwin.tar.gz`
|
|
38
|
-
- Linux
|
|
39
|
-
- x86_64: `codex-x86_64-unknown-linux-musl.tar.gz`
|
|
40
|
-
- arm64: `codex-aarch64-unknown-linux-musl.tar.gz`
|
|
391
|
+
Hanzo Dev stays compatible with upstream. The automated merge workflow polls `openai/codex` every 30 minutes and applies changes using a policy file that protects fork-specific code while adopting upstream improvements.
|
|
41
392
|
|
|
42
|
-
|
|
393
|
+
 
|
|
43
394
|
|
|
44
|
-
|
|
395
|
+
## Architecture
|
|
45
396
|
|
|
46
|
-
|
|
397
|
+
Hanzo Dev is a Rust workspace with 39+ crates:
|
|
47
398
|
|
|
48
|
-
|
|
399
|
+
```
|
|
400
|
+
hanzo-dev/
|
|
401
|
+
cli/ # Binary entry point (produces `dev`)
|
|
402
|
+
tui/ # Terminal UI (Ratatui, 1.6MB of widget code)
|
|
403
|
+
core/ # Config, auth, exec, agents, MCP, git
|
|
404
|
+
protocol/ # Streaming protocol definitions
|
|
405
|
+
exec/ # Command execution + sandboxing
|
|
406
|
+
browser/ # CDP browser automation
|
|
407
|
+
mcp-client/ # MCP client implementation
|
|
408
|
+
mcp-server/ # MCP server
|
|
409
|
+
code-auto-drive-core/ # Auto Drive orchestration
|
|
410
|
+
cloud-tasks/ # Cloud task management
|
|
411
|
+
login/ # Auth (ChatGPT, API key, device code)
|
|
412
|
+
... # 28 more supporting crates
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Build & test
|
|
416
|
+
|
|
417
|
+
```bash
|
|
418
|
+
./build-fast.sh # Full build (required check)
|
|
419
|
+
cargo nextest run --no-fail-fast # All workspace tests
|
|
420
|
+
cargo test -p hanzo-tui --features test-helpers # TUI tests
|
|
421
|
+
./pre-release.sh # Pre-push validation
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
 
|
|
425
|
+
|
|
426
|
+
## Videos
|
|
427
|
+
|
|
428
|
+
<p align="center">
|
|
429
|
+
<a href="https://www.youtube.com/watch?v=Ra3q8IVpIOc">
|
|
430
|
+
<img src="docs/images/video-auto-review-play.jpg" alt="Auto Review" width="100%">
|
|
431
|
+
</a><br>
|
|
432
|
+
<strong>Auto Review</strong>
|
|
433
|
+
</p>
|
|
434
|
+
|
|
435
|
+
<p align="center">
|
|
436
|
+
<a href="https://youtu.be/UOASHZPruQk">
|
|
437
|
+
<img src="docs/images/video-auto-drive-new-play.jpg" alt="Auto Drive" width="100%">
|
|
438
|
+
</a><br>
|
|
439
|
+
<strong>Auto Drive</strong>
|
|
440
|
+
</p>
|
|
441
|
+
|
|
442
|
+
<p align="center">
|
|
443
|
+
<a href="https://youtu.be/sV317OhiysQ">
|
|
444
|
+
<img src="docs/images/video-v03-play.jpg" alt="Multi-Agent" width="100%">
|
|
445
|
+
</a><br>
|
|
446
|
+
<strong>Multi-Agent Orchestration</strong>
|
|
447
|
+
</p>
|
|
448
|
+
|
|
449
|
+
 
|
|
450
|
+
|
|
451
|
+
## FAQ
|
|
452
|
+
|
|
453
|
+
**How is this different from OpenAI Codex CLI?**
|
|
454
|
+
> Hanzo Dev adds multi-agent orchestration, CLI agent piping (Claude/Gemini/Qwen), browser automation, a full theme engine, Auto Review, and skills — while auto-syncing upstream improvements.
|
|
455
|
+
|
|
456
|
+
**Can I use it with Claude Code?**
|
|
457
|
+
> Yes. Install `@anthropic-ai/claude-code` and Hanzo Dev will discover it automatically. Use `/plan`, `/solve`, or `/code` to include Claude in multi-agent workflows, or `/use` with a custom agent definition.
|
|
49
458
|
|
|
50
|
-
|
|
459
|
+
**Can I use my existing Codex/Code configuration?**
|
|
460
|
+
> Yes. Hanzo Dev reads from `~/.hanzo/` (primary), `~/.code/`, and `~/.codex/`. It only writes to `~/.hanzo/`.
|
|
51
461
|
|
|
52
|
-
|
|
462
|
+
**Does this work with ChatGPT Plus?**
|
|
463
|
+
> Yes. Same "Sign in with ChatGPT" flow as upstream Codex.
|
|
53
464
|
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
- [**Installing & building**](./docs/install.md)
|
|
57
|
-
- [**Open source fund**](./docs/open-source-fund.md)
|
|
465
|
+
**Can I use local models?**
|
|
466
|
+
> Yes. `dev --oss` connects to Ollama. Set `model_provider` and `OPENAI_BASE_URL` in config for any OpenAI-compatible endpoint.
|
|
58
467
|
|
|
59
|
-
|
|
468
|
+
**Is my data secure?**
|
|
469
|
+
> Auth stays on your machine. We don't proxy credentials or conversations.
|
|
470
|
+
|
|
471
|
+
 
|
|
472
|
+
|
|
473
|
+
## Contributing
|
|
474
|
+
|
|
475
|
+
```bash
|
|
476
|
+
git clone https://github.com/hanzoai/dev.git
|
|
477
|
+
cd dev
|
|
478
|
+
./build-fast.sh
|
|
479
|
+
./hanzo-dev/target/dev-fast/dev
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### Git hooks
|
|
483
|
+
|
|
484
|
+
```bash
|
|
485
|
+
git config core.hooksPath .githooks
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
The `pre-push` hook runs `./pre-release.sh` when pushing to `main`.
|
|
489
|
+
|
|
490
|
+
### Pull requests
|
|
491
|
+
|
|
492
|
+
1. Fork and create a feature branch
|
|
493
|
+
2. Make changes
|
|
494
|
+
3. `cargo nextest run --no-fail-fast` — tests pass
|
|
495
|
+
4. `./build-fast.sh` — zero errors, zero warnings
|
|
496
|
+
5. Submit PR
|
|
497
|
+
|
|
498
|
+
 
|
|
499
|
+
|
|
500
|
+
## Legal
|
|
501
|
+
|
|
502
|
+
### License
|
|
503
|
+
Apache 2.0 — see [LICENSE](LICENSE). Community fork of `openai/codex`. Upstream LICENSE and NOTICE files preserved.
|
|
504
|
+
|
|
505
|
+
**Hanzo Dev** is not affiliated with, sponsored by, or endorsed by OpenAI.
|
|
506
|
+
|
|
507
|
+
### Your responsibilities
|
|
508
|
+
Using OpenAI, Anthropic, or Google services through Hanzo Dev means you agree to their respective Terms. Don't scrape, bypass rate limits, or share accounts.
|
|
509
|
+
|
|
510
|
+
### Privacy
|
|
511
|
+
Auth lives at `~/.hanzo/auth.json`. Inputs/outputs sent to AI providers are handled under their Privacy Policies.
|
|
512
|
+
|
|
513
|
+
 
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
**Need help?** Open an issue on [GitHub](https://github.com/hanzoai/dev/issues) | **Hanzo AI** — [hanzo.ai](https://hanzo.ai)
|