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.2.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.2-py3-none-any.whl (628.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ptn-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 8ac1de0ce3464e9ceb561aff9989ab99eb0edb25fefefa5578a2fba65f064776
MD5 a8340169912cfbdf31b1d8ada9ab5c3d
BLAKE2b-256 ea788f77c75795007241532c176606ccfa63d50ae08511745d36655174f23021

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ptn-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7bcdb276bfd7baf452669df2af2cc61cb1e443336958b6ad737b658c12aa395a
MD5 f7587e9f8e6fc4e37a5f44821738f3a9
BLAKE2b-256 a9f6c6b5eea00171bbe4b2e2f4c6b9e69918e8e043a22d7d05a20e01031ed422

See more details on using hashes here.

Provenance

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