Clau.Rs
Description
clau.rs is a type-safe SDK for the Claude Code tool by Anthropic
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
clau.rs 🦀
A type-safe, async-first Rust SDK for [Claude Code](https://github.com/anthropics/claude-code) that transforms the CLI tool into a powerful programmatic API.
Features
- Type-Safe API: Strongly typed request/response models with compile-time safety
- Async/Await: Built on Tokio for efficient async operations
- Raw JSON Access: Full access to Claude CLI responses for maximum flexibility
- Timeout Support: Configurable timeouts for all operations
- Streaming Support: Real-time streaming responses with async iterators
- Session Management: First-class session support with persistence
- MCP Integration: Type-safe Model Context Protocol configuration
- Error Handling: Comprehensive error types with detailed messages
Installation
Add this to your `Cargo.toml`:
[dependencies]
clau = "0.1.0"
Quick Start
use clau::{Client, Config};
#[tokio::main]
async fn main() -> Result<(), clau::Error> {
let client = Client::new(Config::default());
let response = client
.query("Write a hello world in Rust")
.send()
.await?;
println!("{}", response);
Ok(())
}
Advanced Features
Raw JSON Access
Access the complete response with metadata and raw JSON for maximum flexibility:
use clau::{Client, StreamFormat};
let client = Client::builder()
.stream_format(StreamFormat::Json)
.build();
let response = client
.query("What is Rust?")
.send_full()
.await?;
println!("Content: {}", response.content);
// Access metadata
if let Some(metadata) = &response.metadata {
println!("Cost: ${:.6}", metadata.cost_usd.unwrap_or(0.0));
println!("Session: {}", metadata.session_id);
}
// Access raw JSON for custom parsing
if let Some(raw_json) = &response.raw_json {
// Extract any field from the Claude CLI response
let custom_data = raw_json.get("duration_api_ms");
}
// Serialize the entire response for storage
let json_string = se
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11