cnb command reference
Every command of the Linux `cnb` command line. It shares the same connection as the local web UI.
Host
| Command | Description |
|---|---|
cnb daemon [--foreground] [--web-port N] [--no-web] | Start the local host (runs in the background by default) |
cnb stop | Disconnect 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
| Command | Description |
|---|---|
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 logout | Log out |
cnb plan | Show your current plan |
cnb orders | Show orders |
Connection
| Command | Description |
|---|---|
cnb connect [--mode pac|explicit|tun] [--wait 90s] | Connect and print the actual port and environment variables |
cnb disconnect | Disconnect |
cnb env [--unset] [--shell sh|fish] | Print proxy environment variables (the actual listening address); use eval "$(cnb env)" |
cnb mode pac|explicit|tun | Switch the connection mode |
cnb port N | Set the preferred local proxy port |
cnb dns system / cnb dns custom HOST[:PORT] | DNS settings |
Sharing with Docker / VMs
| Command | Description |
|---|---|
cnb share status | Show sharing status |
cnb share on --cidr 172.17.0.0/16[,…] | Turn on sharing for the given private ranges only |
cnb share off | Turn off sharing |
cnb share credential create NAME | Create guest credentials (the password is shown only once) |
cnb share credential revoke ID | Revoke credentials |
Other
| Command | Description |
|---|---|
cnb domain request DOMAIN [--kind auto|manual] [--note TEXT] | Request a domain for acceleration |
cnb domain list / grants / delete ID / restore ID | List requests, list grants, delete, restore |
cnb ticket list / new --subject S --content C / reply ID TEXT | Tickets |
cnb logs [--level warn] [--limit N] / cnb logs export [--out PATH] | Logs |
cnb diag | Collect diagnostics |
cnb ipc CHANNEL [JSON] | Call an IPC channel directly (for troubleshooting) |
cnb version | Version |
Handy combinations
# 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 .