You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
766 B
Rust

//! CLI argument parsing using clap.
//!
//! Supports two subcommands:
//! - `serve` (default): starts the HTTP server
//! - `create-admin <email>`: creates or promotes a user to admin
use clap::{Parser, Subcommand};
/// AI Weekly Synth backend server.
#[derive(Parser, Debug)]
#[command(name = "ai-synth", about = "AI Weekly Synth backend")]
pub struct Cli {
#[command(subcommand)]
pub command: Option<Commands>,
}
/// Available CLI subcommands.
#[derive(Subcommand, Debug)]
pub enum Commands {
/// Start the web server (default if no subcommand is given).
Serve,
/// Create an admin user, or promote an existing user to admin.
CreateAdmin {
/// Email address for the admin user.
#[arg()]
email: String,
},
}