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
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(name = "party", about = "earn party points by pushing code")]
pub struct Cli {
#[command(subcommand)]
pub command: Option<Command>,
}
#[derive(Subcommand)]
pub enum Command {
/// install hook in current repo
Init,
/// remove hook from current repo
Uninit,
/// prints current party points
Points,
/// show push and commit stats
Stats,
/// called by git hook (not user-facing)
#[command(hide = true)]
Hook,
/// snapshot current refs (called before push in jj)
#[command(hide = true)]
Snapshot,
/// print state for debugging
#[command(hide = true)]
Dump,
/// add or remove party points (dev only)
#[cfg(feature = "dev")]
#[command(allow_negative_numbers = true)]
Cheat {
/// amount to add (can be negative)
amount: i64,
},
/// simulate pushing N commits (dev only)
#[cfg(feature = "dev")]
Push {
/// number of commits to simulate
commits: u64,
/// lines changed per commit (comma-separated, cycles if fewer than commits)
#[arg(long, value_delimiter = ',')]
lines: Option<Vec<u64>>,
},
/// reset all state to defaults (dev only)
#[cfg(feature = "dev")]
Reset,
/// set a bonus track to a specific level (dev only)
#[cfg(feature = "dev")]
Bonus {
/// track id (e.g. "first_push")
track: String,
/// level to set (1 = first tier)
level: u32,
},
/// unlock and enable a party (dev only)
#[cfg(feature = "dev")]
Party {
/// party id (e.g. "big_text")
id: String,
},
/// unlock all palettes for a party (dev only)
#[cfg(feature = "dev")]
Palette {
/// party id, or "all" for every party
id: String,
},
}