@hanzo/dev 0.6.72 → 0.6.74
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 +254 -365
- package/bin/{coder.js → dev.js} +38 -95
- package/package.json +11 -11
- package/postinstall.js +442 -501
- package/scripts/preinstall.js +5 -5
- package/scripts/windows-cleanup.ps1 +6 -7
- package/bin/codex.js +0 -197
package/README.md
CHANGED
|
@@ -1,518 +1,407 @@
|
|
|
1
|
-
<img src="docs/images/
|
|
1
|
+
<img src="docs/images/every-logo.png" alt="Every Code Logo" width="400">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
 
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Every Code** (Code for short) is a fast, local coding agent for your terminal. It's a community-driven fork of `openai/codex` focused on real developer ergonomics: Browser integration, multi-agents, theming, and reasoning control — all while staying compatible with upstream.
|
|
6
6
|
|
|
7
7
|
 
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## What's new
|
|
10
10
|
|
|
11
|
-
- **
|
|
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 upstream improvements while preserving Hanzo features.
|
|
11
|
+
- **Latest long-session stability sweep** (post-0.6): Auto Drive and Auto Review are now decoupled so background reviews no longer block the command flow. `Esc` returns control immediately and typing works while review finalization continues.
|
|
20
12
|
|
|
21
|
-
|
|
13
|
+
- **Operational upgrades in this cycle**
|
|
14
|
+
- Auto Review metadata (branch/worktree context) remains queryable through the active Auto Drive session after completion.
|
|
15
|
+
- Terminal agents are compacted and archived so heavy payloads are reduced while review linkage is preserved.
|
|
16
|
+
- Core `core`, coordinator, and TUI state maps now have hard caps with bounded drop/trim behavior.
|
|
17
|
+
- Auto Drive conversation/update queues are bounded in the coordinator; TUI has bounded prompt/agent/runtime caches.
|
|
18
|
+
- Background review notes are added as non-blocking history-visible notes instead of foreground task-injection.
|
|
19
|
+
- TUI housekeeping lifecycle is bounded with deterministic stop control.
|
|
20
|
+
- Stress tests now cover heavy agent churn plus concurrent Auto Review + Esc/typing responsiveness.
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
- **New/updated models and agents**
|
|
23
|
+
- Auto Drive CLI model support includes `gpt-5.3-codex` (planning/problem-solving) and `gpt-5.3-codex-spark` (fast coding/fix loops), with `medium | high | xhigh` reasoning controls.
|
|
24
|
+
- Frontline and alias-aware agent model handling now includes `code-gpt-5.3-codex` and `code-gpt-5.3-codex-spark`, with compatibility alias upgrades for `gpt-5.1-codex`, `gpt-5.1-codex-mini`, `gpt-5.2-codex`, etc.
|
|
25
|
+
- Auto Drive decision schema and coordinator payloads now enforce bounded history while preserving goal and recent context.
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
See commit `60727b068` and related Auto Drive hardening commits in git history for details.
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
- **Auto Review** – background ghost-commit watcher runs reviews in a separate worktree whenever a turn changes code; uses `codex-5.1-mini-high` and reports issues plus ready-to-apply fixes without blocking the main thread.
|
|
30
|
+
- **Code Bridge** – Sentry-style local bridge that streams errors, console, screenshots, and control from running apps into Code; ships an MCP server; install by asking Code to pull `https://github.com/just-every/code-bridge`.
|
|
31
|
+
- **Plays well with Auto Drive** – reviews run in parallel with long Auto Drive tasks so quality checks land while the flow keeps moving.
|
|
32
|
+
- **Quality-first focus** – the release shifts emphasis from "can the model write this file" to "did we verify it works".
|
|
33
|
+
- _From v0.5.0:_ rename to Every Code, upgraded `/auto` planning/recovery, unified `/settings`, faster streaming/history with card-based activity, and more reliable `/resume` + `/undo`.
|
|
28
34
|
|
|
29
|
-
|
|
30
|
-
# Via npm (installs native Rust binary)
|
|
31
|
-
npm install -g @hanzo/dev
|
|
32
|
-
dev
|
|
35
|
+
[Read the full notes in RELEASE_NOTES.md](docs/release-notes/RELEASE_NOTES.md)
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
 
|
|
38
|
+
|
|
39
|
+
## Why Every Code
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
- 🚀 **Auto Drive orchestration** – Multi-agent automation that now self-heals and ships complete tasks.
|
|
42
|
+
- 🌐 **Browser Integration** – CDP support, headless browsing, screenshots captured inline.
|
|
43
|
+
- 🤖 **Multi-agent commands** – `/plan`, `/code` and `/solve` coordinate multiple CLI agents.
|
|
44
|
+
- 🧭 **Unified settings hub** – `/settings` overlay for limits, theming, approvals, and provider wiring.
|
|
45
|
+
- 🎨 **Theme system** – Switch between accessible presets, customize accents, and preview live via `/themes`.
|
|
46
|
+
- 🔌 **MCP support** – Extend with filesystem, DBs, APIs, or your own tools.
|
|
47
|
+
- 🔒 **Safety modes** – Read-only, approvals, and workspace sandboxing.
|
|
39
48
|
|
|
40
|
-
|
|
49
|
+
 
|
|
41
50
|
|
|
42
|
-
|
|
43
|
-
- **API key** — `export OPENAI_API_KEY=sk-... && dev`
|
|
44
|
-
- **Device code** — for headless environments, `dev` prompts a device code flow automatically
|
|
51
|
+
## AI Videos
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
 
|
|
47
54
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
<p align="center">
|
|
56
|
+
<a href="https://www.youtube.com/watch?v=Ra3q8IVpIOc">
|
|
57
|
+
<img src="docs/images/video-auto-review-play.jpg" alt="Play Auto Review video" width="100%">
|
|
58
|
+
</a><br>
|
|
59
|
+
<strong>Auto Review</strong>
|
|
60
|
+
</p>
|
|
54
61
|
|
|
55
62
|
 
|
|
56
63
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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 |
|
|
64
|
+
<p align="center">
|
|
65
|
+
<a href="https://youtu.be/UOASHZPruQk">
|
|
66
|
+
<img src="docs/images/video-auto-drive-new-play.jpg" alt="Play Introducing Auto Drive video" width="100%">
|
|
67
|
+
</a><br>
|
|
68
|
+
<strong>Auto Drive Overview</strong>
|
|
69
|
+
</p>
|
|
96
70
|
|
|
97
71
|
 
|
|
98
72
|
|
|
99
|
-
|
|
73
|
+
<p align="center">
|
|
74
|
+
<a href="https://youtu.be/sV317OhiysQ">
|
|
75
|
+
<img src="docs/images/video-v03-play.jpg" alt="Play Multi-Agent Support video" width="100%">
|
|
76
|
+
</a><br>
|
|
77
|
+
<strong>Multi-Agent Promo</strong>
|
|
78
|
+
</p>
|
|
100
79
|
|
|
101
|
-
|
|
80
|
+
 
|
|
102
81
|
|
|
103
|
-
|
|
82
|
+
## Quickstart
|
|
104
83
|
|
|
105
|
-
|
|
84
|
+
### Run
|
|
106
85
|
|
|
86
|
+
```bash
|
|
87
|
+
npx -y @hanzo/dev
|
|
107
88
|
```
|
|
108
|
-
/plan "Migrate the auth system from sessions to JWT"
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### `/solve` — Racing mode
|
|
112
89
|
|
|
113
|
-
|
|
90
|
+
### Install & Run
|
|
114
91
|
|
|
115
|
-
```
|
|
116
|
-
|
|
92
|
+
```bash
|
|
93
|
+
npm install -g @hanzo/dev
|
|
94
|
+
dev
|
|
117
95
|
```
|
|
118
96
|
|
|
119
|
-
|
|
97
|
+
Note: If another tool already provides a `code` command (e.g. VS Code), our CLI is also installed as `coder`. Use `coder` to avoid conflicts.
|
|
120
98
|
|
|
121
|
-
|
|
99
|
+
**Authenticate** (one of the following):
|
|
122
100
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
101
|
+
- **Sign in with ChatGPT** (Plus/Pro/Team; uses models available to your plan)
|
|
102
|
+
- Run `code` and pick "Sign in with ChatGPT"
|
|
103
|
+
- **API key** (usage-based)
|
|
104
|
+
- Set `export OPENAI_API_KEY=xyz` and run `code`
|
|
126
105
|
|
|
127
|
-
###
|
|
106
|
+
### Install Claude & Gemini (optional)
|
|
128
107
|
|
|
129
|
-
|
|
108
|
+
Every Code supports orchestrating other AI CLI tools. Install these and config to use alongside Code.
|
|
130
109
|
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
|
|
110
|
+
```bash
|
|
111
|
+
# Ensure Node.js 20+ is available locally (installs into ~/.n)
|
|
112
|
+
npm install -g n
|
|
113
|
+
export N_PREFIX="$HOME/.n"
|
|
114
|
+
export PATH="$N_PREFIX/bin:$PATH"
|
|
115
|
+
n 20.18.1
|
|
116
|
+
|
|
117
|
+
# Install the companion CLIs
|
|
118
|
+
export npm_config_prefix="${npm_config_prefix:-$HOME/.npm-global}"
|
|
119
|
+
mkdir -p "$npm_config_prefix/bin"
|
|
120
|
+
export PATH="$npm_config_prefix/bin:$PATH"
|
|
121
|
+
npm install -g @anthropic-ai/claude-code @google/gemini-cli @qwen-code/qwen-code
|
|
122
|
+
|
|
123
|
+
# Quick smoke tests
|
|
124
|
+
claude --version
|
|
125
|
+
gemini --version
|
|
126
|
+
qwen --version
|
|
134
127
|
```
|
|
135
128
|
|
|
136
|
-
|
|
129
|
+
> ℹ️ Add `export N_PREFIX="$HOME/.n"` and `export PATH="$N_PREFIX/bin:$PATH"` (plus the `npm_config_prefix` bin path) to your shell profile so the CLIs stay on `PATH` in future sessions.
|
|
137
130
|
|
|
138
|
-
|
|
131
|
+
 
|
|
139
132
|
|
|
140
|
-
|
|
133
|
+
## Commands
|
|
141
134
|
|
|
142
|
-
###
|
|
135
|
+
### Browser
|
|
143
136
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
| **Qwen Code** | `qwen` | `npm install -g @qwen-code/qwen-code` |
|
|
149
|
-
| **Custom** | any executable | define in `~/.hanzo/agents/` |
|
|
137
|
+
```bash
|
|
138
|
+
# Connect code to external Chrome browser (running CDP)
|
|
139
|
+
/chrome # Connect with auto-detect port
|
|
140
|
+
/chrome 9222 # Connect to specific port
|
|
150
141
|
|
|
151
|
-
|
|
142
|
+
# Switch to internal browser mode
|
|
143
|
+
/browser # Use internal headless browser
|
|
144
|
+
/browser https://example.com # Open URL in internal browser
|
|
145
|
+
```
|
|
152
146
|
|
|
153
|
-
|
|
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
|
|
147
|
+
### Agents
|
|
157
148
|
|
|
158
|
-
|
|
149
|
+
```bash
|
|
150
|
+
# Plan code changes (Claude, Gemini and GPT-5 consensus)
|
|
151
|
+
# All agents review task and create a consolidated plan
|
|
152
|
+
/plan "Stop the AI from ordering pizza at 3AM"
|
|
159
153
|
|
|
160
|
-
|
|
154
|
+
# Solve complex problems (Claude, Gemini and GPT-5 race)
|
|
155
|
+
# Fastest preferred (see https://arxiv.org/abs/2505.17813)
|
|
156
|
+
/solve "Why does deleting one user drop the whole database?"
|
|
161
157
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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.
|
|
158
|
+
# Write code! (Claude, Gemini and GPT-5 consensus)
|
|
159
|
+
# Creates multiple worktrees then implements the optimal solution
|
|
160
|
+
/code "Show dark mode when I feel cranky"
|
|
170
161
|
```
|
|
171
162
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
 
|
|
175
|
-
|
|
176
|
-
## Commands Reference
|
|
163
|
+
### Auto Drive
|
|
177
164
|
|
|
178
|
-
### Browser
|
|
179
165
|
```bash
|
|
180
|
-
|
|
181
|
-
/
|
|
182
|
-
|
|
183
|
-
|
|
166
|
+
# Hand off a multi-step task; Auto Drive will coordinate agents and approvals
|
|
167
|
+
/auto "Refactor the auth flow and add device login"
|
|
168
|
+
|
|
169
|
+
# Resume or inspect an active Auto Drive run
|
|
170
|
+
/auto status
|
|
184
171
|
```
|
|
185
172
|
|
|
186
|
-
|
|
173
|
+
### General
|
|
187
174
|
|
|
188
|
-
### Session
|
|
189
175
|
```bash
|
|
190
|
-
|
|
191
|
-
/
|
|
192
|
-
/fork # Clone current session
|
|
193
|
-
/nick <name> # Label this session
|
|
194
|
-
/status # Show session info
|
|
195
|
-
```
|
|
176
|
+
# Try a new theme!
|
|
177
|
+
/themes
|
|
196
178
|
|
|
197
|
-
|
|
198
|
-
```bash
|
|
199
|
-
/themes # Browse and preview themes
|
|
200
|
-
/settings # Full settings overlay
|
|
201
|
-
/model # Switch model or provider
|
|
179
|
+
# Change reasoning level
|
|
202
180
|
/reasoning low|medium|high
|
|
203
|
-
/statusline # Configure status line
|
|
204
|
-
/personality # Set agent communication style
|
|
205
|
-
/permissions # Configure approval policies
|
|
206
|
-
```
|
|
207
181
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
/auto "task" # Start autonomous multi-step task
|
|
211
|
-
/auto status # Check Auto Drive progress
|
|
212
|
-
```
|
|
182
|
+
# Switch models or effort presets
|
|
183
|
+
/model
|
|
213
184
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
/use <agent> # Run a custom agent
|
|
217
|
-
/plan "task" # Multi-agent consensus planning
|
|
218
|
-
/solve "task" # Multi-agent racing
|
|
219
|
-
/code "task" # Multi-agent consensus coding
|
|
185
|
+
# Start new conversation
|
|
186
|
+
/new
|
|
220
187
|
```
|
|
221
188
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
## CLI Reference
|
|
189
|
+
## CLI reference
|
|
225
190
|
|
|
226
191
|
```shell
|
|
227
|
-
|
|
192
|
+
code [options] [prompt]
|
|
228
193
|
|
|
229
194
|
Options:
|
|
230
|
-
--model <name> Override model (e.g. gpt-5.1
|
|
231
|
-
--read-only
|
|
232
|
-
--no-approval
|
|
233
|
-
--config <key=val>
|
|
234
|
-
--oss
|
|
235
|
-
--sandbox <mode>
|
|
236
|
-
--
|
|
237
|
-
--debug
|
|
238
|
-
--
|
|
239
|
-
--version Show version
|
|
195
|
+
--model <name> Override the model for the active provider (e.g. gpt-5.1)
|
|
196
|
+
--read-only Prevent file modifications
|
|
197
|
+
--no-approval Skip approval prompts (use with caution)
|
|
198
|
+
--config <key=val> Override config values
|
|
199
|
+
--oss Use local open source models
|
|
200
|
+
--sandbox <mode> Set sandbox level (read-only, workspace-write, etc.)
|
|
201
|
+
--help Show help information
|
|
202
|
+
--debug Log API requests and responses to file
|
|
203
|
+
--version Show version number
|
|
240
204
|
```
|
|
241
205
|
|
|
242
|
-
`--model` changes the model name sent to the active provider. To
|
|
206
|
+
Note: `--model` only changes the model name sent to the active provider. To use a different provider, set `model_provider` in `config.toml`. Providers must expose an OpenAI-compatible API (Chat Completions or Responses).
|
|
243
207
|
|
|
244
208
|
 
|
|
245
209
|
|
|
246
|
-
##
|
|
210
|
+
## Memory & project docs
|
|
247
211
|
|
|
248
|
-
|
|
212
|
+
Every Code can remember context across sessions:
|
|
249
213
|
|
|
250
|
-
|
|
251
|
-
> Hanzo Dev reads from `~/.hanzo/` (primary), `~/.code/`, and `~/.codex/` for backwards compatibility. It only writes to `~/.hanzo/`.
|
|
214
|
+
1. **Create an `AGENTS.md` or `CLAUDE.md` file** in your project root:
|
|
252
215
|
|
|
253
|
-
```
|
|
254
|
-
#
|
|
255
|
-
model = "gpt-5.3-codex"
|
|
256
|
-
model_provider = "openai"
|
|
257
|
-
|
|
258
|
-
# Behavior
|
|
259
|
-
approval_policy = "on-request" # untrusted | on-failure | on-request | never
|
|
260
|
-
model_reasoning_effort = "medium" # low | medium | high
|
|
261
|
-
model_reasoning_summary = "detailed"
|
|
262
|
-
sandbox_mode = "workspace-write"
|
|
263
|
-
|
|
264
|
-
# TUI preferences
|
|
265
|
-
[tui]
|
|
266
|
-
alternate_screen = true
|
|
267
|
-
notifications = true
|
|
268
|
-
auto_review_enabled = true
|
|
216
|
+
```markdown
|
|
217
|
+
# Project Context
|
|
269
218
|
|
|
270
|
-
|
|
271
|
-
name = "dark-zen"
|
|
272
|
-
zen = true
|
|
219
|
+
This is a React TypeScript application with:
|
|
273
220
|
|
|
274
|
-
|
|
275
|
-
|
|
221
|
+
- Authentication via JWT
|
|
222
|
+
- PostgreSQL database
|
|
223
|
+
- Express.js backend
|
|
276
224
|
|
|
277
|
-
|
|
278
|
-
[profiles.claude]
|
|
279
|
-
model = "claude-opus-4-6"
|
|
280
|
-
model_provider = "anthropic"
|
|
281
|
-
model_reasoning_effort = "high"
|
|
225
|
+
## Key files:
|
|
282
226
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
approval_policy = "never"
|
|
287
|
-
|
|
288
|
-
# MCP servers
|
|
289
|
-
[mcp_servers.filesystem]
|
|
290
|
-
command = "npx"
|
|
291
|
-
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
|
|
227
|
+
- `/src/auth/` - Authentication logic
|
|
228
|
+
- `/src/api/` - API client code
|
|
229
|
+
- `/server/` - Backend services
|
|
292
230
|
```
|
|
293
231
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
| Variable | Purpose |
|
|
297
|
-
|----------|---------|
|
|
298
|
-
| `HANZO_HOME` | Override config directory (default: `~/.hanzo`) |
|
|
299
|
-
| `OPENAI_API_KEY` | OpenAI API key |
|
|
300
|
-
| `ANTHROPIC_API_KEY` | Anthropic API key (for Claude agent) |
|
|
301
|
-
| `OPENAI_BASE_URL` | Custom OpenAI-compatible endpoint |
|
|
302
|
-
| `OPENAI_WIRE_API` | Force `chat` or `responses` wiring |
|
|
303
|
-
|
|
304
|
-
Legacy `CODE_HOME` and `CODEX_HOME` are still recognized.
|
|
232
|
+
2. **Session memory**: Every Code maintains conversation history
|
|
233
|
+
3. **Codebase analysis**: Automatically understands project structure
|
|
305
234
|
|
|
306
235
|
 
|
|
307
236
|
|
|
308
|
-
##
|
|
309
|
-
|
|
310
|
-
Hanzo Dev reads project context from markdown files:
|
|
237
|
+
## Non-interactive / CI mode
|
|
311
238
|
|
|
312
|
-
|
|
313
|
-
2. **Session memory** — conversation history persists across `/resume`
|
|
314
|
-
3. **Codebase analysis** — automatic project structure understanding
|
|
315
|
-
4. **Skills** — custom tools in `.agents/skills/` with live reload
|
|
316
|
-
|
|
317
|
-
 
|
|
318
|
-
|
|
319
|
-
## Non-Interactive / CI Mode
|
|
239
|
+
For automation and CI/CD:
|
|
320
240
|
|
|
321
241
|
```shell
|
|
322
|
-
# Run a task
|
|
323
|
-
|
|
242
|
+
# Run a specific task
|
|
243
|
+
code --no-approval "run tests and fix any failures"
|
|
324
244
|
|
|
325
|
-
#
|
|
326
|
-
|
|
245
|
+
# Generate reports
|
|
246
|
+
code --read-only "analyze code quality and generate report"
|
|
327
247
|
|
|
328
|
-
#
|
|
329
|
-
|
|
248
|
+
# Batch processing
|
|
249
|
+
code --config output_format=json "list all TODO comments"
|
|
330
250
|
```
|
|
331
251
|
|
|
332
252
|
 
|
|
333
253
|
|
|
334
254
|
## Model Context Protocol (MCP)
|
|
335
255
|
|
|
336
|
-
|
|
256
|
+
Every Code supports MCP for extended capabilities:
|
|
337
257
|
|
|
338
|
-
- **
|
|
339
|
-
- **
|
|
340
|
-
- **
|
|
341
|
-
- **
|
|
258
|
+
- **File operations**: Advanced file system access
|
|
259
|
+
- **Database connections**: Query and modify databases
|
|
260
|
+
- **API integrations**: Connect to external services
|
|
261
|
+
- **Custom tools**: Build your own extensions
|
|
342
262
|
|
|
343
|
-
Configure
|
|
263
|
+
Configure MCP in `~/.code/config.toml` Define each server under a named table like `[mcp_servers.<name>]` (this maps to the JSON `mcpServers` object used by other clients):
|
|
344
264
|
|
|
345
265
|
```toml
|
|
346
|
-
[mcp_servers.
|
|
347
|
-
command = "npx"
|
|
348
|
-
args = ["-y", "@modelcontextprotocol/server-memory"]
|
|
349
|
-
|
|
350
|
-
[mcp_servers.postgres]
|
|
266
|
+
[mcp_servers.filesystem]
|
|
351
267
|
command = "npx"
|
|
352
|
-
args = ["-y", "@modelcontextprotocol/server-
|
|
268
|
+
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/project"]
|
|
353
269
|
```
|
|
354
270
|
|
|
355
271
|
 
|
|
356
272
|
|
|
357
|
-
##
|
|
358
|
-
|
|
359
|
-
Auto Review runs in the background during coding sessions:
|
|
273
|
+
## Configuration
|
|
360
274
|
|
|
361
|
-
|
|
362
|
-
2. Creates ghost commits in a separate worktree
|
|
363
|
-
3. Reviews changes using a fast model (configurable)
|
|
364
|
-
4. Reports issues and suggests fixes without blocking your flow
|
|
365
|
-
5. Runs parallel with Auto Drive tasks
|
|
275
|
+
Main config file: `~/.code/config.toml`
|
|
366
276
|
|
|
367
|
-
|
|
277
|
+
> [!NOTE]
|
|
278
|
+
> Every Code reads from both `~/.code/` and `~/.codex/` for backwards compatibility, but it only writes updates to `~/.code/`. If you switch back to Codex and it fails to start, remove `~/.codex/config.toml`. If Every Code appears to miss settings after upgrading, copy your legacy `~/.codex/config.toml` into `~/.code/`.
|
|
368
279
|
|
|
369
280
|
```toml
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
```
|
|
374
|
-
|
|
375
|
-
 
|
|
376
|
-
|
|
377
|
-
## What's Different from Upstream Codex
|
|
378
|
-
|
|
379
|
-
| Feature | OpenAI Codex | Hanzo Dev |
|
|
380
|
-
|---------|-------------|-----------|
|
|
381
|
-
| **Multi-agent** | Single model | `/plan`, `/solve`, `/code` with Claude + Gemini + GPT |
|
|
382
|
-
| **Agent piping** | None | Spawn `claude`, `gemini`, `qwen` as sub-processes |
|
|
383
|
-
| **Custom agents** | None | YAML frontmatter loader, `/use` command |
|
|
384
|
-
| **Theme system** | Basic | 20+ themes, Zen mode, live preview |
|
|
385
|
-
| **Browser** | None | CDP + internal headless, screenshots inline |
|
|
386
|
-
| **Auto Review** | None | Ghost-commit watcher with auto-resolve |
|
|
387
|
-
| **Skills** | Static | Dynamic injection, live reload |
|
|
388
|
-
| **Sandbox** | Seatbelt | + Bubblewrap (Linux), proxy-aware routing |
|
|
389
|
-
| **Session mgmt** | Basic | Nicknames, forking, sortable resume picker |
|
|
390
|
-
| **Plan mode** | None | Streamed plan items with step approval |
|
|
391
|
-
| **Upstream sync** | N/A | Automated 30-min merge with policy-driven conflict resolution |
|
|
392
|
-
|
|
393
|
-
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.
|
|
394
|
-
|
|
395
|
-
 
|
|
396
|
-
|
|
397
|
-
## Architecture
|
|
398
|
-
|
|
399
|
-
Hanzo Dev is a Rust workspace with 39+ crates:
|
|
281
|
+
# Model settings
|
|
282
|
+
model = "gpt-5.1"
|
|
283
|
+
model_provider = "openai"
|
|
400
284
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
core/ # Config, auth, exec, agents, MCP, git
|
|
406
|
-
protocol/ # Streaming protocol definitions
|
|
407
|
-
exec/ # Command execution + sandboxing
|
|
408
|
-
browser/ # CDP browser automation
|
|
409
|
-
mcp-client/ # MCP client implementation
|
|
410
|
-
mcp-server/ # MCP server
|
|
411
|
-
code-auto-drive-core/ # Auto Drive orchestration
|
|
412
|
-
cloud-tasks/ # Cloud task management
|
|
413
|
-
login/ # Auth (ChatGPT, API key, device code)
|
|
414
|
-
... # 28 more supporting crates
|
|
415
|
-
```
|
|
285
|
+
# Behavior
|
|
286
|
+
approval_policy = "on-request" # untrusted | on-failure | on-request | never
|
|
287
|
+
model_reasoning_effort = "medium" # low | medium | high
|
|
288
|
+
sandbox_mode = "workspace-write"
|
|
416
289
|
|
|
417
|
-
|
|
290
|
+
# UI preferences see THEME_CONFIG.md
|
|
291
|
+
[tui.theme]
|
|
292
|
+
name = "light-photon"
|
|
418
293
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
294
|
+
# Add config for specific models
|
|
295
|
+
[profiles.gpt-5]
|
|
296
|
+
model = "gpt-5.1"
|
|
297
|
+
model_provider = "openai"
|
|
298
|
+
approval_policy = "never"
|
|
299
|
+
model_reasoning_effort = "high"
|
|
300
|
+
model_reasoning_summary = "detailed"
|
|
424
301
|
```
|
|
425
302
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
## Videos
|
|
429
|
-
|
|
430
|
-
<p align="center">
|
|
431
|
-
<a href="https://www.youtube.com/watch?v=Ra3q8IVpIOc">
|
|
432
|
-
<img src="docs/images/video-auto-review-play.jpg" alt="Auto Review" width="100%">
|
|
433
|
-
</a><br>
|
|
434
|
-
<strong>Auto Review</strong>
|
|
435
|
-
</p>
|
|
303
|
+
### Environment variables
|
|
436
304
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
<strong>Auto Drive</strong>
|
|
442
|
-
</p>
|
|
443
|
-
|
|
444
|
-
<p align="center">
|
|
445
|
-
<a href="https://youtu.be/sV317OhiysQ">
|
|
446
|
-
<img src="docs/images/video-v03-play.jpg" alt="Multi-Agent" width="100%">
|
|
447
|
-
</a><br>
|
|
448
|
-
<strong>Multi-Agent Orchestration</strong>
|
|
449
|
-
</p>
|
|
305
|
+
- `CODE_HOME`: Override config directory location
|
|
306
|
+
- `OPENAI_API_KEY`: Use API key instead of ChatGPT auth
|
|
307
|
+
- `OPENAI_BASE_URL`: Use OpenAI-compatible API endpoints (chat or responses)
|
|
308
|
+
- `OPENAI_WIRE_API`: Force the built-in OpenAI provider to use `chat` or `responses` wiring
|
|
450
309
|
|
|
451
310
|
 
|
|
452
311
|
|
|
453
312
|
## FAQ
|
|
454
313
|
|
|
455
|
-
**How is this different from
|
|
456
|
-
> 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.
|
|
314
|
+
**How is this different from the original?**
|
|
457
315
|
|
|
458
|
-
|
|
459
|
-
> 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.
|
|
316
|
+
> This fork adds browser integration, multi-agent commands (`/plan`, `/solve`, `/code`), theme system, and enhanced reasoning controls while maintaining full compatibility.
|
|
460
317
|
|
|
461
|
-
**Can I use my existing Codex
|
|
462
|
-
|
|
318
|
+
**Can I use my existing Codex configuration?**
|
|
319
|
+
|
|
320
|
+
> Yes. Every Code reads from both `~/.code/` (primary) and legacy `~/.codex/` directories. We only write to `~/.code/`, so Codex will keep running if you switch back; copy or remove legacy files if you notice conflicts.
|
|
463
321
|
|
|
464
322
|
**Does this work with ChatGPT Plus?**
|
|
465
|
-
> Yes. Same "Sign in with ChatGPT" flow as upstream Codex.
|
|
466
323
|
|
|
467
|
-
|
|
468
|
-
> Yes. `dev --oss` connects to Ollama. Set `model_provider` and `OPENAI_BASE_URL` in config for any OpenAI-compatible endpoint.
|
|
324
|
+
> Absolutely. Use the same "Sign in with ChatGPT" flow as the original.
|
|
469
325
|
|
|
470
326
|
**Is my data secure?**
|
|
471
|
-
|
|
327
|
+
|
|
328
|
+
> Yes. Authentication stays on your machine, and we don't proxy your credentials or conversations.
|
|
472
329
|
|
|
473
330
|
 
|
|
474
331
|
|
|
475
332
|
## Contributing
|
|
476
333
|
|
|
334
|
+
We welcome contributions! Every Code maintains compatibility with upstream while adding community-requested features.
|
|
335
|
+
|
|
336
|
+
### Development workflow
|
|
337
|
+
|
|
477
338
|
```bash
|
|
478
|
-
|
|
479
|
-
|
|
339
|
+
# Clone and setup
|
|
340
|
+
git clone https://github.com/just-every/code.git
|
|
341
|
+
cd code
|
|
342
|
+
npm install
|
|
343
|
+
|
|
344
|
+
# Build (use fast build for development)
|
|
480
345
|
./build-fast.sh
|
|
481
|
-
|
|
346
|
+
|
|
347
|
+
# Run locally
|
|
348
|
+
./code-rs/target/dev-fast/code
|
|
482
349
|
```
|
|
483
350
|
|
|
484
|
-
|
|
351
|
+
#### Git hooks
|
|
352
|
+
|
|
353
|
+
This repo ships shared hooks under `.githooks/`. To enable them locally:
|
|
485
354
|
|
|
486
355
|
```bash
|
|
487
356
|
git config core.hooksPath .githooks
|
|
488
357
|
```
|
|
489
358
|
|
|
490
|
-
The `pre-push` hook runs `./pre-release.sh` when pushing to `main`.
|
|
359
|
+
The `pre-push` hook runs `./pre-release.sh` automatically when pushing to `main`.
|
|
491
360
|
|
|
492
|
-
###
|
|
361
|
+
### Opening a pull request
|
|
493
362
|
|
|
494
|
-
1. Fork
|
|
495
|
-
2.
|
|
496
|
-
3.
|
|
497
|
-
4.
|
|
498
|
-
5.
|
|
363
|
+
1. Fork the repository
|
|
364
|
+
2. Create a feature branch: `git checkout -b feature/amazing-feature`
|
|
365
|
+
3. Make your changes
|
|
366
|
+
4. Run tests: `cargo test`
|
|
367
|
+
5. Build successfully: `./build-fast.sh`
|
|
368
|
+
6. Submit a pull request
|
|
499
369
|
|
|
500
370
|
 
|
|
501
371
|
|
|
502
|
-
## Legal
|
|
372
|
+
## Legal & Use
|
|
503
373
|
|
|
504
|
-
### License
|
|
505
|
-
Apache 2.0 — see [LICENSE](LICENSE). Community fork of `openai/codex`. Upstream LICENSE and NOTICE files preserved.
|
|
374
|
+
### License & attribution
|
|
506
375
|
|
|
507
|
-
|
|
376
|
+
- This project is a community fork of `openai/codex` under **Apache-2.0**. We preserve upstream LICENSE and NOTICE files.
|
|
377
|
+
- **Every Code** (Code) is **not** affiliated with, sponsored by, or endorsed by OpenAI.
|
|
508
378
|
|
|
509
379
|
### Your responsibilities
|
|
510
|
-
|
|
380
|
+
|
|
381
|
+
Using OpenAI, Anthropic or Google services through Every Code means you agree to **their Terms and policies**. In particular:
|
|
382
|
+
|
|
383
|
+
- **Don't** programmatically scrape/extract content outside intended flows.
|
|
384
|
+
- **Don't** bypass or interfere with rate limits, quotas, or safety mitigations.
|
|
385
|
+
- Use your **own** account; don't share or rotate accounts to evade limits.
|
|
386
|
+
- If you configure other model providers, you're responsible for their terms.
|
|
511
387
|
|
|
512
388
|
### Privacy
|
|
513
|
-
|
|
389
|
+
|
|
390
|
+
- Your auth file lives at `~/.code/auth.json`
|
|
391
|
+
- Inputs/outputs you send to AI providers are handled under their Terms and Privacy Policy; consult those documents (and any org-level data-sharing settings).
|
|
392
|
+
|
|
393
|
+
### Subject to change
|
|
394
|
+
|
|
395
|
+
AI providers can change eligibility, limits, models, or authentication flows. Every Code supports **both** ChatGPT sign-in and API-key modes so you can pick what fits (local/hobby vs CI/automation).
|
|
514
396
|
|
|
515
397
|
 
|
|
516
398
|
|
|
517
|
-
|
|
518
|
-
|
|
399
|
+
## License
|
|
400
|
+
|
|
401
|
+
Apache 2.0 - See [LICENSE](LICENSE) file for details.
|
|
402
|
+
|
|
403
|
+
Every Code is a community fork of the original Codex CLI. We maintain compatibility while adding enhanced features requested by the developer community.
|
|
404
|
+
|
|
405
|
+
##  
|
|
406
|
+
|
|
407
|
+
**Need help?** Open an issue on [GitHub](https://github.com/just-every/code/issues) or check our documentation.
|