LogoRobo.js

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 -t

This 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
FlagDescriptionDefault
-p, --port <number>Port to tunnelPORT env or 3000
-u, --url <url>Custom URL to tunnel (overrides port)
-a, --attachRun in foreground (stops on Ctrl+C)Detached (background)
-v, --verboseShow 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 -v

Default 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 list

Displays 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
FlagDescription
--all, -aStop all running tunnels
--verbose, -vShow 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
OptionDescriptionDefault
-p <number>Port to tunnelPORT env or 3000
# Tunnel a specific port
/tunnel start -p 8080

If 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
OptionDescription
--all, -aStop all running tunnels

/tunnel list

List all running tunnels with their ID, port, uptime, and public URL:

/tunnel list

Server 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 status

Shows server hostname, port, engine type, route count, uptime, tunnel status, and CORS configuration.

/server routes

List all registered API routes:

/server routes
OptionDescriptionDefault
-f, --filter <string>Filter routes by path pattern
-p, --page <number>Page number1
-n, --per-page <number>Items per page15
# Filter routes by pattern
/server routes -f users

# Show page 2
/server routes -p 2

Displays route path, source file, and plugin owner.

/server curl

Test an API route directly from the terminal:

/server curl <method> <path>
OptionDescription
-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 openapi

Reads .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.

Next steps

On this page