partiri-cli 0.1.5

partiri CLI — Deploy and manage services on Partiri Cloud
use clap::{Parser, Subcommand};

#[derive(Parser)]
#[command(
    name = "partiri",
    version,
    about = "Deploy and manage services on Partiri Cloud",
    long_about = None,
)]
pub struct Cli {
    #[command(subcommand)]
    pub command: Commands,
}

#[derive(Subcommand)]
pub enum Commands {
    /// Configure your Partiri API key
    Auth,
    /// Run the interactive setup wizard and create .partiri.jsonc
    Init,
    /// Validate the local .partiri.jsonc config file
    Validate,
    /// Service management
    #[command(subcommand)]
    Service(ServiceCommands),
    /// Project management
    #[command(subcommand)]
    Projects(ProjectCommands),
    /// Workspace management
    #[command(subcommand)]
    Workspaces(WorkspaceCommands),
}

#[derive(Subcommand)]
pub enum ServiceCommands {
    /// Register the service on Partiri and update .partiri.jsonc
    Create,
    /// Pull an existing service from Partiri and save it as .partiri.jsonc
    Pull,
    /// Push local config changes to the existing service
    Push,
    /// Show current service metrics and recent jobs
    Metrics,
    /// Show the last 35 log lines for this service
    Logs,
    /// List jobs for this service
    Jobs,
    /// Trigger a deploy job
    Deploy,
    /// Pause the service
    Pause,
    /// Resume a paused service
    Unpause,
    /// Kill the service (requires confirmation)
    Kill,
    /// Link an authentication token to this service (for private repositories or registries)
    Token,
}

#[derive(Subcommand)]
pub enum ProjectCommands {
    /// List all projects in a workspace
    List,
    /// Create a new project in a workspace
    Create,
}

#[derive(Subcommand)]
pub enum WorkspaceCommands {
    /// List all workspaces
    List,
}