Skip to main content

Web-based terminal accessible from phone via Cloudflare Tunnel

Project description

Porterminal - Vibe Code From Anywhere

PyPI Python Downloads License

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-tunnel for 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

AGPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ptn-0.2.3.tar.gz (177.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ptn-0.2.3-py3-none-any.whl (204.4 kB view details)

Uploaded Python 3

File details

Details for the file ptn-0.2.3.tar.gz.

File metadata

  • Download URL: ptn-0.2.3.tar.gz
  • Upload date:
  • Size: 177.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ptn-0.2.3.tar.gz
Algorithm Hash digest
SHA256 9e5a8a13917deb78d155c14d54023b90d8f7cc2d2bc1c7aa7d851f3dc55b6317
MD5 976db5bf009ab6a710d97abcf0c51cfb
BLAKE2b-256 4bab9d5cb728cb449fb99af53188aaf51c437b796f60463bcdc9b1ba48bd815c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ptn-0.2.3.tar.gz:

Publisher: publish.yml on lyehe/porterminal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ptn-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: ptn-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 204.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ptn-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d92cdc848e7f41d0bd84cf6c9cb36004cbdbed50afbbef53309443c9aa766e8d
MD5 8fe9b1a8836af8a63b584e636067614a
BLAKE2b-256 048e020372b98b9aca8461e65d4342b476c55c4ee4dbc55e1cb86c2a697c1792

See more details on using hashes here.

Provenance

The following attestation bundles were made for ptn-0.2.3-py3-none-any.whl:

Publisher: publish.yml on lyehe/porterminal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page