mecha10-cli 0.1.47

Mecha10 CLI tool
Documentation
//! Topology command arguments

use clap::{Args, ValueEnum};

/// Analyze and visualize project topology (nodes, topics, ports)
#[derive(Args, Debug)]
pub struct TopologyArgs {
    /// Group output by nodes or topics
    #[arg(short, long, default_value = "nodes")]
    pub group_by: GroupBy,

    /// Output format
    #[arg(short, long, default_value = "table")]
    pub format: OutputFormat,

    /// Show only nodes
    #[arg(long)]
    pub nodes_only: bool,

    /// Show only topics
    #[arg(long)]
    pub topics_only: bool,

    /// Show only ports and services
    #[arg(long)]
    pub ports_only: bool,
}

#[derive(Debug, Clone, ValueEnum)]
pub enum GroupBy {
    /// Group by nodes (show each node with its topics)
    Nodes,
    /// Group by topics (show each topic with its publishers/subscribers)
    Topics,
}

#[derive(Debug, Clone, ValueEnum)]
pub enum OutputFormat {
    /// Table format (default)
    Table,
    /// JSON format
    Json,
    /// ASCII graph visualization
    Graph,
}