CLI reference
Run kanri with no arguments for the TUI. Any subcommand runs it in CLI
mode instead: prints once, exits, scriptable. --json works on every
subcommand and switches to machine-readable output.
Every subcommand here is the exact same code path the TUI uses —
there is one implementation per action, not a separate CLI and TUI
version of each. The TUI’s : command line even parses with this same
grammar, so anything you can run from a shell you can also run without
leaving the TUI.
kanri [OPTIONS] [COMMAND]
Options:
--json Emit machine-readable JSON instead of human-readable text
--config <CONFIG> Path to an alternate config.toml (defaults to the XDG config dir)
net — network devices and connections (NetworkManager)
| Command | Does |
|---|---|
net list | List devices and saved connections |
net show <device> | Full detail for one device, by interface name |
net up <name> | Activate a saved connection profile |
net down <name> | Deactivate a saved connection profile, if active |
net disconnect <device> | Disconnect whatever’s active on a device |
net forget <name> | Permanently delete a saved connection profile |
net connect-wifi <ssid> [--password <pw>] | Create and activate a new WiFi connection |
net wg-up <interface> | Bring a WireGuard interface up via wg-quick — needs a matching sudo rule for that exact interface name (see wireguard.md) |
net wg-down <interface> | Bring a WireGuard interface down via wg-quick |
proc — processes and CPU usage
| Command | Does |
|---|---|
proc list [--sort cpu|mem|pid|name] [--filter <text>] | List running processes (default sort: cpu) |
proc kill <pid> [--signal term|kill] | Send a signal (default: term) |
proc renice <pid> <value> | Change nice value (-20 highest priority, 19 lowest) |
ts — Tailscale status and control
| Command | Does |
|---|---|
ts status | This device + tailnet peers |
ts up | Connect to the tailnet — no elevated privilege needed on a typical setup |
ts down | Disconnect. Doesn’t touch your normal internet route — Tailscale is an overlay network, not your default route |
ts exit-node [node] | Set the active exit node by hostname or IP; omit node to clear it. Routes all of this device’s traffic through the chosen node — treat this one with real caution, unlike a plain up/down toggle |
One-shot system info
| Command | Does |
|---|---|
overview | CPU, memory, network throughput, disks — one snapshot |
mem | Memory and swap usage |
disk | Disk usage by mount point |
hw | Host/CPU/kernel info and live sensor temperatures |
--json shape
Every command’s --json output is the same data the human-readable text
is built from — nothing is dropped or summarized differently between the
two. Field names are plain snake_case, matching the Rust struct they
come from. Pipe through jq as usual; kanri handles a closed pipe
(kanri disk --json | jq '.[0]') the same way df/free do, not with
a broken-pipe panic.
What’s TUI-only, for now
net show’s sub-views beyond the device/connection list — Diagnostics,
Sockets, subnet Scan, per-process Bandwidth, WireGuard status (write
control via wg-up/wg-down is scriptable, reading status isn’t yet),
and live packet Capture — don’t have CLI equivalents yet. They’re real,
working features, just reachable from the TUI only so far.