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

CommandDescription
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.
activateActivate your Whop license key on this device.
resetClear all registered devices and keep only the current one.
statusShow license status: masked key, email, last verification time, and next check.
legalPrint the proprietary license summary and bundled third-party notices.
upgradeCheck for and install the latest CLI update from our servers.
installInstall LocalBridge binary to your system PATH.
uninstallRemove LocalBridge from your system (cleans PATH and cache).
doctorRun system health checks for permissions, ports, tunnel cache, and registry.
docsPrint the official documentation URL.
help [topic]Show help for a specific topic (examples, security, ignore, config, exitcodes).
versionPrint Local Bridge version string.

Flags (Options)

FlagDefaultDescription
--password <pass>(none)Require a password to access shared files. Use LOCALBRIDGE_PASSWORD env var to hide from shell history.
--port <num>8080Local port for the embedded file server.
--name <name>(auto)Custom name for this share (used with list/stop commands).
--bgfalseRun the share in the background as a detached daemon process.
--yes, -yfalseSkip 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>60Maximum HTTP requests per minute per IP address.
--no-tunnelfalseDisable the public Cloudflare URL and keep the share on localhost only.
--verbosefalseShow detailed operation info (request logs, timing).
--debugfalseShow internal diagnostics and timing information.
--quietfalseSuppress all output except errors.

Environment Variables

VariableDescription
LOCALBRIDGE_PASSWORDSet the sharing password securely (avoids exposing it in shell history).
LOCALBRIDGE_LICENSE_KEYLicense key for non-interactive activation in CI/CD.
LOCALBRIDGE_PORTOverride the default port (8080).
LOCALBRIDGE_RATE_LIMITOverride the default rate limit (60 req/min/IP).
LOCALBRIDGE_IGNOREComma-separated ignore patterns (same as --ignore flag).
LOCALBRIDGE_NO_TUNNELSet to "1" or "true" to disable the public Cloudflare URL.
LOCALBRIDGE_BGSet 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