OpenCode Rust Wrapper
Async wrapper around the OpenCode CLI (opencode) focused on the canonical
opencode run --format json surface.
- crates.io package:
unified-agent-api-opencode - Rust library crate:
opencode
Design goals:
- Keep the canonical runtime surface narrow:
run --format jsononly. - Preserve deterministic, machine-parseable event/completion behavior.
- Keep raw stdout/stderr and provider-specific diagnostics off the public API surface.
Quickstart
use StreamExt;
use ;
async
Supported controls
The wrapper keeps support scoped to the canonical v1 controls already accepted
by opencode run --format json:
--model--session--continue--fork--dir