Skip to content

millionco/localterm

Repository files navigation

localterm

version downloads

Your terminal should just be a browser tab.

Run npx localterm@latest start and every browser tab is one shell. Open a new tab to spawn another. Close the tab to kill it. That's the whole product.

demo

Install

Run this command anywhere:

npx localterm@latest start

This boots a local daemon and opens http://localterm.localhost:3417 in your browser. (*.localhost is reserved by RFC 6761 and resolves to 127.0.0.1 in every modern browser, so no /etc/hosts edit needed.)

To install globally:

npm install -g localterm
localterm start

Usage

The mental model is shell = browser tab:

  • New tab → new shell
  • Close tab → shell dies immediately
  • Reload tab → fresh shell (the prior one is gone)

No session ids, no URL slugs, no reconnects. If you want a long-lived shell that survives reloads, run tmux inside localterm.

CLI

localterm start [-p 3417] [-H 127.0.0.1] [--no-open]   # daemonizes by default
localterm stop
localterm status
localterm restart

State lives in ~/.localterm/ (PID, port, server log at ~/.localterm/server.log).

Security

  • Binds loopback hosts only: 127.0.0.1, localhost, *.localhost, ::1. Non-loopback values are rejected.
  • /api/* and /ws enforce loopback Host and Origin headers to defeat DNS-rebinding attacks.
  • One PTY per WebSocket. Closing the tab kills the shell — no orphaned processes.

Resources & Contributing Back

Looking to contribute back? Check out the Contributing Guide and AGENTS.md for code style.

Find a bug? Head over to our issue tracker and we'll do our best to help. We love pull requests, too!

→ Start contributing on GitHub

License

localterm is MIT-licensed open-source software.

About

A terminal in your browser

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages