tnl.dev :: docs
start with tnl.
Try a public URL, then give your local app one.
try tnl in one command
Run the local demo without installing a project dependency or signing in:
npx --yes @tnldotdev/tnl publish --demoThe public URL opens when ready. Click ping to send a request to the demo on your computer. Match the URL and ping count with your terminal. The page also shows the round-trip time and when your computer sent the pong. Ctrl+C stops the demo and removes its URL.
On tnl.dev, guests can run one demo at a time. The secret link admits visitors to that demo and is printed once; keep it private. Your guest credential expires after 72 hours, with 20 cumulative minutes ready, including idle time, across runs. Run tnl auth login to publish your own app.
install tnl for your project
From your app's project directory, add the client as a development dependency:
npm install -D @tnldotdev/tnlinitialize a project
Let tnl init create your project configuration:
npx tnl initFollow the printed framework setup actions. Init adds /.tnl/local/ to the selected project root's .gitignore for worktree- and installation-dependent runtime metadata. Run tnl generate for portable declarations and keep .tnl/generated/ trackable. The project file opts each public service into HTTPS:
import { defineConfig } from "@tnldotdev/tnl/config";
export default defineConfig({
services: { app: { publicURL: {} } },
});Without publicURL, a service is private, even with default HTTP. See project configuration.
start your app
Run your app's usual development script:
npm run devVite and Next.js start on localhost without a tnl account, and keep running if control is offline. They report when the preview is unavailable rather than showing a public URL. Run tnl auth login to enable a preview, then restart your app. In another terminal, run tnl status --scope=local to see the URL and tnl wait to check public readiness. Each Git worktree gets its own default public URL. Visitors need a current sign-in, share link, or URL-scoped token; choose who can visit to change that.
Stop the app with Ctrl+C. Its public URL stays saved for the next publish run; the app is not reachable while stopped. Starting the app does not redeploy remote configuration; use tnl apply for declared publisher-group changes.
publish an app that is already running
If your HTTP app already listens on port 3000, publish it without starting it again:
npx tnl publish 3000See publish for visitor access and saved URLs.
where to go next
See development for worktrees and multiple services, webhooks for provider events, private services for native clients, or publisher groups to run replicas near remote targets.