TunnelFlow logoTunnelFlow

Documentation

Everything you need to know about TunnelFlow — from installation to advanced Pro features. Use the sidebar to jump to any section.

#Installation

TunnelFlow's CLI is a single npm package. Install it globally:

terminal
npm install -g tunnelflow

Requirements: Node.js 18+ and npm. Works on macOS, Linux, and Windows.

After installing, verify it works:

terminal
tflow --version

#Authentication

Sign in to tunnelflow.dev with your GitHub account. Copy your auth token from the dashboard and save it to the CLI:

terminal
tflow login YOUR_AUTH_TOKEN

Your token is stored in ~/.tflow/config.json. You can also pass it per-command with --token.

To check your current auth status:

terminal
tflow status

To sign out and remove the saved token:

terminal
tflow logout

#Quick Start

Start your local dev server (e.g. on port 3000), then expose it:

terminal
tflow connect 3000

TunnelFlow creates a secure HTTPS tunnel and gives you a public URL like https://a3f9b1c2.tunnelflow.dev. All HTTP traffic to that URL is forwarded to your localhost:3000 in real time.

You'll see live traffic in the terminal as requests come in:

output
✓ Tunnel established
  Forwarding  https://a3f9b1c2.tunnelflow.dev → localhost:3000

  GET    /           200 (34ms)
  POST   /webhook    201 (12ms)
  PUT    /api/users  200 (8ms)

#Tunnelling

The core of TunnelFlow. Expose any local port to the internet over a secure HTTPS connection with auto-renewing wildcard TLS certificates.

terminal
tflow connect <port>

Options:

  • -t, --token <token> — Override saved auth token
  • -s, --subdomain <name> — Request a custom subdomain (Pro)
  • --server <url> — Custom tunnel server URL

The tunnel stays open as long as the CLI is running. Press Ctrl+C to disconnect.

#File Sharing

Share any file or folder directly from your machine — no uploads, no cloud storage. TunnelFlow serves it via a built-in file server.

terminal
tflow share ./my-folder

This creates a tunnel that serves the file or directory with a clean file browser UI. Share the generated URL with anyone.

Supports the same --subdomain and --token options as tflow connect.

#Custom Subdomains

Free users get a random subdomain (e.g. a3f9b1c2.tunnelflow.dev) that changes on each reconnect.

Pro users can reserve a persistent custom subdomain that stays the same across sessions:

terminal
tflow connect 3000 --subdomain my-api

This gives you https://my-api.tunnelflow.dev — a stable URL you can share with clients, put in webhook configs, or add to CI pipelines.

#Auto-Reconnect

If your connection drops (laptop sleeps, Wi-Fi hiccup), TunnelFlow automatically reconnects and restores your subdomain within a 60-second grace window. No action needed — the CLI handles it.

You'll see a reconnecting message in the terminal, and once restored the same URL continues working.

Pro Features

Everything below requires a Pro subscription ($5/mo). Upgrade from the dashboard or pricing page.

#Traffic InspectorPro

A real-time feed of every HTTP request and response passing through your tunnel. Available in the dashboard under the Inspector tab.

For each request you can see:

  • Method, path, query string, and status code
  • Full request and response headers
  • Request and response body (base64-decoded, with JSON pretty-printing)
  • Latency in milliseconds
  • Timestamp

Request Replay

Click any request in the inspector and hit Replay to re-send the exact same request to your tunnel. Useful for retesting a webhook or reproducing a failed request without triggering the original source.

Filtering

Filter the traffic list by HTTP method (GET, POST, PUT, etc.) and status code range (2xx, 4xx, 5xx) using the dropdowns at the top of the inspector.

#Request BreakpointsPro

Intercept incoming HTTP requests before they reach your local server. Like a debugger breakpoint, but for network traffic.

How to use

  1. Go to the Breakpoints tab in your dashboard
  2. Select a tunnel from the dropdown and toggle breakpoints ON
  3. Any incoming request now pauses instead of being forwarded
  4. Click a paused request to inspect its headers and body
  5. Edit headers or body if needed
  6. Click Release to forward (with your edits) or Drop to reject it

Paused requests auto-timeout after 2 minutes if not acted on. The breakpoint panel polls every second so you see new requests instantly.

Use cases

  • Debug webhook payloads by inspecting them before your handler sees them
  • Test how your app handles modified headers (auth tokens, content types)
  • Manually approve/reject requests during sensitive testing

#Webhook SimulatorPro

Fire realistic webhook payloads at your tunnel without triggering real events. Accessible from the Tools button inside the Inspector tab.

Supported providers

ProviderEvents
Stripepayment_intent.succeeded, checkout.session.completed, invoice.payment_failed, customer.subscription.deleted
GitHubpush, pull_request.opened, issues.opened
Shopifyorders/create, products/update
Slackurl_verification, event_callback (message)
CustomAny method, path, headers, and body you define

Payload signing

Enter your webhook signing secret and TunnelFlow computes the correct HMAC signature for each provider:

  • Stripestripe-signature header with t=timestamp,v1=hmac
  • GitHubx-hub-signature-256 header with sha256=hmac
  • Shopifyx-shopify-hmac-sha256 header
  • Slackx-slack-signature header with v0=hmac

This means your webhook verification code works exactly as it would in production.

#Record & Replay SessionsPro

Record a sequence of HTTP requests passing through your tunnel, then replay the entire sequence later with original timing.

From the Dashboard

  1. Open the Tools panel in the Inspector tab
  2. Give your session a name (optional) and click Record
  3. Use your app normally — all traffic is being captured
  4. Click Stop when done
  5. Your session appears in the list with request count and date
  6. Click Replay to fire the same requests with the same timing

From the CLI

Replay a saved session by ID:

terminal
tflow replay 42

This calls the server which fires each recorded request sequentially with the original delays between them.

Use cases

  • Reproduce a multi-step bug flow exactly as it happened
  • Run regression tests by replaying a known-good session after code changes
  • Demo a user workflow to a colleague without manually clicking through it

#tflow inspect — Live TUI Traffic ViewerPro

A full-screen terminal UI that shows real-time traffic across all your active tunnels. No browser needed — works over SSH too.

terminal
tflow inspect

Keyboard shortcuts

KeyAction
↑ / kMove selection up
↓ / jMove selection down
EnterExpand selected request (show details)
EscBack to list from detail view
q / Ctrl+CQuit

The table shows time, method, path, status code, and latency for every request. New events push to the top in real time. The currently selected row is highlighted.

#Multi-Port RoutingPro

Route different URL paths on a single public tunnel URL to different local ports. For example, serve your frontend on port 3000 and your API on port 3001 through one subdomain.

Setup

  1. Go to the Rules tab in the dashboard
  2. Add a new rule with type Route to Port
  3. Set the path pattern (e.g. /api/*) and target port (e.g. 3001)
  4. Connect multiple CLI instances to the same subdomain with different ports:
terminal
# Terminal 1 — frontend
tflow connect 3000 --subdomain myapp

# Terminal 2 — API
tflow connect 3001 --subdomain myapp

# Terminal 3 — admin panel
tflow connect 3002 --subdomain myapp

Now https://myapp.tunnelflow.dev/api/* goes to port 3001, and everything else goes to port 3000 (the default). Add as many route rules as you need.

Generate a shareable, read-only URL that lets anyone watch your tunnel traffic live in their browser — no TunnelFlow account required.

From the Dashboard

Click the eye icon next to any tunnel in the Tunnels tab. A watch link is generated and copied to your clipboard.

From the CLI

terminal
tflow watch-link --subdomain myapp

This prints the watch URL and a QR code you can scan with a phone.

How it works

  • The link opens a public page at tunnelflow.dev/watch/TOKEN
  • No login required — anyone with the link can view
  • Shows a real-time feed of method, path, status, and latency
  • Links auto-expire after 24 hours
  • You can revoke a link early from the dashboard

Use cases

  • Pair debugging — share with a colleague so they see what you see
  • Live demos — show clients real traffic flowing through your API
  • Support calls — let support engineers observe your traffic without granting dashboard access

#Traffic DiffingPro

Compare any two requests in the Inspector side by side to see exactly what changed.

How to use

  1. In the Inspector, check the box next to two requests you want to compare
  2. A Diff button appears in the controls bar
  3. Click it to open the diff modal

The diff view shows:

  • Request headers — added (green), removed (red), changed (yellow)
  • Request body — line-by-line diff with color highlighting
  • Response headers — same color-coded comparison
  • Response body — side-by-side with changes highlighted

JSON bodies are automatically pretty-printed before diffing for cleaner comparisons.

#Auto-Mock ModePro

Record real API responses and serve them as mocks — no backend server needed.

Learn Mode

Proxy traffic to your real server while recording every request/response pair:

terminal
tflow mock --learn 3000

This creates a tunnel, forwards all traffic to localhost:3000, and saves each response to ~/.tflow/mocks/SUBDOMAIN.json. You'll see LEARNED next to each request in the terminal output.

Serve Mode

Serve the recorded mocks without any backend:

terminal
tflow mock

TunnelFlow starts a local mock server, matches incoming requests against your mock file, and returns the recorded responses. Matching priority:

  1. Exact match on method + path
  2. Glob/wildcard match (e.g. /api/users/123 matches /api/users/*)
  3. 404 fallback if no match

Other commands

CommandDescription
tflow mock --learn <port>Proxy + record responses to mock file
tflow mockServe from mock file (no backend needed)
tflow mock --file ./custom.jsonUse a custom mock file path
tflow mock --clearDelete the mock file for this subdomain

Use cases

  • Frontend development without running the backend
  • Offline demos — serve a realistic API anywhere
  • Integration testing with deterministic, recorded responses

#AnalyticsPro

Hourly charts and aggregate metrics for your tunnel traffic. Available in the Analytics tab.

Metrics tracked:

  • Request volume — total requests per hour
  • Error rate — percentage of 4xx/5xx responses
  • Average latency — mean response time in ms

Time ranges: 1 hour, 24 hours, or 7 days. Data is aggregated per subdomain.

#Rules EnginePro

Configure traffic rules per tunnel from the Rules tab. Rules apply instantly — no CLI restart needed.

Each rule has a method filter (GET, POST, etc.) and a path pattern (e.g. /api/*). Available rule types:

Rule TypeDescription
Mock ResponseReturn a fixed status + body without forwarding to your server
Route to PortForward matching requests to a different local port
Add Request HeaderInject a header into the incoming request
Add Response HeaderInject a header into the outgoing response
Remove HeaderStrip a header from the request
Block RequestReject matching requests with 403
Rate LimitThrottle requests per IP (requests/minute)
Basic AuthRequire HTTP Basic authentication
IP AllowlistOnly allow requests from specific IPs
IP DenylistBlock requests from specific IPs

Rules are evaluated in priority order (drag to reorder). The first matching rule wins. If no rule matches, the request is forwarded normally to your local server.

#Team CollaborationPro

Create a team workspace and invite colleagues. Team members can:

  • View all active tunnels in the shared dashboard
  • Inspect traffic on shared tunnels
  • Access analytics and rules for shared tunnels

Each team member has their own account and login. The team owner manages membership and can share specific tunnels with the team via the Team tab.

#CLI Reference

Complete list of all CLI commands:

CommandDescription
tflow connect <port>Expose a local port via a tunnel
tflow share <path>Serve a file or folder over a public URL
tflow inspectLive TUI traffic viewer (Pro)
tflow mock [port]Auto-mock mode — learn or serve (Pro)
tflow mock --learn <port>Proxy + record responses (Pro)
tflow mock --clearDelete mock file (Pro)
tflow watch-linkGenerate a shareable watch link (Pro)
tflow replay <session-id>Replay a recorded session (Pro)
tflow login <token>Save auth token
tflow logoutRemove saved token
tflow statusShow saved config

Global options

FlagDescription
-t, --token <token>Override saved auth token for this command
-s, --subdomain <name>Custom subdomain (Pro, where applicable)
--server <url>Custom tunnel server URL
--versionShow version number
--helpShow help for a command

#Plans & Limits

FreePro ($5/mo)
Active tunnels1Unlimited
SubdomainRandomCustom persistent
HTTPS
File sharing
Auto-reconnect
Traffic Inspector
Request Breakpoints
Webhook Simulator
Record & Replay
tflow inspect (TUI)
Multi-Port Routing
Watch Links
Traffic Diffing
Auto-Mock Mode
Analytics
Rules Engine
Team Collaboration

Need help? Reach out on GitHub or email support@tunnelflow.dev.