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
use clap::{Parser, Subcommand};
#[derive(Parser)]
#[command(
name = "rproj",
version,
about = "Guided bootstrap-to-game-dev CLI for Roblox projects"
)]
pub struct Cli {
#[command(subcommand)]
pub command: Option<Command>,
/// Show every command rproj runs and all of its output. Without this,
/// sub-process output is only shown when something fails.
#[arg(short, long, global = true)]
pub verbose: bool,
}
#[derive(Subcommand)]
pub enum Command {
/// Install and configure every tool rproj knows about (Git, VS Code, Roblox Studio,
/// Blender, Rojo, Wally, Selene, StyLua, Studio plugins, editor extensions...)
///
/// With a tool name, sets that one tool up in the current project instead:
/// pins it, writes its config, and explains the steps that need a human.
Setup {
/// A tool to set up in this project, e.g. `asphalt`. Omit for
/// machine-wide setup.
tool: Option<String>,
},
/// Scaffold a new Roblox project under your RobloxProjects folder
New {
/// Project name / folder name under RobloxProjects
name: String,
/// Re-ask the machine setup questions (system apps, CLI tools,
/// plugins, extensions). Normally these are skipped once your
/// machine is set up.
#[arg(long)]
reconfigure: bool,
/// Reuse a saved package setup instead of picking packages
/// (see --save-setup). `rproj info` lists what's saved.
#[arg(long, value_name = "SETUP")]
like: Option<String>,
/// Save this project's package selection and workflow under a
/// name, so a later `rproj new ... --like <name>` reuses it.
#[arg(long, value_name = "NAME")]
save_setup: Option<String>,
},
/// Configure a tool in the current project, or the global project template
Configure {
/// Tool key to configure (stylua, selene, luau-lsp...), or `project`
/// for the tree future projects inherit. Omit to pick from a list.
key: Option<String>,
},
/// Re-apply rproj's generated config to an existing project, so it
/// picks up fixes made since it was scaffolded
Upgrade {
/// Apply without asking for confirmation
#[arg(long)]
yes: bool,
},
/// Resume the dev loop in the current project: install anything missing,
/// then start the Rojo sourcemap watcher
Watch {
#[command(subcommand)]
action: Option<WatchCommand>,
},
/// Restore dependencies and run the project's selected test runner
Test {
/// Arguments passed unchanged to Lute or jest-roblox
#[arg(trailing_var_arg = true, allow_hyphen_values = true)]
args: Vec<String>,
},
/// Copy every file under src/ (with relative-path headers) to the clipboard
Copy,
/// Show what a catalog entry does, or list the whole catalog
Info {
/// Package/tool key to look up. Omit to list everything.
key: Option<String>,
},
}
#[derive(Subcommand)]
pub enum WatchCommand {
/// Start one persistent background sourcemap Watch (Windows)
Start,
/// Show the background Watch state and project from any directory
Status,
/// Print the bounded background Watch logs
Logs,
/// Stop Watch after the current recovery command finishes
Stop,
}