cnb command reference

Every command of the Linux `cnb` command line. It shares the same connection as the local web UI.

Host

CommandDescription
cnb daemon [--foreground] [--web-port N] [--no-web]Start the local host (runs in the background by default)
cnb stopDisconnect and stop the host
cnb status [--json]Show account, connection, entry and host status
cnb web [--revoke]Print a one-time login link for the local web UI; --revoke invalidates all browser sessions

Account

CommandDescription
cnb login [--email E] [--password-stdin]Log in (the password is not echoed)
cnb register --email E [--nickname N] [--referral CODE] [--agree-tos]Sign up
cnb logoutLog out
cnb planShow your current plan
cnb ordersShow orders

Connection

CommandDescription
cnb connect [--mode pac|explicit|tun] [--wait 90s]Connect and print the actual port and environment variables
cnb disconnectDisconnect
cnb env [--unset] [--shell sh|fish]Print proxy environment variables (the actual listening address); use eval "$(cnb env)"
cnb mode pac|explicit|tunSwitch the connection mode
cnb port NSet the preferred local proxy port
cnb dns system / cnb dns custom HOST[:PORT]DNS settings

Sharing with Docker / VMs

CommandDescription
cnb share statusShow sharing status
cnb share on --cidr 172.17.0.0/16[,…]Turn on sharing for the given private ranges only
cnb share offTurn off sharing
cnb share credential create NAMECreate guest credentials (the password is shown only once)
cnb share credential revoke IDRevoke credentials

Other

CommandDescription
cnb domain request DOMAIN [--kind auto|manual] [--note TEXT]Request a domain for acceleration
cnb domain list / grants / delete ID / restore IDList requests, list grants, delete, restore
cnb ticket list / new --subject S --content C / reply ID TEXTTickets
cnb logs [--level warn] [--limit N] / cnb logs export [--out PATH]Logs
cnb diagCollect diagnostics
cnb ipc CHANNEL [JSON]Call an IPC channel directly (for troubleshooting)
cnb versionVersion

Handy combinations

bash
# connect after boot and set up the current shell in one go
cnb daemon && cnb connect && eval "$(cnb env)"

# wait for the connection in a script
cnb connect --wait 90s || exit 1

# get status as JSON for jq
cnb status --json | jq .