use clap::{Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser, Debug)]
#[command(
name = "toak",
about = "A CLI tool for tokenizing git repositories and performing semantic search",
version
)]
pub struct Args {
#[command(subcommand)]
pub command: Commands,
}
#[derive(Subcommand, Debug)]
pub enum Commands {
Version,
Generate {
#[arg(long, short = 'd')]
dir: Option<PathBuf>,
#[arg(long, short = 'o')]
output_file_path: Option<PathBuf>,
#[arg(long)]
quiet: bool,
#[arg(long, short = 'p')]
prompt: Option<String>,
#[arg(long)]
embeddings: bool,
},
#[cfg(feature = "embeddings")]
Search {
query: String,
#[arg(long, short = 'f', default_value = "embeddings.json")]
embeddings_file: PathBuf,
#[arg(long, short = 'n', default_value = "5")]
top_n: usize,
#[arg(long)]
full: bool,
},
}