Skip to main content

Web-based terminal accessible from phone via Cloudflare Tunnel

Project description

Porterminal - Vibe Code From Anywhere

PyPI Python Downloads License CI

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 terminal use.
  • 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.
  • Update notifications - Checks PyPI daily, notifies on startup if update available. Run ptn -U to update.

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 --init             # Create .ptn/ptn.yaml config
ptn -U                 # Update to latest version
ptn --check-update     # Check if update available

Configuration

Run ptn --init to create a starter config, or create ptn.yaml manually:

# Custom buttons (appear in toolbar)
buttons:
  - label: "claude"
    send:
      - "claude"
      - 100        # delay in ms
      - "\r"
  - label: "tmux"
    send: "tmux\r"

# Update checker settings
update:
  notify_on_startup: true   # Show update notification
  check_interval: 86400     # Seconds between checks (default: 24h)

Config is searched in order: $PORTERMINAL_CONFIG_PATH, ./ptn.yaml, ./.ptn/ptn.yaml, ~/.ptn/ptn.yaml.

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.5.tar.gz (177.3 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.5-py3-none-any.whl (203.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ptn-0.2.5.tar.gz
  • Upload date:
  • Size: 177.3 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.5.tar.gz
Algorithm Hash digest
SHA256 f50f0272e2e937ad46aa1bdab1ff15a4e11f2bf75a8f71e8947fc6c469e6aea1
MD5 f107fed87b2ad4d2f01ab022b0d08ac8
BLAKE2b-256 5c565941eeddb7864e08cbc0b3008629814afad55a842ea9dc0c53689ab356a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ptn-0.2.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: ptn-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 203.1 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3b88b1ce8c6d33e3d878278f4397d414a7fe9f4d258cdfcb1b7ed1fdf7e69c03
MD5 3cfc85305c61797969ee04496f814eb9
BLAKE2b-256 21119e1075f9eeaab6241813ecbf5df8e82b4783b12e3c72acf2a1c43ceca530

See more details on using hashes here.

Provenance

The following attestation bundles were made for ptn-0.2.5-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