context_builder/cli.rs
1use clap::Parser;
2
3/// CLI tool to aggregate directory contents into a single markdown file optimized for LLM consumption
4#[derive(Parser, Debug)]
5#[clap(author, version, about, arg_required_else_help = true)]
6pub struct Args {
7 /// Directory path to process
8 #[clap(short = 'd', long, default_value = ".")]
9 pub input: String,
10
11 /// Output file path
12 #[clap(short, long, default_value = "output.md")]
13 pub output: String,
14
15 /// File extensions to include (e.g., --filter rs --filter toml)
16 #[clap(short = 'f', long)]
17 pub filter: Vec<String>,
18
19 /// Folder or file names to ignore (e.g., --ignore target --ignore lock)
20 #[clap(short = 'i', long)]
21 pub ignore: Vec<String>,
22
23 /// Preview mode: only print the file tree to console, don't generate the documentation file
24 #[clap(long)]
25 pub preview: bool,
26
27 /// Add line numbers to code blocks in the output
28 #[clap(long)]
29 pub line_numbers: bool,
30}