opencode/packages/cli-rs
2026-11-22 19:17:44 +00:00
..
.cargo feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
assets/queries feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
crates refactor(cli-rs): apply streamed deltas borrowed from their JSON (#65609) 2026-11-22 19:17:44 +00:00
docs feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
parity test(cli-rs): add hot-path perf baselines and fix flaky tests (#65592) 2026-11-22 18:53:36 +01:00
script refactor(cli-rs): apply streamed deltas borrowed from their JSON (#65609) 2026-11-22 19:17:44 +00:00
.gitignore feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
AGENTS.md feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
Cargo.lock refactor(cli-rs): match tools and events by type, not by string (#65595) 2026-11-22 19:00:50 +01:00
Cargo.toml test(cli-rs): add hot-path perf baselines and fix flaky tests (#65592) 2026-11-22 18:53:36 +01:00
clippy.toml feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
deny.toml feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
deps-allow.txt feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
package.json test(cli-rs): add hot-path perf baselines and fix flaky tests (#65592) 2026-11-22 18:53:36 +01:00
README.md feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
rust-toolchain.toml feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
rustfmt.toml feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00
tsconfig.json feat(cli-rs): add the native CLI and TUI (#63477) 2026-11-22 00:07:01 +01:00

OpenCode native CLI

The OpenCode CLI and TUI in Rust, built on OpenTUI's Rust crates. It is a client of the TypeScript opencode server and talks to it over HTTP. Its binary is opencode-native, and it does not ship yet.

Build and run

bun run --cwd packages/cli-rs cargo build --release --bin opencode-native

Always run cargo through bun run cargo: it installs OpenTUI's native library first, and cargo reads .cargo/config.toml only inside packages/cli-rs.

Run target/release/opencode-native in a project directory to open the TUI, or add -c to continue the last session there.

Server

The client runs the server from OPENCODE_TS_BIN, else the opencode beside its own executable, else opencode on PATH. It shares sessions, the background service, and cli.json with the TypeScript client.

Editor

rust-analyzer finds no project at the repository root. Open packages/cli-rs, or set "rust-analyzer.linkedProjects": ["packages/cli-rs/Cargo.toml"].

Plugins

The client runs the TypeScript TUI plugins on its own Bun process, and it also runs Luau plugins.

More