Overview

What is Clash Verge CLI?

A tiny command-line launcher for Clash Verge on macOS. It does one thing: starts Clash Verge with elevated (root) privileges so the proxy can create a TUN interface.

On macOS, creating a virtual network interface (TUN/TAP) requires sudo. Clash Verge GUI normally asks for your password via a macOS dialog — but if you want to run it headlessly, from a script, or bypass the GUI prompt, you use this CLI wrapper.

Source files (4 total)

FileLinesPurpose
index.js40Entry point — parses args, spawns the sudo process
constants.js5Hardcoded app path and admin-helper path
bin/clash-verge.js33Shebang wrapper for npx / global install
package.json24npm metadata — bin entry, name, version

How it works

  1. You run clash-verge-cli (or npx clash-verge-cli)
  2. It reads the Clash Verge path from constants.js
  3. It spawns sudo /path/to/clash-verge with the required env vars for TUN
  4. Your terminal prompts for your macOS password (this is sudo, not the app)
  5. Clash Verge starts with TUN capability