1use std::path::PathBuf;
5
6use clap::{Parser, Subcommand};
7
8#[derive(Parser, Debug)]
10#[command(name = "airs-memspec")]
11#[command(version, about, long_about = None)]
12#[command(propagate_version = true)]
13pub struct Cli {
14 #[command(flatten)]
16 pub global: GlobalArgs,
17
18 #[command(subcommand)]
20 pub command: Commands,
21}
22
23#[derive(Parser, Debug)]
25pub struct GlobalArgs {
26 #[arg(short = 'p', long = "path", global = true)]
28 #[arg(help = "Path to project directory (default: current directory)")]
29 pub path: Option<PathBuf>,
30
31 #[arg(short = 'v', long = "verbose", global = true)]
33 #[arg(help = "Enable verbose output")]
34 pub verbose: bool,
35
36 #[arg(short = 'q', long = "quiet", global = true)]
38 #[arg(help = "Suppress non-essential output")]
39 #[arg(conflicts_with = "verbose")]
40 pub quiet: bool,
41
42 #[arg(long = "no-color", global = true)]
44 #[arg(help = "Disable colored output")]
45 pub no_color: bool,
46}
47
48#[derive(Subcommand, Debug)]
50pub enum Commands {
51 #[command(name = "install")]
53 #[command(about = "Set up memory bank structure in the current project")]
54 Install {
55 #[arg(help = "Directory to install memory bank (default: .copilot/instructions)")]
57 target: Option<PathBuf>,
58
59 #[arg(short = 'f', long = "force")]
61 #[arg(help = "Overwrite existing files")]
62 force: bool,
63
64 #[arg(short = 't', long = "template")]
66 #[arg(help = "Template name (default: basic)")]
67 #[arg(value_parser = ["basic", "workspace", "multi-project"])]
68 template: Option<String>,
69 },
70
71 #[command(name = "status")]
73 #[command(about = "Show current memory bank status and project overview")]
74 Status {
75 #[arg(short = 'd', long = "detailed")]
77 #[arg(help = "Show detailed status information")]
78 detailed: bool,
79
80 #[arg(long = "project")]
82 #[arg(help = "Check status of specific project")]
83 project: Option<String>,
84 },
85
86 #[command(name = "context")]
88 #[command(about = "Show active development context and architectural decisions")]
89 Context {
90 #[arg(short = 'w', long = "workspace")]
92 #[arg(help = "Show workspace-level context and integration points")]
93 workspace: bool,
94
95 #[arg(long = "project")]
97 #[arg(help = "Show context for specific sub-project")]
98 project: Option<String>,
99 },
100
101 #[command(name = "tasks")]
103 #[command(about = "View tasks and track progress (read-only access)")]
104 Tasks {
105 #[command(subcommand)]
107 action: TaskAction,
108 },
109}
110
111#[derive(Subcommand, Debug)]
113pub enum TaskAction {
114 #[command(name = "list")]
116 #[command(about = "List tasks with smart filtering (15 most relevant) or custom filters")]
117 List {
118 #[arg(short = 's', long = "status")]
120 #[arg(help = "Filter by task status")]
121 #[arg(value_parser = ["all", "active", "pending", "completed", "blocked"])]
122 status: Option<String>,
123
124 #[arg(long = "project")]
126 #[arg(help = "Filter by sub-project")]
127 project: Option<String>,
128
129 #[arg(long = "all")]
131 #[arg(help = "Show all tasks (disable smart default filtering)")]
132 show_all: bool,
133
134 #[arg(long = "completed")]
136 #[arg(help = "Include completed tasks in results")]
137 include_completed: bool,
138 },
139
140 #[command(name = "show")]
142 #[command(about = "Show detailed task information")]
143 Show {
144 #[arg(help = "Task ID (e.g., task_001)")]
146 task_id: String,
147 },
148}