A native, OpenCode-compatible coding agent written in Rust and C. It speaks the OpenCode V2 HTTP/SSE API, so existing clients — including TermuxFileManger — keep working while the whole agent runs as a single fast binary with no JavaScript runtime.
- Native speed. Rust serves the API, runs the agent loop and renders the terminal UI. The only C is a small POSIX PTY / syscall layer, linked directly.
- Small footprint. One statically-linked-style binary, SQLite bundled, no Bun, Node or npm.
- Same contract. Envelopes, event names and payloads match OpenCode 2.2.6, including the SSE frame format used by the Android integration.
- Batteries included. Sessions, streaming messages, tools, permissions, VCS, file search, PTY and shell endpoints, model catalog and provider streaming.
curl -fsSL https://raw.githubusercontent.com/its-zain-dev/oxidecode/main/scripts/install-termux.sh | bashThe installer places the binary at $PREFIX/bin/opencode and links
$PREFIX/bin/oxidecode to it, because the Android app invokes opencode.
It replaces an existing opencode binary in Termux.
Then:
opencode # terminal UI
opencode --version # oxidecode 2.2.6
opencode service status # prints the local API URL
opencode service get password
opencode models
opencode pair # prints a browser pairing URLConfigure a provider through the usual OpenCode-compatible config
(~/.config/opencode/opencode.json), saved OpenCode credentials
(~/.local/share/opencode/auth.json or opencode.db), or environment variables
such as OPENCODE_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY,
GEMINI_API_KEY, OPENROUTER_API_KEY and DEEPSEEK_API_KEY. The deterministic
offline mock model (mock/mock-echo) is only enabled when OXIDECODE_MOCK=1 is
explicitly set for offline testing.
The repository builds natively and in CI:
cargo build --release --locked -p oxidecode-cli --bin oxidecodeCross builds:
| Target | How |
|---|---|
| Termux / Android arm64 | cargo ndk -t arm64-v8a build --release --locked |
| Linux x86_64 | cargo build --release --locked |
| Linux arm64 static | cross build --release --target aarch64-unknown-linux-musl |
GitHub Actions builds all three targets on every push and publishes binaries on version tags.
| Crate | Purpose |
|---|---|
oxidecode-sys |
Safe wrappers for the C PTY / syscall layer |
oxidecode-core |
IDs, config, auth, paths, SQLite store, session model |
oxidecode-provider |
Model catalog, OpenAI/Anthropic/mock streaming |
oxidecode-tools |
read, write, edit, bash, glob, grep, list, webfetch, todos |
oxidecode-server |
Axum HTTP/SSE API, agent runner, permissions |
oxidecode-tui |
Ratatui interface matching the OpenCode V2 look |
oxidecode-cli |
opencode-compatible CLI and daemon lifecycle |
The server implements the OpenCode V2 routes used by the terminal UI and the
Android integration, including session creation and lookup, prompts, message
history, model/provider/agent catalogs, file search, permissions, PTY and the
event stream. Events are emitted as one compact data: {...} line per frame.
MIT. OxideCode is an independent implementation and is not affiliated with the OpenCode project.