CLI Reference and Use Cases
Command Reference
Section titled “Command Reference”broch share
Section titled “broch share”Create a tunnel to a local service.
Syntax:
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:
broch share my-appbroch share my-app --target http://localhost:3000broch share my-app --target https://myapp.local:8443broch status
Section titled “broch status”View the status of your setup, including server health, authentication status, and tunnel URL format.
broch statusbroch user slug
Section titled “broch user slug”Set or change your personal slug — the memorable part of your tunnel URLs.
Syntax:
broch user slug <slug>Example:
broch user slug mynameAfter setting your slug, tunnel URLs follow the format: {name}-myname.trial.broch.io
broch config
Section titled “broch config”View and manage your local configuration.
Subcommands:
broch config show
Section titled “broch config show”View your current configuration:
broch config showbroch config set
Section titled “broch config set”Change a configuration value:
broch config set --request-log falsebroch config set --server https://broch.yourcompany.combroch auth
Section titled “broch auth”Manage authentication.
Subcommands:
broch auth login
Section titled “broch auth login”Authenticate with the Broch server:
broch auth loginYour browser will open for sign-in.
broch auth logout
Section titled “broch auth logout”Log out and remove stored credentials:
broch auth logoutbroch -i (Interactive Mode)
Section titled “broch -i (Interactive Mode)”Launch Broch in interactive mode for a persistent session with tab completion.
broch -iInteractive commands:
sessions— List all active sessionsclose <name>— Close a specific tunnel by nameclose --all— Close all tunnelsreplay <name>— Replay HTTP requests from a tunnelhelp— Show available commands
broch feedback
Section titled “broch feedback”Send feedback directly to the Broch team (requires authentication):
broch feedback "Your message here"broch --version
Section titled “broch --version”Check the installed version:
broch --versionConfiguration Options
Section titled “Configuration Options”Common configuration keys you can set with broch config set:
| Key | Description | Default |
|---|---|---|
--request-log | Enable/disable HTTP request logging | true |
--server | Broch server URL | https://trial.broch.io |
More Help
Section titled “More Help”Get help on any command:
broch --helpbroch share --helpbroch config --help