Skip to main content

Connect to your local development server remotely.

Project description

plain.tunnel

Connect to your local development server remotely.

Overview

The Plain Tunnel is a hosted service, like ngrok or Cloudflare Tunnel, that is specifically designed to work with Plain and provide the minimum set of features you need to get your local development server connected to the internet. It will provision a subdomain of plaintunnel.com for you, and forward traffic to your local development server.

This is especially useful for testing webhooks, doing mobile styling on a real device, or temporarily sharing your local development URL with someone.

Basic usage:

plain tunnel https://app.localhost:8443

This will create a tunnel from a randomly generated subdomain to your local server. You can also specify a custom subdomain:

plain tunnel https://app.localhost:8443 --subdomain myappname

Usage with plain.dev

The simplest way to use plain.tunnel is to integrate it with your plain.dev configuration.

Add it to your plain.dev configuration in pyproject.toml:

[tool.plain.dev.run]
tunnel = {cmd = "plain tunnel $PLAIN_DEV_URL --subdomain myappname --quiet"}

To show a tunnel URL (whether you are using plain.tunnel or not), you can add PLAIN_DEV_TUNNEL_URL to your local .env file:

PLAIN_DEV_TUNNEL_URL=https://myappname.plaintunnel.com

CLI Usage

The cli command accepts the following options:

  • destination: The URL of your local development server (required)
  • --subdomain: Custom subdomain to use (optional, auto-generated if not provided)
  • --debug: Enable debug logging
  • --quiet: Only log warnings and errors

Examples:

# Basic usage with auto-generated subdomain
plain tunnel https://app.localhost:8443

# With custom subdomain
plain tunnel https://app.localhost:8443 --subdomain myapp

# With debug logging
plain tunnel https://app.localhost:8443 --debug

# One-off usage without installation
uvx plain-tunnel https://app.localhost:8443

Configuration

Environment Variables

The tunnel can be configured using environment variables:

  • PLAIN_TUNNEL_SUBDOMAIN: Default subdomain to use
  • PLAIN_TUNNEL_HOST: Tunnel host (defaults to plaintunnel.com)

Installation

Install the plain.tunnel package from PyPI:

uv add plain.tunnel --dev

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

plain_tunnel-0.8.1.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plain_tunnel-0.8.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file plain_tunnel-0.8.1.tar.gz.

File metadata

  • Download URL: plain_tunnel-0.8.1.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.7

File hashes

Hashes for plain_tunnel-0.8.1.tar.gz
Algorithm Hash digest
SHA256 7460fe8b5ad88eb09a86410b2b07073988a305bda8052777ba53f2bad0b97c13
MD5 78eb80711d9f9d046db547732bdd5607
BLAKE2b-256 7e04d0027fa3f4f09291118e414268e04b68324ca9833a698a812c0af885ca83

See more details on using hashes here.

File details

Details for the file plain_tunnel-0.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for plain_tunnel-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57c0072208d6ee5753d15a4b1d1323fcd2205f957e2d355aaa07eb1a4552a279
MD5 9a5f0bc49ace372596e0ea29213c209d
BLAKE2b-256 3a933db28ec9a4a08265062545575cbcc9347fead241757cc898fc5608ff9d40

See more details on using hashes here.

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