Skip to content

CLI Reference and Use Cases

Create a tunnel to a local service.

Syntax:

Terminal window
broch share <name> [--target <url>]

Options:

  • <name> — Name for this tunnel (used in your URL)
  • --target <url> — Target service URL (default: http://localhost:80)

Examples:

Terminal window
broch share my-app
broch share my-app --target http://localhost:3000
broch share my-app --target https://myapp.local:8443

View the status of your setup, including server health, authentication status, and tunnel URL format.

Terminal window
broch status

Set or change your personal slug — the memorable part of your tunnel URLs.

Syntax:

Terminal window
broch user slug <slug>

Example:

Terminal window
broch user slug myname

After setting your slug, tunnel URLs follow the format: {name}-myname.trial.broch.io

View and manage your local configuration.

Subcommands:

View your current configuration:

Terminal window
broch config show

Change a configuration value:

Terminal window
broch config set --request-log false
broch config set --server https://broch.yourcompany.com

Manage authentication.

Subcommands:

Authenticate with the Broch server:

Terminal window
broch auth login

Your browser will open for sign-in.

Log out and remove stored credentials:

Terminal window
broch auth logout

Launch Broch in interactive mode for a persistent session with tab completion.

Terminal window
broch -i

Interactive commands:

  • sessions — List all active sessions
  • close <name> — Close a specific tunnel by name
  • close --all — Close all tunnels
  • replay <name> — Replay HTTP requests from a tunnel
  • help — Show available commands

Send feedback directly to the Broch team (requires authentication):

Terminal window
broch feedback "Your message here"

Check the installed version:

Terminal window
broch --version

Common configuration keys you can set with broch config set:

KeyDescriptionDefault
--request-logEnable/disable HTTP request loggingtrue
--serverBroch server URLhttps://trial.broch.io

Get help on any command:

Terminal window
broch --help
broch share --help
broch config --help