Expose primary workflow in public CLI help
This commit is contained in:
parent
1c3fdfc38a
commit
e6c2a1a981
4 changed files with 56 additions and 4 deletions
|
|
@ -26,7 +26,21 @@ const DOCTOR_COORDINATOR_TIMEOUT: Duration = Duration::from_millis(500);
|
|||
const DEFAULT_ARTIFACT_EXPORT_MAX_BYTES: u64 = 64 * 1024 * 1024;
|
||||
|
||||
#[derive(Clone, Debug, Parser)]
|
||||
#[command(name = "disasmer", version, arg_required_else_help = true)]
|
||||
#[command(
|
||||
name = "disasmer",
|
||||
version,
|
||||
arg_required_else_help = true,
|
||||
about = "Disasmer distributed Wasm runtime CLI.",
|
||||
after_help = "Primary workflow:
|
||||
1. disasmer login --browser
|
||||
2. disasmer project init
|
||||
3. disasmer node enroll; disasmer node attach --worker
|
||||
4. disasmer run [entry] --project <path>
|
||||
5. Debug with VS Code \"Disasmer: Launch Virtual Process\" or disasmer dap
|
||||
6. Inspect with disasmer process status, task list, logs, and artifact list
|
||||
|
||||
Use --json on primary commands for scriptable output. Hosted account creation happens in the browser login flow."
|
||||
)]
|
||||
struct Cli {
|
||||
#[command(subcommand)]
|
||||
command: Commands,
|
||||
|
|
@ -5887,6 +5901,31 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn top_level_help_exposes_primary_workflow_without_auth() {
|
||||
let mut command = Cli::command();
|
||||
let help = command.render_help().to_string();
|
||||
|
||||
for expected in [
|
||||
"Primary workflow:",
|
||||
"disasmer login --browser",
|
||||
"disasmer project init",
|
||||
"disasmer node enroll",
|
||||
"disasmer node attach --worker",
|
||||
"disasmer run [entry] --project <path>",
|
||||
"Disasmer: Launch Virtual Process",
|
||||
"disasmer dap",
|
||||
"disasmer process status",
|
||||
"task list",
|
||||
"logs",
|
||||
"artifact list",
|
||||
"--json",
|
||||
"Hosted account creation happens in the browser login flow.",
|
||||
] {
|
||||
assert!(help.contains(expected), "help output missing {expected}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn top_level_logout_alias_removes_only_cli_session_state() {
|
||||
let temp = tempfile::tempdir().unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue