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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for plain_tunnel-0.8.0.tar.gz
Algorithm Hash digest
SHA256 c93f887e343c5505d8f4e813f4f0df339f0ca1a2197d8a2253f6139d19ef14ae
MD5 84304e255d80cc624140dbe374b43735
BLAKE2b-256 b1792e68395ee92818df4f5f64e42cc0b5779e9e5f17ff214c7a21dfb6e73244

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plain_tunnel-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5387640bf0b1ee937db0f99da3bddd72a1a83fbe12a596a9c32aaccb6aa04fd4
MD5 dda21abce00e1e830fc24e4a99a761e0
BLAKE2b-256 bcc4081990f6874ba0a29d998d9ffd3841b315150acc18d0e9eb8c26ec500ccc

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