tnl

module
v0.1.0-rc.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2026 License: MIT

README

tnl

A URL for every worktree.

tnl gives your development app a stable HTTPS URL. Run it on your laptop or a remote machine, and open it in your browser.

Working with coding agents? Give each one a Git worktree. Each worktree gets its own URL, so you can try their changes side by side.

main worktree       --> its own URL --> browser tab 1
checkout worktree   --> its own URL --> browser tab 2
redesign worktree   --> its own URL --> browser tab 3

try it

Have an app running on port 3000? From its project directory:

brew install tnldotdev/tap/tnl
tnl publish 3000

Sign in when prompted, then open the HTTPS URL tnl prints. Keep tnl running while you use it. tnl.dev hosts the service, so there's no server to set up.

By default, only connections from the public IP of the machine running tnl are allowed.

Available for macOS and Linux. Other ways to install.

make it your dev command

With the Next.js or Vite integration set up, start your app with:

tnl dev

tnl follows the port your app actually uses, and live reload works through the URL. Run it in each worktree. Its URL stays the same across restarts.

develop on a remote machine

Let a remote machine run your app and your agents while you review their work in your laptop's browser. Run tnl beside the app and add your laptop's public IP with --allow-ip. To let anyone connect, use --allow-all-ips instead.

why tnl?

ngrok and Cloudflare Tunnel put apps online too. tnl focuses on the development workflow: automatic worktree URLs, Next.js and Vite integration, and one command to start your app. HTTPS stays encrypted until it reaches tnl on your machine. Use our hosted service or run your own.

learn more

Commands · Project setup · Automation · Contributing

telemetry

tnl sends usage telemetry by default, including when self-hosted. Disable it with TNL_NO_TELEMETRY=true. What gets sent.

license

Client and server: MIT. Dependency notices.

Directories

Path Synopsis
cmd
tnl command
Command tnl is the client entry point for tnl.
Command tnl is the client entry point for tnl.
tnlbench command
Command tnlbench measures the complete tnl route path.
Command tnlbench measures the complete tnl route path.
tnld command
Command tnld runs the tnl server daemon.
Command tnld runs the tnl server daemon.
internal
authorityapi
Package authorityapi serves the built-in authority HTTP API.
Package authorityapi serves the built-in authority HTTP API.
authorityclient
Package authorityclient calls the authority API.
Package authorityclient calls the authority API.
authorization
Package authorization authorizes control operations and builds stable request hashes.
Package authorization authorizes control operations and builds stable request hashes.
benchworkload
Package benchworkload contains the publisher and visitor workloads shared by local runtime tests and deployed benchmarks.
Package benchworkload contains the publisher and visitor workloads shared by local runtime tests and deployed benchmarks.
certificates
Package certificates uses ACME to issue route and relay transport certificates.
Package certificates uses ACME to issue route and relay transport certificates.
clientauth
Package clientauth handles CLI login and coordinates control-session refresh.
Package clientauth handles CLI login and coordinates control-session refresh.
clientstate
Package clientstate stores local client data and tunnel snapshots.
Package clientstate stores local client data and tunnel snapshots.
clioutput
Package clioutput renders stable human-readable CLI diagrams.
Package clioutput renders stable human-readable CLI diagrams.
config
Package config defines the versioned YAML and JSON configuration format.
Package config defines the versioned YAML and JSON configuration format.
controlapi
Package controlapi serves the control API and authorizes route operations.
Package controlapi serves the control API and authorizes route operations.
controlclient
Package controlclient calls the tnl control API.
Package controlclient calls the tnl control API.
controlstate
Package controlstate stores persistent control state in PostgreSQL and changes that state in transactions.
Package controlstate stores persistent control state in PostgreSQL and changes that state in transactions.
controltls
Package controltls configures automatic public TLS for the control API.
Package controltls configures automatic public TLS for the control API.
credentials
Package credentials creates and validates typed credentials.
Package credentials creates and validates typed credentials.
diagnostic
Package diagnostic defines stable, user-facing diagnostics for tnl failures.
Package diagnostic defines stable, user-facing diagnostics for tnl failures.
dnscontroller
Package dnscontroller applies persistent DNS changes requested by control.
Package dnscontroller applies persistent DNS changes requested by control.
filelock
Package filelock acquires user-owned, mode-0600 regular lock files on Unix.
Package filelock acquires user-owned, mode-0600 regular lock files on Unix.
httpjson
Package httpjson reads and writes size-limited JSON.
Package httpjson reads and writes size-limited JSON.
ingress
Package ingress routes TLS connections by exact SNI hostname without terminating their TLS.
Package ingress routes TLS connections by exact SNI hostname without terminating their TLS.
ingressapi
Package ingressapi serves control's private API for ingress processes.
Package ingressapi serves control's private API for ingress processes.
localproxy
Package localproxy forwards one public hostname to one local HTTP target.
Package localproxy forwards one public hostname to one local HTTP target.
muxsession
Package muxsession carries multiplexed byte streams over supported transports.
Package muxsession carries multiplexed byte streams over supported transports.
naming
Package naming defines public-hostname rules used by control and ingress.
Package naming defines public-hostname rules used by control and ingress.
observability
Package observability provides process and service metrics without depending on one metrics provider.
Package observability provides process and service metrics without depending on one metrics provider.
oidcauth
Package oidcauth implements OIDC authentication and CLI login flows.
Package oidcauth implements OIDC authentication and CLI login flows.
opaqueid
Package opaqueid creates and validates opaque 128-bit identifiers.
Package opaqueid creates and validates opaque 128-bit identifiers.
projectconfig
Package projectconfig finds, loads, and validates project configuration.
Package projectconfig finds, loads, and validates project configuration.
projectmeta
Package projectmeta validates and writes browser-safe project metadata.
Package projectmeta validates and writes browser-safe project metadata.
proxyproto
Package proxyproto implements tnl's strict PROXY protocol v2 boundary.
Package proxyproto implements tnl's strict PROXY protocol v2 boundary.
publisher
Package publisher publishes one local service through a public route.
Package publisher publishes one local service through a public route.
relayapi
Package relayapi serves control's private API for relay processes.
Package relayapi serves control's private API for relay processes.
routebackend
Package routebackend defines how ingress opens a visitor stream to a publisher.
Package routebackend defines how ingress opens a visitor stream to a publisher.
router
Package router reads a size-limited TLS ClientHello and preserves every byte so the connection can replay it.
Package router reads a size-limited TLS ClientHello and preserves every byte so the connection can replay it.
routeusage
Package routeusage defines route usage data that can be combined across reports.
Package routeusage defines route usage data that can be combined across reports.
routeusageworker
Package routeusageworker finishes and sends stored route usage reports.
Package routeusageworker finishes and sends stored route usage reports.
serviceapi
Package serviceapi provides HTTP helpers for the private service APIs.
Package serviceapi provides HTTP helpers for the private service APIs.
sourcelimiter
Package sourcelimiter limits new visitor connections by source IP address.
Package sourcelimiter limits new visitor connections by source IP address.
sqlite
Package sqlite manages client SQLite connections and migrations.
Package sqlite manages client SQLite connections and migrations.
storagekey
Package storagekey encrypts recoverable secrets stored by control.
Package storagekey encrypts recoverable secrets stored by control.
streamcopy
Package streamcopy copies bytes in both directions and preserves half-closes.
Package streamcopy copies bytes in both directions and preserves half-closes.
tlschallenge
Package tlschallenge manages publisher-local TLS challenge keys and certificates.
Package tlschallenge manages publisher-local TLS challenge keys and certificates.
tnldconfig
Package tnldconfig loads and validates tnld process configuration.
Package tnldconfig loads and validates tnld process configuration.
tunnel
Package tunnel runs tunnelv1 sessions over supported transports.
Package tunnel runs tunnelv1 sessions over supported transports.
pkg
api/authorityv1
Package authorityv1 provides primitives to interact with the openapi HTTP API.
Package authorityv1 provides primitives to interact with the openapi HTTP API.
api/controlv1
Package controlv1 provides primitives to interact with the openapi HTTP API.
Package controlv1 provides primitives to interact with the openapi HTTP API.
api/ingressv1
Package ingressv1 provides primitives to interact with the openapi HTTP API.
Package ingressv1 provides primitives to interact with the openapi HTTP API.
api/relayv1
Package relayv1 provides primitives to interact with the openapi HTTP API.
Package relayv1 provides primitives to interact with the openapi HTTP API.
api/routeusagev1
Package routeusagev1 provides primitives to interact with the openapi HTTP API.
Package routeusagev1 provides primitives to interact with the openapi HTTP API.
protocol/tunnelv1
Package tunnelv1 defines messages for publisher connections and visitor streams.
Package tunnelv1 defines messages for publisher connections and visitor streams.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL