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.7.0.tar.gz (26.1 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.7.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for plain_tunnel-0.7.0.tar.gz
Algorithm Hash digest
SHA256 4cad97d2888060620c99aedfb4a5d68144851eeb98fc70db7c4ec8ddd279e4af
MD5 a8830c8739f12f2c3012138367c0149e
BLAKE2b-256 df24489f1d4a2aee00424fa38730d4b50b90c430eb95c6bda273b9169695a630

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plain_tunnel-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4714b1a39495738513736c1f09f4794ab4d4b92923f0a4b5e077e4a74bed9b4c
MD5 8a85039a8b2628dcee658b7c064427b2
BLAKE2b-256 d5f11c65c63314515a381e6e08ecb46c3e954d9f217aec3890c390aabc23f368

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