1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! # `OpenCode` SDK for Rust
//!
//! A Rust client library for the [OpenCode](https://opencode.ai) API,
//! providing type-safe access to all endpoints.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use opencode_sdk_rs::Opencode;
//!
//! #[tokio::main(flavor = "current_thread")]
//! async fn main() -> Result<(), opencode_sdk_rs::OpencodeError> {
//! // Uses OPENCODE_BASE_URL env var or defaults to localhost:54321
//! let client = Opencode::new()?;
//!
//! // Get app info
//! let app = client.app().get(None).await?;
//! println!("Connected to: {}", app.hostname);
//!
//! // List sessions
//! let sessions = client.session().list(None).await?;
//! println!("Found {} sessions", sessions.len());
//!
//! Ok(())
//! }
//! ```
// Re-export key types at the crate root for convenience
pub use ;
pub use ClientOptions;
pub use OpencodeError;
pub use SseStream;