January 3, 2026
Scan, code, freak out
Show HN: uvx ptn, scan a QR, get a terminal in your phone
Hack from bed? Fans cheer, security folks want locks
TLDR: A new tool lets you scan a QR code to control your computer’s command box from your phone, but the only protection is a secret link. The community loves the simplicity yet demands passwords or one-use links, while others share secure DIY setups, highlighting convenience vs safety.
A solo builder dropped “ptn,” a one-command trick that lets you scan a QR code and control your computer’s terminal—aka the text box where you run everything—from your phone. The vibe? Cozy coding from bed. The mood? Split. Early commenters swooned over the laziness-as-innovation energy: one fan joked that “laziness” is the real engine of progress. No SSH, no fiddly setup, just scan-and-type—plus mobile-friendly buttons, multi-tab sessions, and works on Windows, macOS, and Linux. But the plot twist set the thread on fire: the only lock is a secret link. Share the URL and you’re handing over full control. Cue the password wars. One user begged, “please add a password,” while another pushed for a one-use URL so once you scan it, nobody else can start a session. Security-minded folks rolled in with alternative playbooks: a one-command secure wrapper via a gist, and the “DIY fortress” crowd flexed SSH (secure login), WireGuard (private tunnel), and tmux (tabbed terminal) setups. The dev warns “don’t share the URL,” use local-only mode if you must, and that some secrets are scrubbed. Still, the comments turned into a meme war: bed coders vs lock lords. Grab popcorn—and maybe a password. Check the repo for the latest.
Key Points
- •ptn (Porterminal) provides mobile access to a local terminal via a Cloudflare tunnel and QR code, avoiding SSH and port forwarding.
- •Features include mobile-friendly controls, multi-tab shared sessions, and persistence across reconnects.
- •It supports Windows, Linux, and macOS, auto-detecting shells like PowerShell, CMD, WSL, Bash, Zsh, and Fish.
- •Installation options include uvx, uv tool, pipx, and pip, with one-line installers; it requires Python 3.12+ and cloudflared (auto-installed if missing).
- •Security relies on a secret URL for access; users are advised not to share the link, stop the server when not in use, use --no-tunnel for LAN-only, and environment variables are sanitized.