Web-based terminal accessible from phone via Cloudflare Tunnel
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b557e9f9549f81da46cd742a3b6dab37aa14f8071e73e2c37a6b2ae5c7ad0de4
|
|
| MD5 |
c3a79971405903850bdb107a979de83a
|
|
| BLAKE2b-256 |
5b41056e5550744943e411afa3ab5f31fb6788221fc71014bfe6da12e2714780
|
Provenance
The following attestation bundles were made for ptn-0.1.1.tar.gz:
Publisher:
publish.yml on lyehe/porterminal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ptn-0.1.1.tar.gz -
Subject digest:
b557e9f9549f81da46cd742a3b6dab37aa14f8071e73e2c37a6b2ae5c7ad0de4 - Sigstore transparency entry: 782150699
- Sigstore integration time:
-
Permalink:
lyehe/porterminal@8f09560cbf400c4f7dc5eb6b85e207235e6cd47c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/lyehe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8f09560cbf400c4f7dc5eb6b85e207235e6cd47c -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
108506425887906779de788d8ffb9d75e640cb285c244a7aa382c431955ea874
|
|
| MD5 |
13cc62a6c67e5b548bb6707ae61b0fc9
|
|
| BLAKE2b-256 |
febd193ecc2c84009411e0e86dd0079fa79b358abe5508be9c365f29f3fd9e58
|
Provenance
The following attestation bundles were made for ptn-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on lyehe/porterminal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ptn-0.1.1-py3-none-any.whl -
Subject digest:
108506425887906779de788d8ffb9d75e640cb285c244a7aa382c431955ea874 - Sigstore transparency entry: 782150705
- Sigstore integration time:
-
Permalink:
lyehe/porterminal@8f09560cbf400c4f7dc5eb6b85e207235e6cd47c -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/lyehe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8f09560cbf400c4f7dc5eb6b85e207235e6cd47c -
Trigger Event:
release
-
Statement type: