Your terminal, on your phone.

Start Claude Code, opencode or any terminal app on your computer, then pick it up from your phone. Put tui2web in front of the command and open the link.

npm install -g tui2web
tui2web claude --continue

Or try it without installing: npx tui2web claude. Requires Node.js 20+ on macOS, Linux or Windows.

On your computer

$ tui2web claude --continue

tui2web session is live:

  https://tui2web.com/session/L9-7mXweW0Y…

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ ▄▄▄▄▄ █▀█ █▄ ▀▀ █ ▄▄▄▄▄ █
█ █   █ █▀▀▀█ ▀ ▀██ █   █ █
█ █▄▄▄█ █▀ █▀▀▄▀▀▄█ █▄▄▄█ █
█▄▄▄▄▄▄▄█▄▀ ▀▄█ █ █▄▄▄▄▄▄▄█
█  ▄▄ ▀▄▄ ▄▀▄▀▀███ █ █▄█ ██
██▀ ▄█ ▄███▄█▀ ▄▄█  ▀█▄█▄ █
█▀█▀▀ ▀▄▀█▄▄█▄█▄▄▀▄▄ ▄▀▄ ▄█
█ ██▀▄ ▄ ▄   ▄█▀  ▀▀  ▄█▄ █
█▄█▄▄█▄▄▄ ▄█▄▀▀▀  ▄▄▄ ▀▄███
█ ▄▄▄▄▄ █▄█ █▀ ▄█ █▄█ ▀▄ ▄█
█ █   █ █ ▄ █▄█▄▄ ▄ ▄ ▀ ▀ █
█ █▄▄▄█ █ ██ ▄█▀█▀▄▀▀▀ ▄█ █
█▄▄▄▄▄▄▄█▄█▄▄███████▄▄▄▄▄▄█
Anyone with this link can control this terminal.

Press Ctrl+\ any time to show this link again.

Press Enter to start claude (Ctrl+C to cancel)

On your phone

How it works

tui2web runs your command in a terminal on your computer and streams it through a relay to a web page. Your laptop and your phone share one live session.

Run it

Put tui2web in front of any command. It prints a private link and a QR code, and waits for you to press Enter before starting the app. Lost it? Press Ctrl+\ to bring it back.

Scan the code

Open the link on your phone. You see the same screen your computer shows, with keys that phone keyboards are missing: Esc, Tab, Ctrl, the arrow keys and more.

Keep going

Type from either device. Your computer's terminal keeps working normally, so you can leave your desk and carry on from the couch, then come back.

Built for driving agents from your phone

Coding agents spend most of their time working and occasionally need you. tui2web makes those moments easy to handle from anywhere.

Works on any network

Your computer connects out to the relay, like ngrok. No port forwarding, VPN or firewall changes.

Two-way sync

Keystrokes from your laptop and phone go to the same session. The screen resizes to fit whichever device you last typed on.

Phone-friendly keys

An extra key row with Esc, Tab, Ctrl and the arrow keys, plus a keys-only pad for answering prompts with the keyboard hidden.

Survives drops

Wi-Fi blips, sleeping phones and relay restarts are handled. Your session reconnects and the screen comes back as it was.

Any terminal app

Claude Code, opencode, aider, htop, vim or a plain shell. If it runs in a terminal, it runs in tui2web.

Open source

MIT licensed. Use the public relay, or run your own relay with one Docker image.

Security

A tui2web link controls a real terminal on your computer, so it's locked down like a login.

your computer ──outbound, HTTPS──▶ tui2web.com relay ◀──HTTPS── your phone
 runs the command                     passes your session              needs the link or
 in a terminal                        along and keeps its screen       your password

How access works

  • Each session gets a random ID and a secret token. Nobody can open it without them.
  • Opening the link logs that browser in and removes the token from the address bar, the way Jupyter does.
  • Optionally set a password with tui2web set-password. Only a salted hash leaves your computer.
  • Login attempts are rate limited, and the session closes when your command exits.

Treat the link like a password

Anyone with the link can type into your terminal, and a coding agent can run commands on your computer. Don't share the link, and end the session when you're done. Traffic is encrypted on the way to and from the relay, but the relay itself can see your session's contents. If that matters for your work, self-host the relay.

Cheat sheet

Everything you need, in one table.

tui2web <command> [args…]Run a command and share it. For example tui2web claude, tui2web opencode or tui2web bash.
Ctrl+\While the app runs, show the link and QR code again. Press any key to go back.
tui2web lsList your running sessions and their links, from any terminal.
--no-waitStart the app right away instead of waiting for Enter on the link screen.
--hotkey <key>Change the Ctrl+\ key, for example ctrl-^ or ctrl-g, or turn it off with none.
--no-qrDon't print the QR code.
tui2web set-passwordSet a password so you can open sessions without the link.
--no-passwordFor this session, only accept the link's token.
--relay <url>Use your own relay (or set TUI2WEB_RELAY).

FAQ

How do I use Claude Code from my phone?

Install tui2web with npm install -g tui2web, then start Claude Code through it: tui2web claude. It prints a private link and a QR code. Scan it with your phone and you get the same live Claude Code session in your phone's browser, with extra keys like Esc, Tab and ⇧Tab.

Do I need SSH, a VPN or port forwarding?

No. Your computer makes an outbound connection to the relay, like ngrok does, so it works from home Wi-Fi, office networks and behind NAT without opening any ports or installing an SSH server.

How is this different from SSH-ing in from my phone?

With SSH you start a new, separate shell. tui2web shares the session that's already running on your computer, and both screens stay in sync. You can start Claude Code at your desk, carry on from your phone, and come back to find your laptop terminal exactly where the conversation is. It also works in any mobile browser, with no SSH app or keys.

Which apps does it work with?

Anything that runs in a terminal: Claude Code, opencode, aider, Codex CLI, vim, htop, or a plain shell. Full-screen apps work too. Press Ctrl+\ at any time to bring the link back.

Is it secure?

Each session has a random ID and a secret token, and nobody can open it without the link or your tui2web password. Traffic is encrypted on the way to and from the relay, but the relay can see what's in your session, so treat the link like a password. If that matters for your work, you can self-host the relay with one Docker image.

What happens if my connection drops?

The session reconnects on its own and the screen comes back as it was, including when the relay restarts. The app itself runs on your computer, so the computer needs to stay on and awake.

Is tui2web free?

Yes. tui2web is free and open source under the MIT license. The code for the CLI, the relay and the web viewer is on GitHub.