mecha10-cli 0.7.0

Mecha10 CLI tool
Documentation
//! `mecha10 model` command arguments.
//!
//! Unifies what used to be two separate CLI verbs (`LAB-1808` follow-up):
//! the plural `mecha10 models` (catalog-facing, `packages/mecha10-models::ModelService`,
//! the curated, unversioned, HuggingFace-backed public catalog) and the singular
//! `mecha10 model` (registry-facing, `packages/mecha10-api/src/models/registry`,
//! a private per-project model registry - a different system that just happens to
//! share the same on-disk `models/` directory and the same `model_name` config
//! field, disambiguated by `ObjectDetectorConfig::source`).
//!
//! Product decision: collapse both into one `mecha10 model <subcommand>` surface.
//! `models` (plural) no longer exists as a subcommand at all.

use clap::Subcommand;

#[derive(Subcommand, Debug)]
pub enum ModelCommand {
    List {
        #[arg(short, long)]
        verbose: bool,

        #[arg(short, long)]
        recommended: bool,
    },

    Pull {
        name: Option<String>,

        #[arg(long, conflicts_with = "full_catalog")]
        all: bool,

        #[arg(long, conflicts_with = "all")]
        full_catalog: bool,

        #[arg(long, requires = "file")]
        repo: Option<String>,

        #[arg(long, requires = "repo")]
        file: Option<String>,

        #[arg(long, requires = "repo")]
        custom_name: Option<String>,
    },

    Installed {
        #[arg(short, long)]
        verbose: bool,
    },

    Remove {
        name: String,

        #[arg(short = 'y', long)]
        yes: bool,
    },

    Info {
        name: String,

        #[arg(long)]
        version: Option<i32>,
    },

    Set {
        node: String,

        #[arg(long)]
        model: String,

        #[arg(long)]
        version: Option<i32>,
    },
}