feat(wave1): Full clap Cli struct + dispatch skeleton in main.rs [claudbg-pkyj]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
ae33d93d8e
commit
4129e65594
@ -1,11 +1,12 @@
|
||||
---
|
||||
# claudbg-pkyj
|
||||
title: Implement main CLI entry point and subcommand structure
|
||||
status: todo
|
||||
status: completed
|
||||
type: task
|
||||
priority: normal
|
||||
created_at: 2026-03-27T19:38:56Z
|
||||
updated_at: 2026-03-27T19:38:56Z
|
||||
updated_at: 2026-03-28T05:00:28Z
|
||||
parent: claudbg-h7xu
|
||||
---
|
||||
|
||||
Wire up clap App with top-level subcommands: sessions, agents, index, tui, query. Each subcommand is a separate clap subcommand group. Binary entry point dispatches to the correct handler.
|
||||
Expanded src/cli.rs with Cli, GlobalOpts, Commands, SessionsCmd, and AgentsCmd clap structs. Updated src/main.rs with tokio main, clap::Parser, and full match dispatch skeleton printing coming-soon stubs. Verified cargo run -- --help shows all subcommands and cargo run -- sessions list prints the stub message.
|
||||
|
||||
@ -1,8 +1,36 @@
|
||||
//! claudbg binary entry point.
|
||||
|
||||
use clap::Parser;
|
||||
use claudbg::cli::{AgentsCmd, Cli, Commands, SessionsCmd};
|
||||
use claudbg::error::Result;
|
||||
|
||||
fn main() {
|
||||
let _: Result<()> = Ok(());
|
||||
println!("Hello, world!");
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
let cli = Cli::parse();
|
||||
match cli.command {
|
||||
Commands::Sessions { cmd } => match cmd {
|
||||
SessionsCmd::List => println!("sessions list: coming soon"),
|
||||
SessionsCmd::Dump { id, .. } => println!("sessions dump {id}: coming soon"),
|
||||
SessionsCmd::Transcribe { id, .. } => {
|
||||
println!("sessions transcribe {id}: coming soon")
|
||||
}
|
||||
},
|
||||
Commands::Agents { cmd } => match cmd {
|
||||
AgentsCmd::List { session_id } => println!("agents list {session_id}: coming soon"),
|
||||
AgentsCmd::Dump {
|
||||
session_id,
|
||||
agent_id,
|
||||
..
|
||||
} => println!("agents dump {session_id} {agent_id}: coming soon"),
|
||||
AgentsCmd::Transcribe {
|
||||
session_id,
|
||||
agent_id,
|
||||
..
|
||||
} => println!("agents transcribe {session_id} {agent_id}: coming soon"),
|
||||
},
|
||||
Commands::Index { force } => println!("index (force={force}): coming soon"),
|
||||
Commands::Tui => println!("tui: coming soon!"),
|
||||
Commands::Query => println!("query: coming soon!"),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue