CLI reference
Cheatsheet with every rl-tunnel command, subcommand and flag.
1 min read
A quick table to glance at and remember the commands. Run rl-tunnel --help for the full list in your installed version.
Tunnels
| Command | What it does |
|---|---|
| rl-tunnel http 8080 | Creates a basic HTTP/HTTPS tunnel. |
| rl-tunnel http 3000 --subdomain my-app | Creates a tunnel with a friendly, persistent URL (the name must be reserved in your account). |
| rl-tunnel tcp 5432 | Exposes local TCP connections (ideal for giving temporary access to your PostgreSQL to another dev). Needs an account. |
| rl-tunnel start --all | Starts every tunnel defined in rl-tunnel.yml (or name them: start web api). |
| rl-tunnel inspect 12 | Shows the full request and response of entry #12 of the live log (--last for the most recent). |
| rl-tunnel replay 12 | Sends request #12 to your local app again (--last, --target 3001). |
| rl-tunnel --version | Shows the installed version. |
| rl-tunnel --help | Lists every parameter and configuration option available. |
Flags for http and tcp
| Flag | Description |
|---|---|
| --subdomain <name> | Reserved subdomain, such as my-app.t.resolvelabs.com.br. http only. |
| --auth "user:pass" | Requires Basic Auth before traffic reaches your machine. http only. |
| --allow-ip <ip|cidr> | Only accepts traffic from this IP or range. Repeatable. |
| --host-header <host> | Host sent to your app (default: the local target, such as localhost:3000). http only. |
| --preserve-host | Sends your app the public host instead of the local one. http only. |
| --random-url | Random URL even if you have a reserved subdomain. http only. |
| --no-body | Doesn't capture request and response bodies in the inspector. |
| --log <file> | Also writes every request to a file as JSON lines. |
| --debug | Prints detailed connection logs. |
Accounts
| Command | What it does |
|---|---|
| rl-tunnel auth login | Opens the browser to link the CLI to your account (--no-browser to just print the URL). |
| rl-tunnel auth token <token> | Saves an access token (CI and servers). |
| rl-tunnel auth logout | Removes the credentials from this machine. |
| rl-tunnel whoami | Shows the account in use and its reserved subdomains. |
terminal
rl-tunnel whoamiHelp
terminal
rl-tunnel --helprl-tunnel http --help