opencode/packages/cli-rs
2026-11-26 00:15:52 +01:00
..
.cargo fix(cli-rs): bring the Rust client level with the TUI (#66470) 2026-11-26 00:15:52 +01:00
assets/queries fix(cli-rs): bring the Rust client level with the TUI (#66470) 2026-11-26 00:15:52 +01:00
crates fix(cli-rs): bring the Rust client level with the TUI (#66470) 2026-11-26 00:15:52 +01:00
docs fix(cli-rs): bring the Rust client level with the TUI (#66470) 2026-11-26 00:15:52 +01:00
parity fix(cli-rs): bring the Rust client level with the TUI (#66470) 2026-11-26 00:15:52 +01:00
script fix(cli-rs): bring the Rust client level with the TUI (#66470) 2026-11-26 00:15:52 +01: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 fix(cli-rs): bring the Rust client level with the TUI (#66470) 2026-11-26 00:15:52 +01:00
Cargo.toml fix(cli-rs): bring the Rust client level with the TUI (#66470) 2026-11-26 00:15:52 +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