use std::path::PathBuf;
use clap::{Args, Subcommand};
#[derive(Args, Debug, Clone, Copy)]
pub struct AgentScope {
#[arg(short = 'g', long, conflicts_with = "project")]
pub global: bool,
#[arg(long, conflicts_with = "global")]
pub project: bool,
}
#[derive(Args, Debug)]
pub struct InitArgs {
#[command(flatten)]
pub scope: AgentScope,
#[arg(long, value_name = "AGENT")]
pub agent: Option<String>,
#[arg(long)]
pub claude: bool,
#[arg(long)]
pub cursor: bool,
#[arg(long)]
pub copilot: bool,
#[arg(long)]
pub gemini: bool,
#[arg(long)]
pub opencode: bool,
#[arg(long)]
pub openclaw: bool,
#[arg(long)]
pub codex: bool,
#[arg(long)]
pub cline: bool,
#[arg(long)]
pub windsurf: bool,
#[arg(long)]
pub kilocode: bool,
#[arg(long)]
pub antigravity: bool,
}
#[derive(Subcommand, Debug)]
pub enum AgentCommand {
Install {
agent: String,
#[command(flatten)]
scope: AgentScope,
},
Uninstall {
agent: String,
#[command(flatten)]
scope: AgentScope,
},
Show {
agent: String,
#[command(flatten)]
scope: AgentScope,
},
}
#[derive(Subcommand, Debug)]
pub enum ManageCommand {
Index {
#[arg(long)]
force: bool,
#[arg(long)]
stats: bool,
#[arg(short, long)]
quiet: bool,
},
Status {
#[arg(long)]
json: bool,
},
Update {
#[arg(long)]
flush: bool,
#[arg(short, long)]
quiet: bool,
},
Init(InitArgs),
Agent {
#[command(subcommand)]
command: AgentCommand,
},
#[command(name = "__hook", hide = true)]
Hook {
target: String,
},
#[command(name = "__rewrite", hide = true)]
Rewrite {
#[arg(long)]
cwd: Option<PathBuf>,
command: String,
},
#[command(hide = true)]
BenchSearch {
#[arg(long = "query", required = true)]
queries: Vec<String>,
#[arg(long, default_value_t = 1)]
iterations: usize,
#[arg(long, default_value_t = 0)]
warmups: usize,
},
}