1use std::path::PathBuf;
2
3use clap::{Parser, Subcommand};
4
5#[derive(Parser)]
7#[command(
8 name = "dev-sweep",
9 about = "🧹 Find and clean build artifacts & dependency caches across all your dev projects",
10 long_about = "dev-sweep scans your filesystem for developer projects and identifies \
11 reclaimable disk space from build artifacts, dependency caches, and \
12 generated files. It supports 17+ project types including Rust, Node.js, \
13 Python, Java, .NET, Go, and more.",
14 version,
15 author = "Mark Waid Jr"
16)]
17pub struct Cli {
18 #[command(subcommand)]
19 pub command: Option<Commands>,
20
21 #[arg(global = true)]
23 pub path: Option<PathBuf>,
24
25 #[arg(short = 'd', long, global = true)]
27 pub max_depth: Option<usize>,
28
29 #[arg(short, long, global = true)]
31 pub older_than: Option<String>,
32
33 #[arg(long, global = true)]
35 pub json: bool,
36}
37
38#[derive(Subcommand)]
39pub enum Commands {
40 Scan,
42 Clean {
44 #[arg(short, long)]
46 all: bool,
47 #[arg(long)]
49 dry_run: bool,
50 },
51 Summary,
53 Config {
55 #[arg(long)]
57 show: bool,
58 #[arg(long)]
60 reset: bool,
61 },
62}