Skip to content

cli

dbx tunnel - front a command with a public portr tunnel and passwordless gate.

This is the WRAPPER path, and it exists for one case: a project that does not use @dbx-tools/appkit’s createApp, and therefore cannot register tunnelInterceptor() + the authGate plugin in-process. An AppKit app should still take the plugin path - one process, no proxy hop, no duplicated header handling.

The wrapper claims the PUBLIC port (DATABRICKS_APP_PORT, the port the platform and portr route to), moves the wrapped app to a private one, and reverse-proxies between them so the gate sits in front of traffic it would otherwise have no way to intercept. Everything else is delegated: the gate config comes from plugin.resolveAuthGateConfig, the portr lifecycle from portr.* - both the same functions the in-process path uses.

Ships no bin. @dbx-tools/cli mounts buildProgram() as dbx tunnel lazily, so dbx dev pays for none of this, and --insecure / status / install never load AppKit or the SMTP stack either (the gate app is behind a dynamic import).

Re-exports CommanderError