pub mod batch;
pub mod bench;
pub mod bench_ndcg;
pub mod context;
pub mod diff;
pub mod edit;
pub mod exists;
pub mod find;
pub mod impact;
pub mod index;
pub mod init;
#[cfg(feature = "mcp")]
pub mod mcp;
pub mod outline;
pub mod read;
pub mod run;
pub mod search;
pub mod stats;
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "prx", version, about = "Praxis — agent-native Unix tools")]
pub struct Cli {
#[command(subcommand)]
pub command: Commands,
#[arg(long, global = true)]
pub plain: bool,
#[arg(short, long, global = true)]
pub quiet: bool,
}
#[derive(Subcommand)]
pub enum Commands {
Search(search::SearchArgs),
Read(read::ReadArgs),
Find(find::FindArgs),
Edit(edit::EditArgs),
Diff(diff::DiffArgs),
Index(index::IndexArgs),
Outline(outline::OutlineArgs),
Exists(exists::ExistsArgs),
Batch(batch::BatchArgs),
Stats(stats::StatsArgs),
Init(init::InitArgs),
Run(run::RunArgs),
Bench(bench::BenchArgs),
BenchNdcg(bench_ndcg::BenchNdcgArgs),
Context(context::ContextArgs),
Impact(impact::ImpactArgs),
#[cfg(feature = "mcp")]
Mcp(mcp::McpArgs),
}
impl Commands {
pub fn name(&self) -> String {
match self {
Self::Search(_) => "search",
Self::Read(_) => "read",
Self::Find(_) => "find",
Self::Edit(_) => "edit",
Self::Diff(_) => "diff",
Self::Index(_) => "index",
Self::Outline(_) => "outline",
Self::Exists(_) => "exists",
Self::Batch(_) => "batch",
Self::Stats(_) => "stats",
Self::Init(_) => "init",
Self::Run(_) => "run",
Self::Bench(_) => "bench",
Self::BenchNdcg(_) => "bench-ndcg",
Self::Context(_) => "context",
Self::Impact(_) => "impact",
#[cfg(feature = "mcp")]
Self::Mcp(_) => "mcp",
}
.to_string()
}
}