CLI Reference
Every command, flag, and environment variable documented in one place. Use this reference when you want to share a directory, adjust access controls, or manage background shares.
Usage
localbridge [options] <directory> localbridge <command> [arguments]
Flags should appear before the directory argument because the CLI uses standard Go flag parsing.
Commands
| Command | Description |
|---|---|
| list [--json] | Show all running background shares. Use --json for machine-readable output. |
| stop <name|all> | Stop a specific background share by name, or stop all running background shares. |
| activate | Activate your Whop license key on this device. |
| reset | Clear all registered devices and keep only the current one. |
| status | Show license status: masked key, email, last verification time, and next check. |
| legal | Print the proprietary license summary and bundled third-party notices. |
| upgrade | Check for and install the latest CLI update from our servers. |
| install | Install LocalBridge binary to your system PATH. |
| uninstall | Remove LocalBridge from your system (cleans PATH and cache). |
| doctor | Run system health checks for permissions, ports, tunnel cache, and registry. |
| docs | Print the official documentation URL. |
| help [topic] | Show help for a specific topic (examples, security, ignore, config, exitcodes). |
| version | Print Local Bridge version string. |
Flags (Options)
| Flag | Default | Description |
|---|---|---|
| --password <pass> | (none) | Require a password to access shared files. Use LOCALBRIDGE_PASSWORD env var to hide from shell history. |
| --port <num> | 8080 | Local port for the embedded file server. |
| --name <name> | (auto) | Custom name for this share (used with list/stop commands). |
| --bg | false | Run the share in the background as a detached daemon process. |
| --yes, -y | false | Skip all interactive prompts. Required for CI/CD pipelines. |
| --expire <dur> | (none) | Auto-stop the share after a duration, e.g. 30m, 2h, 1d. |
| --ignore <patterns> | (none) | Comma-separated glob patterns to hide from listing (e.g. "*.log,.env"). |
| --rate-limit <num> | 60 | Maximum HTTP requests per minute per IP address. |
| --no-tunnel | false | Disable the public Cloudflare URL and keep the share on localhost only. |
| --verbose | false | Show detailed operation info (request logs, timing). |
| --debug | false | Show internal diagnostics and timing information. |
| --quiet | false | Suppress all output except errors. |
Environment Variables
| Variable | Description |
|---|---|
| LOCALBRIDGE_PASSWORD | Set the sharing password securely (avoids exposing it in shell history). |
| LOCALBRIDGE_LICENSE_KEY | License key for non-interactive activation in CI/CD. |
| LOCALBRIDGE_PORT | Override the default port (8080). |
| LOCALBRIDGE_RATE_LIMIT | Override the default rate limit (60 req/min/IP). |
| LOCALBRIDGE_IGNORE | Comma-separated ignore patterns (same as --ignore flag). |
| LOCALBRIDGE_NO_TUNNEL | Set to "1" or "true" to disable the public Cloudflare URL. |
| LOCALBRIDGE_BG | Set to "1" or "true" to run in daemon mode by default. |
Quick Examples
# Serve current directory with password localbridge --password "project-access" . # Background share with custom name and auto-expire localbridge --bg --name staging --expire 2h ./dist # Rate-limited local-only share localbridge --no-tunnel --rate-limit 30 ./public # CI/CD non-interactive activation LOCALBRIDGE_LICENSE_KEY="YOUR-KEY" localbridge activate --yes # Inspect bundled legal notices localbridge legal # List and stop shares localbridge list --json localbridge stop staging localbridge stop all