funnel

Contexts

Manage connections to multiple funnel servers

Contexts let you configure and switch between multiple funnel servers. Each context stores a server URL and authentication token.

Config file

Contexts are stored in ~/.config/funnel/config.toml:

current_context = "production"

[contexts.production]
server = "https://tunnel.example.com"
token = "fnl_abc123..."

[contexts.staging]
server = "https://staging.tunnel.example.com"
token = "fnl_def456..."

The file is created with 0600 permissions to protect tokens.

Create a context

funnel context create production --server https://tunnel.example.com

The first context you create automatically becomes the active one.

Switch contexts

funnel context use staging

All subsequent commands use the staging server and token.

List contexts

funnel context list

Delete a context

funnel context delete staging

If you delete the active context, funnel switches to the next available one.

Environment overrides

Environment variables take precedence over the config file:

VariableOverrides
FUNNEL_CONTEXTActive context name
FUNNEL_SERVERServer URL for the resolved context
FUNNEL_TOKENToken for the resolved context

This is useful in CI or scripts where you don't want to modify the config file:

FUNNEL_SERVER=https://ci.tunnel.example.com FUNNEL_TOKEN=fnl_ci_key funnel http 3000

Per-command override

You can also override the context for a single command with --context:

funnel --context staging status

On this page