Web-based terminal accessible from phone via Cloudflare Tunnel
Project description
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. Cloudflare Quick Tunnel works great but is hard to use directly on the phone. Termius works after complicated setup: port forwarding, firewall rules, key management... I just wanted something simpler: run a command, scan a QR, start typing.
Features
- One command, instant access - No SSH, no port forwarding, no config files. Cloudflare tunnel + QR code.
- Actually usable on mobile - + Essential buttons and gestures for everyday terminals use for vibe coding and mroe.
- Multi-tab shared sessions - Run builds in one tab, tail logs in another. Sessions persist across reconnects.
- Cross-platform - Windows (PowerShell, CMD, WSL), Linux/macOS (Bash, Zsh, Fish). Auto-detects your shells.
Install
| Method | Install | Update |
|---|---|---|
| uvx (no install) | uvx ptn |
uvx --refresh ptn |
| uv tool | uv tool install ptn |
uv tool upgrade ptn |
| pipx | pipx install ptn |
pipx upgrade ptn |
| pip | pip install ptn |
pip install -U ptn |
Requires Python 3.12+ and cloudflared (auto-installed if missing).
Usage
ptn # Start in current directory
ptn ~/projects/myapp # Start in specific folder
ptn --no-tunnel # Local network only
ptn -b # Run in background
ptn -v # Verbose logs
Configuration
Create ptn.yaml in your working directory, .ptn/ptn.yaml, or ~/.ptn/ptn.yaml (optional):
terminal:
default_shell: bash
cols: 120
rows: 30
buttons:
- label: "git"
send: "git status\r"
- label: "build"
send: "npm run build\r"
Security
Warning: The URL is the only authentication. Anyone with the link has full terminal access.
- Don't share the URL
- Stop the server when not in use (
Ctrl+C) - Use
--no-tunnelfor local network only - Environment variables are sanitized (API keys, tokens stripped)
Contributing
Issues and PRs welcome.
git clone https://github.com/lyehe/porterminal
cd porterminal
uv sync
uv run ptn
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ptn-0.2.1.tar.gz.
File metadata
- Download URL: ptn-0.2.1.tar.gz
- Upload date:
- Size: 176.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c05f2573e764dd496c0200dbffc077b7fa35aa9a23de499db083902eafafa38
|
|
| MD5 |
05bf87d1bec3649ee6172e5f10c987c5
|
|
| BLAKE2b-256 |
73fd6e38333d76e8fb94d9822be4523f5a22640d8138e1e9d305c79cc5e2ea40
|
Provenance
The following attestation bundles were made for ptn-0.2.1.tar.gz:
Publisher:
publish.yml on lyehe/porterminal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ptn-0.2.1.tar.gz -
Subject digest:
1c05f2573e764dd496c0200dbffc077b7fa35aa9a23de499db083902eafafa38 - Sigstore transparency entry: 788448166
- Sigstore integration time:
-
Permalink:
lyehe/porterminal@87a90f49067076867ff396bcc7b46d840e3b55f4 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/lyehe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@87a90f49067076867ff396bcc7b46d840e3b55f4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ptn-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ptn-0.2.1-py3-none-any.whl
- Upload date:
- Size: 202.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2046fc5702a4d86705a735af1c9631332bebc84bf5f24886cd4e6077a666ff7d
|
|
| MD5 |
a89631474a99817bd0ab6b3443ce7ecb
|
|
| BLAKE2b-256 |
1c6b8d105b42a9d1e8e6a9c56c72300be1fec6a6f4c51346434871832eecb3fa
|
Provenance
The following attestation bundles were made for ptn-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on lyehe/porterminal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ptn-0.2.1-py3-none-any.whl -
Subject digest:
2046fc5702a4d86705a735af1c9631332bebc84bf5f24886cd4e6077a666ff7d - Sigstore transparency entry: 788448189
- Sigstore integration time:
-
Permalink:
lyehe/porterminal@87a90f49067076867ff396bcc7b46d840e3b55f4 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/lyehe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@87a90f49067076867ff396bcc7b46d840e3b55f4 -
Trigger Event:
push
-
Statement type: