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.1.tar.gz (595.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.1.1-py3-none-any.whl (628.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ptn-0.1.1.tar.gz
  • Upload date:
  • Size: 595.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.1.1.tar.gz
Algorithm Hash digest
SHA256 b557e9f9549f81da46cd742a3b6dab37aa14f8071e73e2c37a6b2ae5c7ad0de4
MD5 c3a79971405903850bdb107a979de83a
BLAKE2b-256 5b41056e5550744943e411afa3ab5f31fb6788221fc71014bfe6da12e2714780

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ptn-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 628.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 108506425887906779de788d8ffb9d75e640cb285c244a7aa382c431955ea874
MD5 13cc62a6c67e5b548bb6707ae61b0fc9
BLAKE2b-256 febd193ecc2c84009411e0e86dd0079fa79b358abe5508be9c365f29f3fd9e58

See more details on using hashes here.

Provenance

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