TL;DR
Porterminal (invoked as ptn) exposes a local shell to a phone by starting a short-lived web terminal and publishing a QR-linked URL via a Cloudflare tunnel. It aims to remove SSH/port-forwarding setup, offers mobile-oriented controls and multi-tab shared sessions, and warns that the URL is the sole authentication.
What happened
A developer published Porterminal, a small tool that lets you run a single command on a machine and scan a QR code to reach that machine’s terminal from a phone. The tool uses a Cloudflare tunnel combined with an in-browser terminal UI; users run ptn (or install via uvx, uv tool, pipx, or pip) to start a session and then scan a QR to connect. Porterminal is cross-platform, auto-detects common shells on Windows, Linux and macOS, and supports multiple tabs and shared sessions that persist across reconnects so you can, for example, run a build in one tab and tail logs in another. The project requires Python 3.12+ and will install cloudflared if it’s missing. The repository is hosted as lyehe/porterminal, is released under AGPL-3.0, and ships utilities for configuration and custom toolbar buttons.
Why it matters
- Reduces setup friction for accessing a local shell from mobile devices without configuring SSH, port forwarding or keys.
- Designed UI and gestures for practical mobile terminal use, which could improve developer workflows when away from a laptop.
- Multi-tab, shared sessions let users split work (builds, logs) across reconnects without reattaching shells.
- Cross-platform support and auto shell detection lower the barrier for use across Windows, macOS and Linux systems.
Key facts
- Tool name: Porterminal; command: ptn.
- Transport: Cloudflare tunnel plus a QR-linked web terminal; the project advertises 'no SSH, no port forwarding, no config files.'
- Install options include uvx, uv tool, pipx and pip; one-line installer scripts are provided for Windows and macOS/Linux.
- Requires Python 3.12+; cloudflared is auto-installed if absent.
- Supports Windows (PowerShell, CMD, WSL), Linux and macOS (Bash, Zsh, Fish) with automatic shell detection.
- Provides multi-tab shared sessions that persist across reconnects and configurable toolbar buttons via ptn.yaml.
- Security model: the URL is the only authentication — anyone with the link can access the terminal; environment variables are sanitized.
- Repository: lyehe/porterminal on GitHub, licensed under AGPL-3.0; latest published release in the source is v0.2.6.
- Project activity indicators in the source: 24 stars, 15 releases, three contributors listed.
What to watch next
- New releases and changelogs (latest noted as v0.2.6 in the repository) for fixes such as shell detection and Ctrl+C behavior.
- Security-related updates and repository issues or PRs, since the project’s security model relies entirely on an unguessable URL.
Quick glossary
- QR code: A matrix barcode that encodes a URL or other data so a phone can quickly open a link by scanning it.
- Cloudflare tunnel: A service that exposes a local server to the public internet over an encrypted tunnel without direct port forwarding.
- cloudflared: A command-line client provided by Cloudflare that establishes tunnels from a host to Cloudflare’s network.
- AGPL-3.0: A copyleft open-source license that requires distributing source for derivative works and network-accessible modifications.
- SSH: A protocol for secure remote command-line access to another machine, typically requiring keys and port access.
Reader FAQ
How do I start a Porterminal session?
Run ptn in the desired directory (or ptn <path>) and scan the displayed QR code with your phone.
Do I need an account or service registration to use it?
not confirmed in the source
Is the terminal protected with authentication?
No — the project warns that the URL is the only authentication and anyone with the link can access the terminal.
What platforms and shells are supported?
Windows (PowerShell, CMD, WSL), Linux and macOS with Bash, Zsh and Fish; the tool auto-detects installed shells.
1. uvx ptn 2. Scan the QR 3. Access your terminal from your phone Why I wanted to vibe code from bed. ngrok requires registration and the free tier sucks….
Sources
- Show HN: uvx ptn, scan a QR, get a terminal in your phone
- Access localhost from your phone!
- Reading QR Codes in Linux
- How to scan QR codes without camera or phone – vazaha.blog
Related posts
- Proving Liveness with TLA: Using TLAPS’ New Temporal Logic Support
- Blaze: Rust-based emulator revives DEC VT420 terminal hardware and more
- A Basic Just-In-Time Compiler: building x86-64 JIT for recurrence relations