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
use clap::{Parser, Subcommand, ValueEnum};
use clap_complete::Shell;
#[derive(Parser)]
#[command(name = "vership", version, about = "Multi-target release orchestrator")]
pub struct Cli {
/// Output as JSON
#[arg(long, global = true)]
pub json: bool,
#[command(subcommand)]
pub command: Command,
}
#[derive(Subcommand)]
pub enum Command {
/// Bump version, generate changelog, tag, and push
Bump {
/// Version bump level
level: BumpLevel,
/// Preview changes without modifying anything
#[arg(long)]
dry_run: bool,
/// Skip lint and test checks
#[arg(long)]
skip_checks: bool,
/// Stop after tagging, do not push
#[arg(long)]
no_push: bool,
/// Resume a previously interrupted bump without re-bumping version files
#[arg(long)]
resume: bool,
},
/// Preview changelog for unreleased commits
Changelog,
/// Run all pre-flight checks without releasing
Preflight,
/// Show current version, unreleased commits, and project type
Status,
/// Configuration management
#[command(subcommand)]
Config(ConfigCommand),
/// Print JSON schema for agent integration
Schema,
/// Generate shell completions
Completions {
/// Shell to generate completions for
shell: Shell,
},
}
#[derive(Subcommand)]
pub enum ConfigCommand {
/// Create vership.toml with detected defaults
Init,
/// Show resolved effective configuration
Show,
}
#[derive(Clone, Copy, ValueEnum)]
pub enum BumpLevel {
Patch,
Minor,
Major,
}