Termbridge
Usage

Multiple Terminals

Termbridge can run multiple terminal sessions simultaneously. One server hosts several tmux sessions, and the UI lets you switch between them.

How it works

  • Termbridge tracks sessions it created or attached to in the current run
  • The terminal switcher shows all available sessions
  • Switching is instant - no reconnection needed

Creating multiple sessions

On startup

Use the TERMBRIDGE_SESSIONS environment variable:

TERMBRIDGE_SESSIONS=3 npx termbridge

This creates three sessions: <base>, <base>-2, and <base>-3.

During development

Use the shortcut script:

bun run dev:beam:multi

From the UI

  1. Tap the terminal icon in the bottom bar
  2. Tap "New Terminal" in the switcher
  3. A new session is created and selected

Switching terminals

  1. Tap the terminal icon in the bottom bar
  2. A list of available sessions appears
  3. Tap one to switch

The switch is instant - your previous session keeps running in the background.

Use cases

Build + logs

Run your build in one terminal, tail logs in another:

# Terminal 1: Build
npm run build

# Terminal 2: Logs
tail -f logs/app.log

Switch between them without losing your place.

Server + client

Run your backend server in one terminal, frontend dev server in another:

# Terminal 1: Backend
npm run server

# Terminal 2: Frontend
npm run dev

Multiple SSH sessions

Connect to different servers:

# Terminal 1
ssh user@server1.com

# Terminal 2
ssh user@server2.com

Monitor both from your phone.

Session naming

By default, sessions are named based on the port number. Use --session for meaningful names:

termbridge --session api-server

When creating multiple sessions with TERMBRIDGE_SESSIONS, the base name is used with numeric suffixes.

Persistence

  • Sessions persist when you disconnect from the UI
  • Sessions persist when Termbridge restarts (unless --kill-on-exit)
  • Use --session <name> to reconnect to an existing session

On this page