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
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(
name = "guild",
version,
about = "Rust-native polyglot monorepo orchestrator",
long_about = "Guild provides task dependency graphs, parallel execution, affected detection, \
and caching for polyglot monorepos — without the Node.js ecosystem."
)]
pub struct Cli {
#[command(subcommand)]
pub command: Option<Commands>,
}
#[derive(Subcommand)]
pub enum Commands {
/// Start all dev targets
Dev,
/// Build everything
Build,
/// Test everything
Test,
/// Lint everything
Lint,
/// Run an arbitrary target
Run {
/// Target name to run
target: String,
/// Optional project to scope the target to
project: Option<String>,
},
/// Run a target on affected projects only
Affected {
/// Target name to run on affected projects
target: String,
/// Base branch to compare against (default: main)
#[arg(long, short, default_value = "main")]
base: String,
},
/// List all discovered projects
List,
/// Show the project dependency graph
Graph,
/// Cache management
Cache {
#[command(subcommand)]
command: CacheCommand,
},
/// Scaffold guild.toml from existing manifests
Init {
/// Write all files without prompting for confirmation
#[arg(long, short)]
yes: bool,
},
}
#[derive(Subcommand)]
pub enum CacheCommand {
/// Show cache statistics
Status,
/// Clear the cache
Clean,
}