picocode 0.1.0

A minimal, Rust-based implementation similar to Claude Code
Documentation
use picocode::{create_agent, AgentConfig, NoOutput};
use std::sync::Arc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // 1. Setup the output handler with NoOutput for silent execution
    let output = Arc::new(NoOutput);

    // 2. Create the agent
    let agent = create_agent(AgentConfig {
        provider: "anthropic".into(),
        model: "claude-3-5-sonnet-latest".into(),
        output,
        use_bash: false,
        yolo: true, // Auto-confirm everything since there's no output
        tool_call_limit: 5,
        system_message_extension: None,
    }).await?;

    println!("Running agent in silent mode...");

    // 3. Run a task and get the response!
    let response = agent
        .run_once("What is 2+2? Return only the number.".into())
        .await?;

    println!("Agent response: {}", response);

    Ok(())
}