Skip to content

Getting Started

term-serve exposes a real local terminal session in your browser. By default it stays local-only and opens a shell.

Terminal window
# Run from this repository
bun run src/bin/term-serve.ts
# If installed as a binary
term-serve

Then open http://127.0.0.1:31337/.

Desktop shell session in term-serve
Default desktop shell session.

Everything after the command name is passed through unchanged to the PTY process:

Terminal window
term-serve htop -d 10
term-serve btop
term-serve opencode

Use -- when you need to separate term-serve options from command arguments:

Terminal window
term-serve --port 4141 -- rg --hidden TODO src
Terminal window
term-serve --cwd ~/projects
Terminal window
term-serve --public

When binding non-locally, term-serve requires an auth token for WebSocket terminal access:

  • Provide one explicitly with --auth-token <secret>.
  • Or let term-serve generate one at startup and print it once.