CLI
Command-line tools for managing tunnels, inspecting routes, and server development.
The server plugin extends the Robo CLI with tunnel management commands and a dev server tunnel flag. It also adds /server terminal commands for inspecting server state during development.
robo dev -t
Start the dev server with a Cloudflare tunnel:
npx robo dev -tThis starts your Robo in dev mode and creates a quick tunnel. The public URL is displayed in the terminal. Requires the PORT environment variable to be set (the tunnel needs to know which port to forward to).
robo tunnel start
Start a standalone tunnel:
npx robo tunnel start| Flag | Description | Default |
|---|---|---|
-p, --port <number> | Port to tunnel | PORT env or 3000 |
-u, --url <url> | Custom URL to tunnel (overrides port) | — |
-a, --attach | Run in foreground (stops on Ctrl+C) | Detached (background) |
-v, --verbose | Show detailed tunnel output | — |
# Tunnel a specific port
npx robo tunnel start -p 8080
# Tunnel a custom URL
npx robo tunnel start -u http://localhost:8080
# Run in foreground
npx robo tunnel start --attach
# With verbose output
npx robo tunnel start -vDefault mode is detached — the tunnel runs in the background and you can continue using the terminal.
robo tunnel list
List all running tunnels:
npx robo tunnel listDisplays a table with tunnel ID, port, age, and public URL. Dead processes are automatically cleaned up.
robo tunnel stop
Stop a running tunnel:
npx robo tunnel stop <id>Stop all tunnels:
npx robo tunnel stop --all| Flag | Description |
|---|---|
--all, -a | Stop all running tunnels |
--verbose, -v | Show detailed output |
Terminal Commands
The server plugin also extends the robo dev interactive terminal with /tunnel commands. These mirror the CLI tunnel commands above but run directly inside your dev session — no second terminal needed.
/tunnel
Show available tunnel subcommands:
/tunnel/tunnel start
Start a Cloudflare tunnel in the background:
/tunnel start| Option | Description | Default |
|---|---|---|
-p <number> | Port to tunnel | PORT env or 3000 |
# Tunnel a specific port
/tunnel start -p 8080If a tunnel is already running on the target port, the command shows the existing tunnel's ID and URL instead of starting a duplicate.
/tunnel stop
Stop a running tunnel by ID:
/tunnel stop <id>Stop all running tunnels:
/tunnel stop --all| Option | Description |
|---|---|
--all, -a | Stop all running tunnels |
/tunnel list
List all running tunnels with their ID, port, uptime, and public URL:
/tunnel listServer Commands
The server plugin also adds /server commands for inspecting server state and testing routes during development.
/server
Show available server subcommands:
/server/server status
Display a server status dashboard:
/server statusShows server hostname, port, engine type, route count, uptime, tunnel status, and CORS configuration.
/server routes
List all registered API routes:
/server routes| Option | Description | Default |
|---|---|---|
-f, --filter <string> | Filter routes by path pattern | — |
-p, --page <number> | Page number | 1 |
-n, --per-page <number> | Items per page | 15 |
# Filter routes by pattern
/server routes -f users
# Show page 2
/server routes -p 2Displays route path, source file, and plugin owner.
/server curl
Test an API route directly from the terminal:
/server curl <method> <path>| Option | Description |
|---|---|
-b, --body <string> | Request body (JSON string) |
-H, --header <string> | Request header (Key: Value) |
# GET request
/server curl /api/hello
# POST with body
/server curl POST /api/users -b '{"name":"Robo"}'
# With custom header
/server curl GET /api/data -H "Authorization: Bearer token"If no method is specified, defaults to GET. Displays status code, response headers, and body.
/server openapi
View a summary of the generated OpenAPI spec:
/server openapiReads .robo/openapi.json and displays the number of paths, endpoints, and schemas. If the file doesn't exist, prompts you to run robo build first.
