`codex-cli/` published `@hanzo/dev`, so the directory carrying our npm package was named after someone else's product. It is `npm/`. `patches/codex.json` is `patches/upstream.json` — it anchors edits against upstream, and the file should say so rather than name one of them. Deleted outright: `justfile`, whose first line was `set working-directory := "codex-rs"` for a directory this repository has never had; `announcement_tip.toml`, an example file for a TUI we do not ship; and `.codex/` and `.code/`, which held upstream's own process skills — babysit-pr, codex-bug, pushing-ci-changes — that were never ours. Three branding leaks a real run turned up, none of which the help text showed: `dev exec` announced "OpenAI Codex v0.7.0-dev.1" as its first line, the status card was missed when the session header was anchored, and both bubblewrap warnings said "Codex's Linux sandbox". README: say what ships. It claimed the agent drives a browser, which is the port that has not landed, and showed a screenshot of it doing so. Both are gone until the bridge is back. The model count is "hundreds" — `/v1/models` answers 458 today, an earlier line here said "over 500", and hanzo.ai derives its own count precisely because typed ones drift. Document the npm install beside the curl one; both give the same build.
2.9 KiB
Hanzo Dev
The dev command: a coding agent for the terminal.
Shape
Hanzo owns the front door; upstream owns the engines.
crates/hanzo-devis the binary. Itsmain.rsis the entire command surface, and every subcommand hands off to a library. Nothing is generated and no upstream source is compiled through aninclude!.crates/hanzo-configpicks the provider and the product home.crates/hanzo-tuiholds the strings and colors that make the interface ours.crates/hanzo-upstreamis a detached workspace, because the root workspace cannot resolve until it has run.makedrives it; it is never imported.
Upstream
upstream/codex and upstream/code are submodules. The gitlink is the pin —
no lockfile of hashes sits beside it. Crates are consumed straight from the
checkout by ordinary path dependency.
patches/upstream.json carries the whole Hanzo delta: anchored substitutions that
make prepare applies to the checkout in place. git -C upstream/codex status
shows them, and that is the honest picture — the checkout is a build input we
own, not a pristine mirror. make reset returns it.
Every edit carries an exact match count. When upstream moves the ground under one, preparation fails and names the file rather than branding the wrong line. That is the signal to re-anchor, and it is why the delta is anchored strings rather than a diff.
Two of the edits are not branding: they publish mcp_cmd, plugin_cmd and
doctor from upstream's library instead of leaving them in its binary. Those
belong upstream as a pull request; landing them there shrinks this file.
Never edit upstream by hand
Changes go in a hanzo-* crate, or in patches/upstream.json when upstream
hard-codes something that must be ours. A hand edit inside upstream/ is lost
at the next make bump.
The Code fork
upstream/code is reference, not a build input. Its crates depend on its own
fork of codex-core, so importing them would link two cores into one binary.
Its additions worth having — Auto Drive, the browser bridge — get rebuilt as
hanzo-* crates against codex-core. migration/code-v1.patch records what
v1 carried, including the defects it was already carrying; see
migration/STATUS.md before porting anything from it.
Working here
make build the dev binary
make test the Hanzo suite
make test-upstream the upstream suite against the pinned checkout
make bump move the submodules forward
make help everything
make build is the check that must pass. Fix warnings as well as errors.
House rules
- Hanzo service APIs use
https://api.hanzo.ai/v1/exclusively. - Keep the upstream interaction model and animation; the branding is ours.
- Keep Linux, macOS, and Windows working.
- Upstream project names appear only in
NOTICE— never in the README, the repository description, the CLI, or the interface.