Skip to content
Login

CLI Reference

Available commands

hle expose

Expose a local service to the internet. This is the primary command for HLE clients.

Terminal window
hle expose --service http://localhost:8080 --label myapp

Expose and allow specific users in one command:

Terminal window
hle expose --service http://localhost:8080 --allow user@gmail.com --allow google:friend@gmail.com

hle auth login

Save an API key to ~/.config/hle/config.toml. Opens the dashboard in your browser to copy the key.

Terminal window
hle auth login # Interactive (opens browser)
hle auth login --api-key hle_xxx # Non-interactive

hle auth status

Show the current API key source and masked value.

Terminal window
hle auth status

hle auth logout

Remove the saved API key from ~/.config/hle/config.toml.

Terminal window
hle auth logout

hle webhook

Create a webhook tunnel for receiving HTTP callbacks from external services (GitHub, Stripe, etc.). Disables SSO gate and WebSocket, enforces path prefix filtering.

Terminal window
hle webhook --path /hook/github --forward-to http://localhost:3000/webhook

See the Webhooks guide for details on security, rate limits, and provider setup.

hle tunnels

List active tunnels for your account.

Terminal window
hle tunnels

hle access list

List access rules for a subdomain.

Terminal window
hle access list myapp-x7k

hle access add

Add an email to a subdomain’s access allow-list.

Terminal window
hle access add myapp-x7k friend@example.com --provider any

hle access remove

Remove an access rule by its ID (shown in hle access list).

Terminal window
hle access remove myapp-x7k 42

hle pin set

Set a 4-8 digit PIN for a subdomain. Visitors can enter the PIN instead of signing in with SSO.

Terminal window
hle pin set myapp-x7k

hle pin status

Show whether a PIN is currently active for a subdomain.

Terminal window
hle pin status myapp-x7k

hle pin remove

Remove the PIN for a subdomain.

Terminal window
hle pin remove myapp-x7k

hle basic-auth set

Set HTTP Basic Auth on a tunnel. Prompts for username and password (min 8 chars). Replaces any existing credentials.

Terminal window
hle basic-auth set myapp-x7k

hle basic-auth status

Show whether Basic Auth is active for a tunnel and the configured username.

Terminal window
hle basic-auth status myapp-x7k

hle basic-auth remove

Remove Basic Auth from a tunnel (makes the tunnel public again, or falls back to SSO/PIN if configured).

Terminal window
hle basic-auth remove myapp-x7k

hle share create

Create a temporary share link for time-limited access without SSO.

Terminal window
hle share create myapp-x7k --duration 24h --label "demo" --max-uses 5

hle share list

List share links for a subdomain.

Terminal window
hle share list myapp-x7k

hle share revoke

Revoke a share link by ID.

Terminal window
hle share revoke myapp-x7k 3

Flags for webhook

FlagTypeDefaultDescription
--pathstringrequiredWebhook path prefix (e.g. /hook/github). Only requests matching this prefix are forwarded
--forward-tostringrequiredLocal URL to forward webhooks to
--labelstringauto-generatedService label (used for custom zone subdomains)
--api-keystringAPI key for tunnel auth. Also checked in HLE_API_KEY env var and config file
--zonestringCustom zone domain

Flags for expose

FlagTypeDefaultDescription
--servicestringrequiredLocal service URL (e.g., http://localhost:8080)
--labelstringauto-generatedService label for the subdomain (e.g., ha, jellyfin, app1)
--authenumssoAuthentication mode: sso (OIDC) or none (public)
--api-keystringAPI key for tunnel auth. Also checked in HLE_API_KEY env var and config file
--websocketbooleanenabledEnable WebSocket proxying. Use --no-websocket to disable
--allowstringAllow an email to access the tunnel via SSO. Format: email or provider:email. Providers: any (default), google, github, hle. Repeatable. Idempotent
--verify-sslbooleanfalseEnable SSL certificate verification for the local service
--upstream-basic-authstringInject Authorization: Basic into every request forwarded to the local service. Format: USER:PASS
--forward-hostbooleanfalseForward the browser’s Host header to the local service

Global flags

These flags apply to all commands:

FlagTypeDefaultDescription
--versionShow the client version and exit
--debugbooleanfalseEnable debug logging to stderr

Common flags

All commands that talk to the server (tunnels, access, pin, basic-auth, share) accept:

FlagTypeDefaultDescription
--api-keystringAPI key for authentication. Also checked in HLE_API_KEY env var and ~/.config/hle/config.toml

Flags for access add

FlagTypeDefaultDescription
--providerenumanyRequired auth provider: any, google, github, or hle

Flags for share create

FlagTypeDefaultDescription
--durationenum24hLink validity: 1h, 24h, or 7d
--labelstringOptional label for the link
--max-usesintunlimitedMaximum number of uses

Config file

Save your API key in the config file:

api_key = "hle_your_32_char_hex_key"

Location: ~/.config/hle/config.toml

The API key is resolved in order: --api-key flag > HLE_API_KEY env var > config file.

Examples

Expose Home Assistant with custom label:

Terminal window
hle expose --service http://localhost:8123 --label ha

Expose development web app without authentication:

Terminal window
hle expose --service http://localhost:3000 --auth none

Expose and allow specific users in one command:

Terminal window
hle expose --service http://localhost:8123 --label ha --allow user@gmail.com --allow google:friend@gmail.com

List your active tunnels:

Terminal window
hle tunnels

Add a friend to your tunnel’s access list:

Terminal window
hle access add ha-x7k friend@example.com

Require GitHub login for a specific email:

Terminal window
hle access add ha-x7k colleague@work.com --provider github

View and remove access rules:

Terminal window
hle access list ha-x7k
hle access remove ha-x7k 42

Set a PIN for quick access:

Terminal window
hle pin set ha-x7k

Create a temporary share link (expires in 1 hour, max 5 uses):

Terminal window
hle share create ha-x7k --duration 1h --max-uses 5

Protect a tunnel with HTTP Basic Auth:

Terminal window
hle basic-auth set ha-x7k
hle basic-auth status ha-x7k

Expose a service that itself requires credentials (inject upstream auth):

Terminal window
hle expose --service http://localhost:8123 --upstream-basic-auth admin:yourpassword