use clap::{Parser, Subcommand};
use crate::commands;
#[derive(Debug, Parser)]
#[command(
name = "omne",
version,
about = "Manage omne volumes: init, upgrade, validate",
long_about = "omne is a CLI for managing omne volumes. It fetches kernel \
and distro release tarballs from GitHub Releases, scaffolds a `.omne/` \
directory, and validates volume integrity. \
\n\nPhase 1 status: this build is a scaffold. The init, upgrade, and \
validate subcommands are stub handlers that exit 0 without doing real \
work; the operational behavior described below lands in subsequent units.\
\n\nAuthentication: set GITHUB_TOKEN or GH_TOKEN to raise the GitHub API \
rate limit from 60/hour to 5000/hour. When both are set, GITHUB_TOKEN wins.\
\n\nExit codes:\n 0 success\n 1 logical error (bad specifier, volume \
not found, validation failure)\n 2 argument parse error",
subcommand_required = true,
arg_required_else_help = false
)]
pub struct Cli {
#[command(subcommand)]
pub command: Command,
}
#[derive(Debug, Subcommand)]
pub enum Command {
Init(commands::init::Args),
Upgrade(commands::upgrade::Args),
Validate(commands::validate::Args),
Run(commands::run::Args),
Status(commands::status::Args),
}