CLI Reference
Every kumo subcommand, grouped by purpose, with examples and JSON output.
This page is the canonical reference for the kumo binary. Every
command accepts --help for inline reference, and --json to
switch from human text to the stable JSON envelope.
The envelope is always:
{ "ok": true, "data": <payload> }
// or
{ "ok": false, "error": { "code": "...", "message": "...", "details": {} } }See JSON output for the full contract.
Status
Read the current state.
kumo status --json
kumo st # aliasstatus returns core state, mode, controller endpoint, mixed port,
system proxy state, runtime settings, and the last status message.
Lifecycle
Control the Mihomo core process.
kumo start --core /path/to/mihomo # explicit core
kumo start # discover core automatically
kumo stop
kumo restartWhen the (planned) Kumo Helper is installed, start, stop, and
restart delegate to it; otherwise they fall back to the local-process
supervisor inside the app.
Outbound mode
Switch Mihomo's outbound mode without restarting.
kumo mode rule
kumo mode global
kumo mode directThe mode patches /configs on the running core, closes existing
connections, refreshes proxy groups, and persists the new mode.
Proxies
kumo proxies --json # every group and its members
kumo proxy --json # alias
kumo select "Proxy" "HK-01" # pick a node inside a `select` groupAutomated groups (URLTest, Fallback, LoadBalance) are read-only —
the CLI shows the current pick but Mihomo controls it.
Connections
kumo connections --json
kumo connections --close <connection-id>
kumo connections --close-allEach record carries host, proxy chain, traffic counters, and originating process metadata (when Mihomo can resolve it).
Providers
kumo providers --jsonReturns proxy- and rule-provider counts plus per-provider metadata (name, source, last refresh).
Runtime events
kumo runtime-events --json
kumo runtime-events --limit 20The in-memory ring buffer of Kumo runtime events: core lifecycle, profile switches, system proxy changes.
Doctor
kumo doctor --jsonOne-shot report combining status, the current profile, and the list
of discovered Mihomo cores. Handy when filing a support ticket.
Configuration paths
kumo config # alias of `kumo config path`
kumo config path # application support directory
kumo config list # every CLI-visible path
kumo c list # short aliasBackup
kumo backup export ~/Documents/kumo-backup
kumo backup import ~/Documents/kumo-backupA backup captures state.json, the profiles directory, the overrides
directory, and Sub-Store data.
Profiles
kumo profile refresh "https://example.com/sub.yaml"Today the CLI exposes remote-URL refresh. The first refresh imports the
profile; subsequent refreshes update the existing entry. The wider
profile management surface (importProfile, profileContent,
updateProfile, deleteProfile, refresh-by-id, refresh-all-due) is
exposed by KumoController for the GUI today and is being added to the
CLI alongside rule and provider management.
System proxy
kumo sysproxy on --dry-run --json
kumo sysproxy on --json
kumo sysproxy off --json--dry-run returns the exact networksetup commands Kumo would run,
without executing them or binding the PAC listener.
TUN
kumo tun enable --json
kumo tun disable --jsonWithout a privileged owner of the utun device, enable returns a
clear service-mode error and the stored state rolls back before Mihomo
restarts.
Service mode (planned)
kumo service status --json
kumo service install
kumo service uninstallInstall and uninstall use macOS administrator authorization. Until the helper ships, these commands report a not-installed state.
Sub-Store
kumo substore status --json
kumo substore prepare # copy bundled resources into ~/Library/...
kumo substore start
kumo substore stop
kumo substore restartSee Sub-Store hosting for the backend choices.
Core
kumo core install # download a managed coreAgent skills
kumo skills status --json
kumo skills install --agent claude --scope global --dry-run --json
kumo skills install --agent all
kumo skills uninstall --agent cursor --scope project --dry-run --json--agent accepts cursor, claude, codex, gemini, agents, or
all. codex and gemini do not support project scope.
--agent all --scope project targets only agents with project-scope
support.
Install is non-destructive by default: if the destination directory
exists and was not recorded as installed by Kumo, the command fails
until --force is passed.
Logs
kumo logs # runtime logs (default)
kumo logs runtime --limit 200 --level info --json
kumo logs cli --limit 5 --json
kumo logs path
kumo logs clean --dry-run --jsonCompletion
kumo completion zsh
kumo completion bash
kumo completion fishDiscovery and help
kumo --help
kumo --long
kumo help status
kumo status --help
kumo --versionGlobal flags
| Flag | What it does |
|---|---|
--json | Switch output to the stable JSON envelope. |
--dry-run | Preview changes for commands that write system state. |
--loglevel <level> | Set terminal log verbosity. Default notice. |
--silent / --verbose | Shorthand for --loglevel silent / --loglevel verbose. |
-d | Shorthand for --loglevel info. |
--color <auto/always/never> | Control ANSI styling. Auto-detects TTY by default. |
--logs-dir <path> | Override the CLI debug log directory. |
--logs-max <count> | Limit retained CLI debug logs. --logs-max=0 disables debug log files. |
--timing | Write a process-specific timing JSON file and (in text mode) a summary. |
JSON output
Every command accepts --json and returns the same envelope shape:
{
"ok": true,
"data": { /* command-specific payload */ }
}On failure:
{
"ok": false,
"error": {
"code": "CORE_NOT_RUNNING",
"message": "Kumo core is not running.",
"details": {}
}
}For automation, branch on error.code rather than on the exit code:
error.code | When it happens |
|---|---|
CORE_NOT_RUNNING | A command needs the Mihomo core to be running. |
CORE_NOT_FOUND | Kumo couldn't find a Mihomo binary anywhere. |
PROFILE_NOT_FOUND | The requested profile id doesn't exist. |
PROFILE_FETCH_FAILED | A subscription URL returned an error or refused the connection. |
PROFILE_PARSE_FAILED | The downloaded YAML failed to parse. |
CONTROLLER_REQUEST_FAILED | Mihomo's external-controller returned a non-2xx response. |
SYSTEM_PROXY_PRECHECK_FAILED | The target host:port is not accepting local TCP connections. |
TUN_REQUIRES_PRIVILEGED_OWNER | TUN enable was requested without a privileged process available. |
CLI_LINK_NOT_INSTALLED | A CLI-link operation found nothing to remove. |
Exit codes are deliberately small:
| Code | Meaning |
|---|---|
0 | Success (ok: true). |
1 | Failure (ok: false; error explains why). |
Anything beyond 1 is reserved.
Logging
kumo writes a per-invocation debug log to
~/Library/Application Support/Kumo/logs/cli/. The terminal output is
filtered by --loglevel. See
File locations for the layout.
Kumo redacts known secrets (subscription URLs with credentials, authorization headers) before writing logs. Always sanity-check before pasting log output in public.