Install
openclaw skills install mihomo-cliInspect and operate a local Mihomo/Clash.Meta/Clash Verge/ClashMac instance through its REST API. Use when the user asks to check proxy status, list nodes, read delay/latency history, switch proxy groups, inspect active connections, flush DNS/FakeIP cache, restart Mihomo, or discover where Mihomo is installed/running on the machine.
openclaw skills install mihomo-cliUse the bundled script for repeatable Mihomo operations instead of re-discovering paths and API auth each time.
Run:
scripts/mihomo-cli.sh status
The script auto-detects common Mihomo installs by checking:
~/Library/Application Support/clashmac/work/config.yaml~/.config/mihomo/config.yaml~/.config/clash/config.yamlIt extracts:
external-controllersecretscripts/mihomo-cli.sh status
scripts/mihomo-cli.sh proxies
scripts/mihomo-cli.sh groups
scripts/mihomo-cli.sh test
scripts/mihomo-cli.sh test "🇭🇰 E0 香港核心"
scripts/mihomo-cli.sh connections
scripts/mihomo-cli.sh flush dns
scripts/mihomo-cli.sh flush fakeip
scripts/mihomo-cli.sh restart
scripts/mihomo-cli.sh config
scripts/mihomo-cli.sh groups
scripts/mihomo-cli.sh switch GLOBAL "🇭🇰 E0 香港核心"
Use exact group and proxy names.
Default to:
scripts/mihomo-cli.sh proxies
This shows the latest recorded delay from Mihomo's history.
If the user wants a live test for one node, run:
scripts/mihomo-cli.sh test "<proxy-name>"
Treat 0ms with caution: it may indicate missing/failed measurement rather than a truly perfect route.
Read references/api.md when you need raw endpoint details, request shapes, or want to call an endpoint not wrapped by the helper script.
status, proxies, groups, connections) before mutating state.switch or restart, be sure that changing the active route is actually what the user wants.Unauthorized, re-check secret from the detected config.mihomo, clash, verge, or clashmac, then locate the active config path from process args.mihomo under ~/Library/Application Support/clashmac/core/ while the GUI runs as ClashMac.app.When auto-detect fails, use:
ps aux | grep -iE "clash|mihomo|verge" | grep -v grep
Then inspect the config path from the process command line.