Install & Run

Installation

Prerequisites

  • macOS (10.15+) — TUN only works on macOS/Linux
  • Clash Verge already installed at /Applications/Clash Verge.app
  • Node.js ≥ 18 (for npx) or a global npm install
  • Your macOS user must have sudo permission

Option A: npx (no install)

npx clash-verge-cli

Downloads and runs in one command. Good for one-off usage.

Option B: global install

npm install -g clash-verge-cli
clash-verge-cli

Installs permanently. You can then run just clash-verge-cli from any terminal.

Option C: clone & run

git clone https://github.com/lingion/clash-verge-cli.git
cd clash-verge-cli
node index.js

No build step needed — it's plain JavaScript.

What you'll see

$ clash-verge-cli
[sudo] password for yourname: █
Starting Clash Verge with elevated privileges...

Enter your macOS login password (the sudo prompt, NOT your proxy password). Clash Verge launches.

Non-interactive mode (piped password)

echo "yourpassword" | sudo -S npx clash-verge-cli

⚠️ This is insecure — your password appears in shell history. Only use in scripts where the password comes from a secure source (keychain, 1Password CLI, etc.).