1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
use clap::{Subcommand, ValueEnum};
#[derive(Subcommand)]
pub enum Commands {
/// Initialize a new multi-agent environment
Init {
/// Force overwrite existing configuration
#[arg(short, long)]
force: bool,
/// Number of agents to create
#[arg(short, long, default_value = "3")]
agents: u32,
},
/// Manage configuration
Config {
#[command(subcommand)]
command: ConfigCommands,
},
/// Start supervision session
Start {
/// Custom session name
#[arg(short, long)]
session_name: Option<String>,
/// Layout type
#[arg(short, long, default_value = "tiled")]
layout: String,
/// Start and detach immediately
#[arg(short, long)]
detach: bool,
/// Kill existing session if it exists
#[arg(short, long)]
force: bool,
},
/// Manage agents
Agents {
#[command(subcommand)]
command: AgentsCommands,
},
/// Attach to existing session
Attach {
/// Session name to attach to
session_name: Option<String>,
/// List available sessions
#[arg(short, long)]
list: bool,
},
/// Terminate session
Kill {
/// Session name to kill
session_name: Option<String>,
/// Force kill without confirmation
#[arg(short, long)]
force: bool,
/// Kill all sessions
#[arg(long)]
all: bool,
},
/// Send command to specific agent
Hey {
/// Agent number (1, 2, 3, etc.)
agent: String,
/// Command to execute
command: String,
/// Command arguments
args: Vec<String>,
/// Command timeout in seconds
#[arg(short, long, default_value = "30")]
timeout: u64,
/// Working directory for command
#[arg(short, long)]
work_dir: Option<String>,
/// Environment variable (KEY=VALUE)
#[arg(short, long = "env")]
env_vars: Vec<String>,
/// Interactive mode
#[arg(short, long)]
interactive: bool,
},
/// Synchronize workspaces
Sync {
/// Sync specific agent
#[arg(short, long)]
agent: Option<String>,
/// Force sync even if conflicts
#[arg(short, long)]
force: bool,
/// Conflict resolution strategy
#[arg(short, long, default_value = "manual")]
strategy: String,
/// Show what would be synced
#[arg(long)]
dry_run: bool,
},
/// Remove agent workspace
Remove {
/// Agent number to remove
agent: String,
/// Force removal without confirmation
#[arg(short, long)]
force: bool,
/// Keep workspace files
#[arg(long)]
keep_workspace: bool,
/// Merge branch before removal
#[arg(long)]
merge_branch: bool,
},
/// Focus on agent pane
Zoom {
/// Agent number to zoom on
agent: Option<String>,
/// Return to normal layout
#[arg(short = 'u', long)]
unzoom: bool,
/// List available panes
#[arg(short, long)]
list: bool,
},
/// Check session status and health
Status {
/// Check specific session
session_name: Option<String>,
/// Clean up old sessions and temporary files
#[arg(long)]
cleanup: bool,
/// Show detailed health information
#[arg(long)]
detailed: bool,
},
/// Show extended help and documentation
Guide {
/// Command to get help for
command: Option<String>,
/// Search help content
#[arg(long)]
search: Option<String>,
/// Show usage patterns
#[arg(long)]
patterns: bool,
/// Show troubleshooting guides
#[arg(long)]
troubleshooting: bool,
/// Show quick reference
#[arg(long)]
quick: bool,
/// Show accessible help (screen reader friendly)
#[arg(long)]
accessible: bool,
/// Show usage patterns for specific category
#[arg(long, value_enum)]
category: Option<HelpCategory>,
},
/// Update sprite to the latest version
Update {
/// Only check for updates without installing
#[arg(long)]
check: bool,
/// Skip confirmation prompt
#[arg(short, long)]
yes: bool,
/// Update to specific version
#[arg(long)]
version: Option<String>,
},
}
/// Help system command categories.
#[derive(ValueEnum, Debug, Clone)]
pub enum HelpCategory {
/// Getting started guides
GettingStarted,
/// Daily workflow patterns
DailyWorkflow,
/// Troubleshooting guides
Troubleshooting,
/// Advanced usage
Advanced,
/// Collaboration workflows
Collaboration,
}
#[derive(Subcommand)]
pub enum ConfigCommands {
/// Show current configuration
Show,
/// Validate configuration
Validate,
/// Set configuration value
Set {
/// Configuration key
key: String,
/// Configuration value
value: String,
},
/// Get configuration value
Get {
/// Configuration key
key: String,
},
/// Edit configuration file
Edit,
/// Check for configuration changes
Status,
}
#[derive(Subcommand)]
pub enum AgentsCommands {
/// List all configured agents
List,
/// Create a new agent
Create {
/// Agent ID (e.g., "3", "4")
agent_id: String,
/// Branch name
#[arg(short, long)]
branch: Option<String>,
/// Workspace path
#[arg(short, long)]
workspace: Option<String>,
/// Model type
#[arg(short, long, default_value = "claude-sonnet-4")]
model: String,
/// Description
#[arg(short, long)]
description: Option<String>,
/// Skip workspace creation
#[arg(long)]
no_workspace: bool,
},
/// Remove an agent
Remove {
/// Agent ID to remove
agent_id: String,
/// Force removal without confirmation
#[arg(short, long)]
force: bool,
/// Keep workspace files
#[arg(long)]
keep_workspace: bool,
},
/// Show agent details
Show {
/// Agent ID (or leave blank for all agents)
agent_id: Option<String>,
},
/// Validate agent workspaces
Validate,
/// Provision workspaces for agents
Provision {
/// Specific agent ID (or leave blank for all agents)
agent_id: Option<String>,
},
}