# clash-verge-cli **Repository Path**: lingion/clash-verge-cli ## Basic Information - **Project Name**: clash-verge-cli - **Description**: Clash Verge 客户端的 CLI 控制工具:20+ 子命令 / JSON 输出 / Guardian 守护模式 / Mac+Windows 双平台 | 源仓库+最新版: github.com/lingion - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-29 - **Last Updated**: 2026-08-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
Enhanced command-line interface for Clash Verge VPN client on macOS and Windows. ## Platforms - **macOS**: `clash_verge_cli.py` - **Windows**: `clash_verge_cli_windows.py` ## Overview A comprehensive CLI tool to manage Clash Verge VPN client programmatically. Control proxies, profiles, system settings, monitor traffic, and more - all from terminal. ## Features ### 📋 Profile Management - List, add, delete, and activate profiles - Support for URL-based subscription profiles - Quick profile switching by name or UID ### 🌐 Proxy Management - List all proxies and proxy groups - Test proxy latency (ping) - Select specific proxy for any group - Auto node optimization ### 🔌 System Proxy Control - Enable/disable system proxy - Toggle TUN mode - View proxy guard status ### 📊 Traffic Monitoring - Real-time upload/download statistics - Display in human-readable format (GB) - Traffic data per profile ### 🛡️ Guardian Mode - Auto-monitor API connectivity - Automatic node switching on timeout - Configurable latency thresholds ### 💾 Backup & Restore - One-click configuration backup - Restore from previous backups - Multiple backup slots ### 📝 Logs & Diagnostics - View real-time logs - Search logs by keyword - Health check for APIs ### ⚙️ Advanced Configuration - Port configuration (HTTP/SOCKS/Mixed/Redir) - DNS settings display - Routing rules inspection - Direct config file editing ## Installation ### Windows ```powershell # Install Python dependencies pip install -r requirements.txt # Run directly python clash_verge_cli_windows.py --help ``` **First Run**: On first run, the Windows version will auto-detect your Clash Verge installation. If not found, it will prompt you to enter the config path manually. Default Windows paths: ``` %APPDATA%\clash-verge-rev\ %LOCALAPPDATA%\clash-verge-rev\ C:\Program Files\Clash Verge\ ``` ### macOS ```bash # Install Python dependencies pip install -r requirements.txt ``` **Requirements:** - Python 3.8+ - click >= 8.0.0 - pyyaml >= 6.0 - requests >= 2.28.0 ### Install as CLI ```bash # Make executable chmod +x clash_verge_cli.py # Option 1: Run directly ./clash_verge_cli.py --help # Option 2: Add to PATH sudo ln -s $(pwd)/clash_verge_cli.py /usr/local/bin/clash-verge clash-verge --help ``` ## Usage ### Quick Start ```bash # Show status python clash_verge_cli.py status # List profiles python clash_verge_cli.py profiles # Activate profile python clash_verge_cli.py activate "my-profile" # Test proxy latency python clash_verge_cli.py test "GLOBAL" ``` ### Command Reference | Command | Description | |---------|-------------| | `status` | Show comprehensive status | | `profiles` | List all profiles | | `activate