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.2.tar.gz (26.4 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.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for plain_tunnel-0.8.2.tar.gz
Algorithm Hash digest
SHA256 64918ed014c263553b7fbcfd5ef2e3ca365426155adf6ecd965c77e2b0259e1a
MD5 e473e5166d25cafa22b159f4c2cab64f
BLAKE2b-256 2465100bc2ef58c25a69fdc6c16b08d2e58507aed2cd6a93c5967d47fc9dca55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plain_tunnel-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 42572a27e1a10230d4ce7fd180c51798c57395a7c8bdf0de294979b1204329ae
MD5 86e627403490d72696378e4b6aae2b73
BLAKE2b-256 cf4eb52edde15e6b4015dd3bccde655caa46201539d7d0ca00b557c7cc227711

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