Skip to main content

Web-based terminal accessible from phone via Cloudflare Tunnel

Project description

Porterminal - Vibe Code From Anywhere

PyPI Python Downloads License

Simple, quick and dirty web terminal accessible from your phone via Cloudflare Quick Tunnel. Vibe-coding-friendly interface with virtual keys, multi-tab sessions, etc.

Features

  • Touch-optimized - Virtual keyboard, touch gestures
  • Multi-tab sessions - Run multiple terminals simultaneously with persistent sessions
  • Instant access - Cloudflare Quick Tunnel with QR code, no port forwarding needed
  • Cross-platform - Windows (PowerShell, CMD, WSL), Linux/macOS (Bash, Zsh, Fish)

Quick Start

# Run without installing
uvx ptn


# Or install
uv tool install ptn
ptn

Scan the QR code with your phone to connect.

Usage

ptn [path] [options]

Examples:

# Start in current directory with tunnel
ptn

# Start in a specific project folder
ptn ~/projects/myapp

# Local network only (no Cloudflare tunnel)
ptn --no-tunnel

# Run in background (returns immediately)
ptn -b

# Show detailed startup logs
ptn -v

# Update to latest version
ptn -U

# Check for updates without installing
ptn --check-update

Options:

Option Description
path Starting directory for the shell (default: current)
--no-tunnel Local network only, no Cloudflare tunnel
-b, --background Run in background and return immediately
-v, --verbose Show detailed startup logs
-U, --update Update to the latest version
--check-update Check if a newer version is available
-V, --version Show version
-h, --help Show help message

Configuration

Create config.yaml in your working directory to customize:

# Server settings
server:
  host: "127.0.0.1"
  port: 8000

# Terminal settings
terminal:
  cols: 120        # Default columns (40-500)
  rows: 30         # Default rows (10-200)
  default_shell: powershell  # Default shell ID

  # Custom shells (optional - auto-detected if not specified)
  shells:
    - id: powershell
      name: PowerShell
      command: powershell.exe
      args: ["-NoLogo"]
    - id: wsl
      name: WSL
      command: wsl.exe
      args: []

# Custom quick-action buttons
buttons:
  - label: "git"
    send: "git status\r"
  - label: "ls"
    send: "ls -la\r"
  - label: "clear"
    send: "clear\r"
  - label: "exit"
    send: "exit\r"

Minimal config example:

terminal:
  default_shell: bash

Security

Warning: The URL is the only authentication. Anyone with the link can access your terminal.

  • Environment variables sanitized (API keys, tokens, secrets blocked)
  • Rate limiting on input
  • Sessions isolated per user via Cloudflare Access

Requirements

  • Python 3.12+
  • uv is prefered
  • cloudflared (auto-installed if missing)

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.1.4.tar.gz (175.8 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.1.4-py3-none-any.whl (202.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ptn-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a89daaac00ec6fb4f65bd37478fbdd74169cc980f727a54a8917e36941a04b8e
MD5 e5454c974232f5ade1ce3d5e47f61804
BLAKE2b-256 871f8d06b7989037adabd76c8a409d478f942b17fd5beadb1218e1a79d409caf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ptn-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 202.3 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.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c9aa199a4d1a6f182152f597b34ad8881c42e9038c1393b9ea1837605af7ec0b
MD5 33f862f68fc820fff64cd1a876d3378c
BLAKE2b-256 fec006d68f03cfbbc77dd4c246e950a0662f3dbc13134637d5005b04a7985bae

See more details on using hashes here.

Provenance

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