Think ngrok, but for keystrokes

Let your colleague
type into your terminal.

You're screensharing. They need to run a command. Stop dictating characters — give them a session code and let them type directly.

Install keytun See how it works
Terminal — host
$
keytun v0.1.0
Session: keen-fox-42
Waiting for client...
✓ Client connected
$
Terminal — helper
$
Connected to keen-fox-42
You are now typing into the remote terminal.
Press Esc twice to disconnect.

The problem with screensharing

🗣

Dictating commands

"Capital D, dash, dash, no-cache, space, dot, no the other dot..."

🔄

Swapping screen control

Request control, wait for approval, fumble with resolution differences, give it back.

🛠

Full pair-programming tools

VS Code Live Share, tmate, tmux — all overkill for "let me just type this one command."

keytun

Share a code. They type. You see it live on your screenshare. Done.

How it works

Host

Developer screensharing.
Runs keytun host

WebSocket
Relay

Stateless broker.
Bridges connections.

WebSocket
Client

Helper colleague.
Runs keytun join <code>

1

Host starts a session

Run keytun host. A PTY spawns your shell. You get a session code like keen-fox-42.

2

Share the code over your call

Session codes use words — easy to read aloud. "keen fox forty-two."

3

Helper joins and types

Raw key bytes flow through the relay to the host's PTY. Arrow keys, tab completion, Ctrl+C — everything works.

4

Host sees it live

Both local and remote input appear in the same terminal. Your screenshare shows everything in real time.

Built for developers

Single binary

Go binary. No runtime, no dependencies. Download and run.

🔑

Readable session codes

Wordlist-based codes like keen-fox-42. Easy to say over a call.

🖥

Full terminal fidelity

Raw bytes, not characters. Arrow keys, Ctrl sequences, tab completion all preserved.

🔒

Secure by design

Sessions are explicit. Host sees a banner on connect. Ctrl+C kills the session instantly.

☁️

Self-hostable relay

Stateless WebSocket broker. Deploy on Fly.io, Railway, or any container host.

🪶

Lightweight

No database, no auth tokens, no persistence. Sessions live in memory.

Get started

With Go

Terminal
$ go install github.com/gboston/keytun@latest

From source

Terminal
$ git clone https://github.com/gboston/keytun.git
$ cd keytun
$ just build

Usage

Host (developer)
Terminal
$ keytun host
Client (helper)
Terminal
$ keytun join keen-fox-42
Self-host relay
Terminal
$ keytun relay --addr :8080

Simple protocol

JSON over WebSocket. Seven message types. That's it.

Host → Relay host_register

Register a session code

Client → Relay client_join

Join an existing session

Relay → Client session_joined

Confirm session join

Client → Host input

Base64-encoded key bytes

Host → Client output

PTY output for remote echo

Relay → Both peer_event

joined / left notifications

Relay → Sender error

Error responses