use anyhow::Result;
use clap::{Parser, Subcommand};
mod commands;
mod embed;
use commands::{agent, doctor, local_langfuse};
#[derive(Parser, Debug)]
#[command(
name = "agent-sdk",
version,
about = "Developer-experience CLI for the Agent SDK",
long_about = "Materializes the local Langfuse + OTel collector stack into a downstream \
consumer's working tree, plus environment sanity checks. Read-only by \
default — `up`/`down` shell out to `docker compose` and only fire when \
you ask them to.",
propagate_version = true
)]
struct Cli {
#[command(subcommand)]
command: Command,
}
#[derive(Subcommand, Debug)]
enum Command {
Run(agent::RunArgs),
Chat(agent::ChatArgs),
LocalLangfuse {
#[command(subcommand)]
action: local_langfuse::Action,
},
Doctor(doctor::Args),
}
fn main() -> Result<()> {
let cli = Cli::parse();
match cli.command {
Command::Run(args) => agent::run(args),
Command::Chat(args) => agent::chat(args),
Command::LocalLangfuse { action } => local_langfuse::run(action),
Command::Doctor(args) => doctor::run(args),
}
}