1use clap::{Parser, Subcommand};
11
12use crate::commands;
13
14#[derive(Debug, Parser)]
15#[command(
16 name = "omne",
17 version,
18 about = "Manage omne volumes: init, upgrade, validate",
19 long_about = "omne is a CLI for managing omne volumes. It fetches kernel \
20and distro release tarballs from GitHub Releases, scaffolds a `.omne/` \
21directory, and validates volume integrity. \
22\n\nPhase 1 status: this build is a scaffold. The init, upgrade, and \
23validate subcommands are stub handlers that exit 0 without doing real \
24work; the operational behavior described below lands in subsequent units.\
25\n\nAuthentication: set GITHUB_TOKEN or GH_TOKEN to raise the GitHub API \
26rate limit from 60/hour to 5000/hour. When both are set, GITHUB_TOKEN wins.\
27\n\nExit codes:\n 0 success\n 1 logical error (bad specifier, volume \
28not found, validation failure)\n 2 argument parse error",
29 subcommand_required = true,
30 arg_required_else_help = false
31)]
32pub struct Cli {
33 #[command(subcommand)]
34 pub command: Command,
35}
36
37#[derive(Debug, Subcommand)]
38pub enum Command {
39 Init(commands::init::Args),
41
42 Upgrade(commands::upgrade::Args),
44
45 Validate(commands::validate::Args),
47
48 Run(commands::run::Args),
51
52 Status(commands::status::Args),
55}