cleanpy 0.1.3

Python 3.12+ 最佳实践知识库 - MCP 服务器
Documentation
// CLI argument parsing structures

use clap::{Parser, Subcommand, ValueEnum};

#[derive(Parser)]
#[command(name = "cleanpy")]
#[command(about = "Python 最佳实践 MCP 服务器和工具", long_about = None)]
pub struct Cli {
    #[command(subcommand)]
    pub command: Commands,
}

#[derive(Subcommand)]
pub enum Commands {
    /// 启动 MCP 服务器
    Mcp,
    /// 安装 slash command 和 agents 到 Claude Code
    Install {
        /// 安装范围:local(用户级)或 project(项目级)
        #[arg(short, long, value_enum, default_value_t = Scope::Project)]
        scope: Scope,
    },
}

#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
pub enum Scope {
    /// 用户级安装到 ~/.claude/commands/ 和 ~/.claude/agents/
    Local,
    /// 项目级安装到 ./.claude/commands/ 和 ./.claude/agents/
    Project,
}