A self-hosted remote terminal optimized for mobile use. Sessions run within server-side tmux instances, ensuring tasks aren't interrupted by connection drops; upon reconnection, only the missing segments need to be replayed. The system sends push notifications when proxy tasks complete or require manual input. It deploys as a single binary, supports Noise IK end-to-end encryption, and is open-source under the Apache-2.0 license.
Hi ALL, I built PocketShell — a self-hosted mobile terminal for running CLI/TUI
coding agents (Claude Code, Codex, opencode) from your phone.
The itch: I kept wanting to kick off or check on a long Claude Code run while
away from my desk. Existing options weren't great on a phone — ssh apps mangle
full-screen TUIs, and any of them will kill or garble the run the moment my
phone drops to a dead spot on the subway.
So the core feature is resilience. Each session lives in a server-side tmux
session, so detaching is just "the window closed," not "the process died."
The client keeps a per-session sequence number; when the phone reconnects, the
agent replays exactly the output you missed (and sends a full resync if the gap
is too big). Your task never stops, and you come back to a consistent screen and
scrollback.
Since the whole point is to walk away, it closes the loop: the agent pings your
phone when it finishes a round or is waiting on your input — Web Push to the
installed PWA, plus optional outbound webhooks (WeCom/Feishu/Slack/Discord). It
wires the notify hook into each tool's own config (Claude Code / Codex /
opencode), and a smart do-not-disturb skips the ping when you're already looking
at that session.
Other things that made it usable on an actual phone:
- A custom on-screen keyboard: F1–F12, sticky modifiers, an Fn app-layer, and a
smart command-suggestion bar. The system IME sends whole segments at once.
- Full-screen TUI handling: Claude Code is switched to its classic renderer so
long output goes into native scrollback (infinite scroll) with the input line
pinned to the bottom.
- A file + git panel: lazy tree with inline git markers, code preview/edit
(CodeMirror), preview for images / Markdown / static HTML, diff view, up/down
load.
- Session management from the phone: create, rename, resize and kill the
underlying tmux sessions, with a task panel showing which ones are running,
waiting on input, or done.
Distribution and security:
- One binary = the whole product. `bun build --compile` produces linux
x64/arm64 and darwin arm64/x64; the frontend is embedded and served on the
same port. Crypto is pure JS (no native addon), so one Mac cross-compiles
everything. Download and run on a clean box with no Bun installed.
- End-to-end encrypted: every connection does a full Noise IK handshake (mutual
auth + forward secrecy). Unregistered devices can't complete the handshake;
pairing is a one-time code; devices are nameable and revocable (revoke kicks
them instantly). It's also had an outside pass: a friend who does pentesting
professionally went through it and I fixed what he found.
Honest limitations: it needs `tmux` + `git` on the dev machine, self-hosting has
setup cost, and the file panel isn't sandboxed — the trust boundary is the auth
boundary (a paired device can browse what the agent process can). Dark/light
themes, EN/中文 i18n, and PWA install are in.
Apache-2.0. Repo: https://github.com/Big-Pony/pock...
Would love feedback on the resilience model and the mobile keyboard UX.
Report
Reviews
No reviews yetBe the first to leave a review for PocketShell