Development
Requirements
- Bun for workspace installs and scripts
- Node.js 20+
- tmux and cloudflared for end-to-end tests
- Daytona API key + git credentials for the sandbox integration test (optional)
- Playwright for UI e2e tests
Install
bun install
Run the app
bun run dev:beam
This builds the CLI, starts the local server on port 8787 (override with TERMBRIDGE_DEV_PORT) with the tmux session codex (override with TERMBRIDGE_DEV_SESSION), and launches the Vite dev UI, which proxies /__tb (including WebSockets) to that server. It prints a dev redeem URL to open in the browser. Set TERMBRIDGE_SKIP_BUILD=1 to skip the CLI build.
Multiple sessions
TERMBRIDGE_SESSIONS=2 bun run dev:beam
Or use the shortcut:
bun run dev:beam:multi
Local cookie mode
dev:beam sets TERMBRIDGE_INSECURE_COOKIE=1 unless you set it yourself, so session cookies work over plain HTTP. When running the CLI directly without HTTPS, set it explicitly:
TERMBRIDGE_INSECURE_COOKIE=1 node cli/dist/bin.js --no-tunnel --public-url http://127.0.0.1:8080 --port 8080
Tests
bun run test
test:mockedruns unit/integration tests with 100% coverage.test:cliruns real CLI + UI e2e tests (tmux + cloudflared + Playwright).- The Daytona sandbox test in
test:clireads its settings only from a.envfile in atermbridge-test-appdirectory next to this repository (../termbridge-test-app/.env). It runs when that file setsTERMBRIDGE_E2E_DAYTONA=1andTERMBRIDGE_DAYTONA_API_KEY. SetTERMBRIDGE_SANDBOX_REPOthere to a repository you can clone; the default test repository is private and also needsTERMBRIDGE_SANDBOX_GIT_USERNAMEandTERMBRIDGE_SANDBOX_GIT_TOKEN.
Docs
The docs are plain Markdown files in docs/, with frontmatter on every page and meta.json files for navigation order. They are published at termbridge.dev. Validate them with:
node scripts/check-docs-content.mjs --root docs --expected-docs 16 --expected-nav 3
The Docs content workflow runs the same check on pull requests that touch docs/.