opencode-rs-sdk

Automate OpenCode HTTP API interactions with a Rust SDK.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Alpha-Innovation-Labs/opennexus --skill opencode-rs-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opencode-rs-sdk
Source: https://github.com/Alpha-Innovation-Labs/opennexus/tree/main/.nexus/ai_harness/skills/opencode-rs-sdk
Command: npx skills add https://github.com/Alpha-Innovation-Labs/opennexus --skill opencode-rs-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenCode's Rust SDK provides ergonomic access to the HTTP API and SSE streaming, reducing boilerplate and enabling reliable integrations across projects.

Core Features & Use Cases

  • Ergonomic Client and ClientBuilder for OpenCode API access, including settings for base URL, directory headers, and timeouts.
  • Comprehensive REST API modules and data models to manage sessions, messages, files, and related resources.
  • SSE streaming support for real-time events, with robust reconnection and per-session routing capabilities.

Quick Start

Instantiate a Rust OpenCode client and begin issuing API calls.

Frequently Asked Questions about opencode-rs-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate interaction with the OpenCode HTTP API using Rust?

You can automate OpenCode HTTP API interaction in Rust by using an ergonomic ClientBuilder to configure base URLs, directory headers, and timeouts, reducing boilerplate for issuing REST calls and managing sessions.

How does SSE streaming work with the OpenCode Rust SDK?

SSE streaming in the OpenCode Rust SDK provides real-time event subscriptions with robust reconnection logic and per-session routing, ensuring reliable data flow for Unix environment integrations.

Can I manage OpenCode sessions and messages in a Unix environment using Rust?

Yes, you can manage OpenCode sessions, messages, and files in Unix environments using comprehensive Rust REST API modules and data models designed to handle HTTP error workflows robustly.

What is the best way to handle errors when subscribing to OpenCode SSE events?

Handle OpenCode SSE event subscription errors by implementing the SDK's robust error handling and reconnection capabilities, which manage HTTP failures and maintain streaming continuity during real-time routing.

Does the OpenCode Rust SDK require feature-flag awareness for client construction?

Yes, constructing an OpenCode Rust client enforces feature-flag awareness alongside proper header configuration, ensuring that API access is correctly gated and ergonomically initialized for your specific project setup.