A native Rust reimplementation of the Claude Code CLI, shipped as one
orbcode binary.
Orb Code aims for byte-level compatibility with the TypeScript CLI where it
matters: JSONL transcripts, settings layering, CLAUDE.md and .mcp.json
discovery, common CLI flags, and stream-JSON events. By default it uses the same
~/.claude home, so compatible sessions and configuration need no migration.
Alpha (
0.0.1). There is no crate/npm package or stable release channel yet. Interfaces can change between commits. Check the honest feature-status matrix before depending on an experimental surface.
- One native binary: no Node.js runtime at launch.
- Interactive TUI plus text, JSON, and duplex stream-JSON automation.
- Anthropic, OpenAI-compatible APIs, and experimental ChatGPT/Codex subscription login.
- Workspace-aware tools, structured Bash permissions, OS sandboxing, hooks, agents, skills, plugins, background jobs, and MCP.
- A layered Rust workspace with compatibility fixtures and focused integration tests for contributors.
Orb Code currently builds from source and requires Rust 1.85 or newer:
git clone https://github.com/beiwei30/orbcode.git
cd orbcode
cargo install --path cliRuntime helpers are git and preferably ripgrep. OS sandboxing additionally
uses sandbox-exec on macOS or bwrap on Linux. Run orbcode doctor to inspect
your setup.
Anthropic is the default provider:
export ANTHROPIC_API_KEY="sk-ant-..."
orbcode # interactive TUI
orbcode -p "explain this repository"# one headless turn
orbcode --continue # latest workspace session
orbcode doctorOr use a ChatGPT/Codex subscription without an OpenAI API key:
orbcode auth login --provider openai --method chatgpt
# Headless host: add --device-code
orbcode --provider openai -p "reply with OK"Inside the TUI, start with /help, /permissions, and /doctor. Shift+Tab
cycles Ask for approval, Approve for me, Full Access, and Plan.
For source-checkout use without installation:
cargo run -p orbcode -- -p "summarize the workspace"# or: scripts/run.sh -p "summarize the workspace"Read Getting started for auth options, state-home selection, and the first-run walkthrough.
| I want to… | Read |
|---|---|
| Install and run my first prompt | Getting started |
| Learn the TUI, sessions, tools, and jobs | User guide |
| Configure providers, models, settings, and proxies | Configuration |
| Control tool access safely | Permissions and sandboxing |
| Add agents, skills, hooks, or plugins | Extensions |
| Connect MCP servers | MCP |
| Script the CLI or consume NDJSON | CLI reference · Stream-JSON |
| Integrate an editor or thin client | ACP and app-server integrations |
| Check support or diagnose a failure | Feature status · Troubleshooting |
The complete English manual is in docs/; the Chinese mirror
is in docs/zh-CN/.
Contributions are welcome, especially focused compatibility fixtures, missing provider/tool behavior, TUI polish, cross-platform sandbox validation, and documentation corrections backed by code or tests.
scripts/check.sh # fmt, clippy, check, tests
scripts/check.sh --quick # skip tests while iteratingRead CONTRIBUTING.md before opening a PR. Architecture and crate ownership are documented in CLAUDE.md; repository conventions are in AGENTS.md. Please use SECURITY.md for private vulnerability reports.
Orb Code is an independent, unofficial reimplementation. It is not affiliated with, authorized by, endorsed by, or sponsored by Anthropic. “Anthropic”, “Claude”, and “Claude Code” are trademarks of Anthropic PBC and are used only to identify the compatible CLI, formats, and API. Project questions belong in this repository, not Anthropic support.