You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.7 KiB
Rust
52 lines
1.7 KiB
Rust
//! claudbg binary entry point.
|
|
|
|
use clap::Parser;
|
|
use claudbg::cli::{AgentsCmd, Cli, Commands, SessionsCmd};
|
|
use claudbg::error::Result;
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<()> {
|
|
let cli = Cli::parse();
|
|
match cli.command {
|
|
Commands::Sessions { cmd } => match cmd {
|
|
SessionsCmd::List => claudbg::commands::sessions::list(cli.global.verbose).await?,
|
|
SessionsCmd::Dump { id, follow } => {
|
|
claudbg::commands::sessions::dump(&id, follow, cli.global.verbose).await?
|
|
}
|
|
SessionsCmd::Transcribe { id, follow } => {
|
|
claudbg::commands::sessions::transcribe(&id, follow, cli.global.verbose).await?
|
|
}
|
|
},
|
|
Commands::Agents { cmd } => match cmd {
|
|
AgentsCmd::List { session_id } => {
|
|
claudbg::commands::agents::list(&session_id, cli.global.verbose).await?
|
|
}
|
|
AgentsCmd::Dump {
|
|
session_id,
|
|
agent_id,
|
|
follow,
|
|
} => {
|
|
claudbg::commands::agents::dump(&session_id, &agent_id, follow, cli.global.verbose)
|
|
.await?
|
|
}
|
|
AgentsCmd::Transcribe {
|
|
session_id,
|
|
agent_id,
|
|
follow,
|
|
} => {
|
|
claudbg::commands::agents::transcribe(
|
|
&session_id,
|
|
&agent_id,
|
|
follow,
|
|
cli.global.verbose,
|
|
)
|
|
.await?
|
|
}
|
|
},
|
|
Commands::Index { force } => claudbg::commands::index::run(force).await?,
|
|
Commands::Tui => claudbg::commands::stubs::tui()?,
|
|
Commands::Query => claudbg::commands::stubs::query()?,
|
|
}
|
|
Ok(())
|
|
}
|