Command Line Tool (CLI) PREVIEW
PREVIEW Notice: the
chutecommand-line tool is in internal testing and has not been released. This page describes the build under test: its commands, options, output format and app screens may still change before it ships.
chute status
chute mode rule
chute policy test Auto --wait
chute top
chute is the command-line tool bundled inside Chute Mac (macOS 12+). It talks to the HTTP Control API over plain HTTP, so the same binary on your Mac can inspect and control Chute running on this Mac as well as on a remote Chute iOS, Chute tvOS or Chute Android device.
PRO Notice: the
chutecommand itself is free, while features that require Chute Pro require it on the device the engine runs on. Without a license, status, rules, policies, DNS, diagnostics, live connections and logs work normally, whereas MitM, recording and reading request/response bodies, and Rewrite / Mock Response rules have no effect. The CLI checks the engine's license state and reports it directly:feature set mitm onorfeature set record-traffic onturns the switch back off, explains why on stderr and exits3;mitm addandrewrite addkeep the rule (so it takes effect once Chute Pro is active) and warn on stderr;conn request,conn responseandconn curlreport that reading bodies needs Chute Pro; andhar --bodies/conn export --format har --bodieswarn that exported entries contain no bodies. See also License and Activation.
Installing
There is no separate download. Chute Mac ships the binary inside its app bundle at ChuteMac.app/Contents/MacOS/chute and installs a symlink at /usr/local/bin/chute. Because /usr/local/bin/chute points into the app bundle, updating Chute Mac automatically updates chute, and chute --version prints the app's version and bundle path.
- In Chute Mac: open Misc → Command Line Tool (or choose Command Line Tool… from the menu bar menu, or use the install button inside the AI Agent (MCP) window) and click Install…. You can also Repair, Use This Copy or Uninstall from the same section.
- On first launch after setup, Chute Mac may also offer once to install
/usr/local/bin/chute. - Chute Mac automatically repairs a broken link that belonged to an older or moved copy of Chute, and never modifies a
/usr/local/bin/chutethat belongs to another program.
chute reaches Chute through the HTTP Control API ([General] external-http-controller). If the running configuration does not enable it, Chute Mac offers to turn it on from Misc → Command Line Tool, which adds external-http-controller = 127.0.0.1:6170 to the active configuration and reloads.
Connecting and Authentication
Local Mac
With no --remote option (and no CHUTE_CLI_REMOTE), chute talks to Chute on this Mac with zero configuration. While Chute runs, the engine maintains <share>/control-endpoint inside ~/Library/Application Support/com.R3Studio.Chute-Mac/Share (or ~/Chute/Share), recording its listen address, port, token and process ID, and removes the file when it stops. chute reads that file automatically, and reports plainly when Chute is not running or when the active profile has no HTTP Control API.
--remote localexplicitly targets the local Mac (localis reserved and cannot be used as a saved remote name).CHUTE_CLI_ENDPOINToverrides the path to thecontrol-endpointfile.- If no endpoint file exists (for example, when talking to an older Chute build),
chutefalls back to127.0.0.1:9090.
Remote Devices
Because the control plane is HTTP, pass --remote to control an iPhone, iPad, Apple TV, Android device or another Mac on the network:
chute --remote 192.168.1.20:9090 --token "$TOKEN" status
chute --remote "$KEY@192.168.1.20:9090" status
chute --remote http://192.168.1.20:9090 --token-file ~/.config/chute/tv.token status
--remote accepts host:port, [ipv6]:port, an http://host:port URL, the profile key@host:port form, or a saved remote name. The control plane speaks plain HTTP only (http-api-tls is not supported); https:// URLs are refused rather than silently downgraded.
To avoid typing addresses and token paths repeatedly, save named remotes:
chute remote add tv 192.168.1.20:9090 --token-file ~/.config/chute/tv.token
chute --remote tv status
chute remote list
chute remote show tv
chute remote rm tv
Saved remotes are stored in ~/.config/chute/remotes.json (mode 0600; override with CHUTE_CLI_CONFIG). Only the host, port and optional token file path are saved — never the token value itself.
Token Precedence
When multiple token sources are present, chute uses the first one found:
--token-stdin(reads the first line of stdin so the token never appears in the process table);--token <token>(or-t);--token-file <path>(or the saved remote'stoken_file);- a key embedded in
--remote(key@host:port); - the token discovered from the local
<share>/control-endpointfile; - the
CHUTE_CLI_TOKENenvironment variable.
When external-http-secret is unset, the engine still requires Bearer authentication using the generated token stored in <share>/control-token (mode 0600). Only external-http-secret = none on a loopback address disables authentication, and chute prints a warning to stderr whenever a command succeeds without a token.
Global Options and Environment
Global options can be passed before or after the command name. Unrecognized options are rejected (exit 1) so a typo cannot silently swallow an argument.
| Option | Description |
|---|---|
-r, --remote <target> |
Target control plane (host:port, http://host:port, key@host:port, local, or a saved remote name). |
-t, --token <token> |
Bearer token matching [General] external-http-secret. |
--token-file <path> |
Read the bearer token from the first line of <path>. |
--token-stdin |
Read the bearer token from the first line of stdin. |
--raw, --json |
Print raw JSON from the API instead of formatted tables/columns. |
--timeout <seconds> |
HTTP request timeout in seconds (default 10). |
--lang <code> |
Output language: en, zh, ja, ko, de, th, ru, fr. |
-h, --help |
Show help (chute help <command> shows detailed usage for one command). |
-V, --version |
Print the chute version and the Chute Mac bundle it belongs to. |
| Environment Variable | Description |
|---|---|
CHUTE_CLI_REMOTE |
Default value for --remote. |
CHUTE_CLI_TOKEN |
Default bearer token when no higher-priority token source is set. |
CHUTE_CLI_ENDPOINT |
Override path to the local control-endpoint file. |
CHUTE_CLI_CONFIG |
Override path to the saved remotes file (default ~/.config/chute/remotes.json). |
CHUTE_MCP_TOKEN |
Token used by chute mcp (see AI Agent (MCP)). |
CHUTE_MCP_ENDPOINT |
Override path to the local mcp-endpoint file for chute mcp. |
CHUTE_LANG |
Default value for --lang. |
Language. chute resolves its display language in order: --lang, CHUTE_LANG, the language chosen inside Chute Mac, then English. It does not read the shell's LANG. --raw/--json output, chute mcp stdout, engine text, command/option names, mode names (rule, direct, global), CSV/HAR/curl exports and exit codes are never translated. Scripts that parse formatted columns should set CHUTE_LANG=en or use --raw.
Commands
Run chute help <command> for the full syntax and options of any command.
| Command | Subcommands / Usage | Description |
|---|---|---|
status |
chute status |
Current mode, listeners, network address, memory, connections, paths and how the previous run ended. |
health |
chute health |
Resource ceilings, recent refusals and reasons, and previous run exit reason. |
traffic |
chute traffic [--watch] [--interval <s>] [--count <n>] |
Traffic totals and per-policy breakdown; --watch samples counters with a live sparkline. |
summary |
chute summary |
Single-line summary: mode, connections, speeds, totals and uptime. |
version |
chute version |
Engine name and current run ID. |
watch |
chute watch [traffic, conn] [--interval <s>] [--count <n>] |
Poll live traffic (default) or busiest live connections (conn) until interrupted. |
top |
chute top [--remote <target>] |
Full-screen interactive terminal dashboard for local or remote Chute. |
remote |
list, add, rm, show |
Manage saved remote control-plane addresses in remotes.json. |
mode |
chute mode [rule, direct, global] |
Show or change outbound mode (proxy is accepted as an alias for global). |
policy |
list [--members], set <group> <policy>, test <name> [--url <url>] [--wait] |
Inspect groups/members, switch group selection, or test latency. |
rule |
list, providers, match, explain |
List rules in match order, inspect rule-set providers, or dry-run rule matching. |
profile |
show, check, reload [--force], edit [--apply], diff |
Inspect, validate, hot-reload, edit in $VISUAL/$EDITOR, or diff configurations. |
feature |
list, set <mitm, record-traffic> <on, off> |
Show feature states or toggle runtime mitm and record-traffic. |
loglevel |
chute loglevel, set <level> [--sections all, a,b,c] |
View or change runtime log level and subsystem sections without restarting. |
script |
list, run <name> |
List enabled generic scripts or run one on demand (10-second timeout; exit 3 on timeout). |
dns |
records, hosts, query <domain>, flush [domain] |
Inspect resolver cache and [Host] entries, query through Chute's resolver, or flush cache. |
diag |
ping <host> [--port <n>], egress, internet, bundle [--out <path>] |
ICMP/TCP probes, physical interface address check, direct Internet test and redacted diagnostic zip. |
tailscale |
status [--peers] |
Live Tailscale identity, exit node, DERP RTT and peers. |
conn |
list, history, show, request, response, processes, curl, export, kill |
Inspect live and historical connections, headers, bodies, processes, curl replay and CSV/HAR export. |
har |
chute har [--out <path>] [--source current, history] [--limit <n>] [--ids <a,b>] [--bodies] |
Export captured traffic as HAR 1.2 (to stdout when --out is omitted). |
log |
chute log [--since <epoch>] [--follow] |
Read or poll the engine's 1,000-line in-memory log ring buffer. |
logbook |
roots, ls, cat, get |
Browse and download per-run logs and files (share, tmp, content); requires external-http-ui = true. |
events |
chute events [--since <epoch>] [--persisted] [--limit <n>] [--follow] |
Inspect notable engine events (failures, network changes, DERP re-homes, rule notifications). |
mitm |
hosts, add <host>, rm <host>, clear |
View or modify the runtime MitM host list (leading - excludes a host). |
rewrite |
list [family], hits, add <family> <rule>, rm <family> <id>, clear <family> |
Manage runtime url-rewrite, header-rewrite, body-rewrite and mock rules and inspect hit counters. |
mcp |
chute mcp [--url <url>] [--token-file <path>] [--timeout <s>] |
Stdio-to-HTTP relay for MCP clients (see AI Agent (MCP)). |
Live Dashboard: chute top
chute top
chute top --remote tv
chute top fills the terminal with a live dashboard refreshed every second or two, designed for monitoring either the local Mac or a remote device such as an Apple TV acting as a LAN gateway or Tailscale exit node.
It has five views:
- Overview: outbound mode, Enhanced Mode, Chute Pro status, uptime, memory, CPU, a live speed chart recorded since
topstarted, Tailscale summary and recent events. - Devices: active connections grouped by source address, with Tailscale peers and the device itself named.
- Connections: filterable and sortable live connections, with a detail dialog (including the
chute conn showcommand for deeper inspection) and connection closing. - Policies: policy groups alongside their members and latency, with interactive member switching and group latency testing.
- Logs: merged event and log ring stream with text filtering, log level selection and pause/follow controls.
Navigation and shortcuts: use ← → across tabs and buttons, ↑ ↓ through lists and controls, Tab / Shift-Tab between focus areas, Enter to activate or open details, and Esc to go back. Single-key shortcuts work anywhere outside filter inputs: 1–5 switch pages, d opens the Device… switcher (local plus saved remotes), m switches outbound mode, r refreshes, t tests policies, s changes sort order, l changes log level, / filters, x closes a connection, ? opens help and q quits.
If the remote device becomes unreachable, chute top displays the status and retries with backoff (1, 2, 4, 8, then every 15 seconds), resuming automatically when the device returns (HTTP 401 pauses retries until you press r). chute top requires an interactive terminal on stdin and stdout and exits 1 otherwise; for scripts, use chute watch or --raw.
Inspecting Connections and Traffic
chute conn list --host github --mitm --modified --min-duration 1
chute conn show 42 --headers
chute conn request 42 --out req.bin
chute conn response 42 --text | jq .
chute conn curl 42
chute conn export --format csv --out connections.csv
chute har --limit 100 --bodies --out capture.har
conn listdisplays flags matching Chute Dashboard:M(HTTPS decrypted),H(header rewritten),B(body rewritten),R(a rewrite fired) andK(answered by a Mock Response). Filters (--host,--process,--type,--status,--policy,--rule,--mitm,--modified,--min-size,--min-duration) are applied client-side over the fetched page — raise--limitto widen the window.conn show <id>walks all pages, falls back to the current run's history (--historysearches history directly), and prints five timing phases, proxy chain, DNS source, close reason, applied rewrites and (with--headers) captured HTTP headers.conn request <id>andconn response <id>format bodies as text or hex on a terminal (--text/--hex) and emit raw bytes when piped or written with--out.conn curl <id>outputs a replayablecurlcommand (including request body unless--no-bodyis passed, or saved separately via--body-out).harandconn export --format haromit bodies by default. With--bodies, the engine caps exports at 300 entries, 512 KB per body and 8 MB of bodies in total.
Dry-Run Rule Matching
chute rule match api.example.com
chute rule explain https://api.example.com/v1 --process Safari --protocol HTTPS
chute rule match example.com --no-resolve
Because the engine evaluates rules twice for a domain — once before DNS resolution and again after an IP address is known — rule match resolves through the engine's own resolver and prints both [pre-resolve] and [post-resolve] results whenever they can differ. rule explain additionally lists every other rule in the table that would have matched in order.
You can shape a hypothetical session with --no-resolve, --process, --process-path, --protocol (HTTP, HTTPS, TLS, TCP, UDP, QUIC, STUN, MTPROTO, DNS, DOH, DOH3, DOQ, DOT), --user-agent, --url, --src-ip, --src-port, --in-port, --in-type, --in-user, --in-name, --network, --ssid, --bssid and --from-tun. Matching runs against the live rule table while bypassing the rule-result cache in both directions.
Working with Configurations and Diagnostics
- Configuration commands (
profile):profile showprints the running configuration returned byGET /api/config, credentials included — treat its output as sensitive. A redacted copy from a diagnostic bundle cannot be loaded back:PUT /api/configrefuses any configuration containing<redacted>with HTTP400.profile check <file>validates a file without applying it.profile edit [--apply]opens the running configuration in$VISUAL/$EDITOR, validates it, and reloads when--applyis passed.profile diff <file>compares the running configuration against a file and exits3when they differ. Passing-reads from stdin. - Runtime log level (
loglevel):chute loglevel set <level> [--sections all|<a,b,c>]raises or narrows logging without reloading the engine. Supported levels arenone,fatal,warning,notify,info,verbose,kl_developerandkl_1027_developing; runchute loglevelto see available section names. - Diagnostics and files (
diag,dns,logbook):diag ping <host>sends ICMP pings, or performs a TCP connect test when--portis given.diag egressre-reads the device's own address on its physical network interface (not a proxy node's exit IP).diag internetfetchesinternet-test-urldirectly without a proxy to verify connectivity outside the tunnel.diag bundle [--out <file|dir>]saves a redacted diagnostic zip containing health, events, rules, configuration and log shards.logbook roots,ls,catandgetbrowse and download on-device files undershare,tmpandcontent(supporting--range a-bfor large files). These routes require[General] external-http-ui = true.
Output and Exit Codes
Pass --raw (or --json) to write machine-readable JSON to stdout. Progress notes, warnings and error messages always go to stderr, so redirecting stdout (chute status --raw > status.json) keeps the output clean.
| Exit Code | Meaning |
|---|---|
0 |
Success. |
1 |
Usage error (unknown command or option, missing/invalid argument, unsupported https:// remote, or chute top without a TTY). |
2 |
Request failed (engine unreachable, unauthorized 401, server error or timeout). |
3 |
Request succeeded with a negative result (invalid configuration in profile check, configuration differences in profile diff, failed probe, timed-out script, or enabling a Chute Pro feature switch without a license). |
chute profile check ./new.conf || { [ $? -eq 3 ] && echo "Configuration has errors"; }