plain.tunnel


Nameplain.tunnel JSON
Version 0.8.0 PyPI version JSON
download
home_pageNone
SummaryConnect to your local development server remotely.
upload_time2025-10-06 17:29:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.13
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # plain.tunnel

**Connect to your local development server remotely.**

- [Overview](#overview)
- [Usage with plain.dev](#usage-with-plaindev)
- [CLI Usage](#cli-usage)
- [Configuration](#configuration)
    - [Environment Variables](#environment-variables)
    - [ALLOWED_HOSTS](#allowed_hosts)
- [Installation](#installation)

## Overview

The Plain Tunnel is a hosted service, like [ngrok](https://ngrok.com/) or [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/), 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:

```console
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:

```console
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`:

```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:

```bash
PLAIN_DEV_TUNNEL_URL=https://myappname.plaintunnel.com
```

![](https://assets.plainframework.com/docs/plain-dev-tunnel.png)

## CLI Usage

The [`cli`](./cli.py#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:

```console
# 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](https://pypi.org/project/plain.tunnel/):

```bash
uv add plain.tunnel --dev
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "plain.tunnel",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.13",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Dave Gaeddert <dave.gaeddert@dropseed.dev>",
    "download_url": "https://files.pythonhosted.org/packages/b1/79/2e68395ee92818df4f5f64e42cc0b5779e9e5f17ff214c7a21dfb6e73244/plain_tunnel-0.8.0.tar.gz",
    "platform": null,
    "description": "# plain.tunnel\n\n**Connect to your local development server remotely.**\n\n- [Overview](#overview)\n- [Usage with plain.dev](#usage-with-plaindev)\n- [CLI Usage](#cli-usage)\n- [Configuration](#configuration)\n    - [Environment Variables](#environment-variables)\n    - [ALLOWED_HOSTS](#allowed_hosts)\n- [Installation](#installation)\n\n## Overview\n\nThe Plain Tunnel is a hosted service, like [ngrok](https://ngrok.com/) or [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/), 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.\n\nThis is especially useful for testing webhooks, doing mobile styling on a real device, or temporarily sharing your local development URL with someone.\n\nBasic usage:\n\n```console\nplain tunnel https://app.localhost:8443\n```\n\nThis will create a tunnel from a randomly generated subdomain to your local server. You can also specify a custom subdomain:\n\n```console\nplain tunnel https://app.localhost:8443 --subdomain myappname\n```\n\n## Usage with plain.dev\n\nThe simplest way to use `plain.tunnel` is to integrate it with your `plain.dev` configuration.\n\nAdd it to your `plain.dev` configuration in `pyproject.toml`:\n\n```toml\n[tool.plain.dev.run]\ntunnel = {cmd = \"plain tunnel $PLAIN_DEV_URL --subdomain myappname --quiet\"}\n```\n\nTo show a tunnel URL (whether you are using `plain.tunnel` or not), you can add `PLAIN_DEV_TUNNEL_URL` to your local `.env` file:\n\n```bash\nPLAIN_DEV_TUNNEL_URL=https://myappname.plaintunnel.com\n```\n\n![](https://assets.plainframework.com/docs/plain-dev-tunnel.png)\n\n## CLI Usage\n\nThe [`cli`](./cli.py#cli) command accepts the following options:\n\n- `destination`: The URL of your local development server (required)\n- `--subdomain`: Custom subdomain to use (optional, auto-generated if not provided)\n- `--debug`: Enable debug logging\n- `--quiet`: Only log warnings and errors\n\nExamples:\n\n```console\n# Basic usage with auto-generated subdomain\nplain tunnel https://app.localhost:8443\n\n# With custom subdomain\nplain tunnel https://app.localhost:8443 --subdomain myapp\n\n# With debug logging\nplain tunnel https://app.localhost:8443 --debug\n\n# One-off usage without installation\nuvx plain-tunnel https://app.localhost:8443\n```\n\n## Configuration\n\n### Environment Variables\n\nThe tunnel can be configured using environment variables:\n\n- `PLAIN_TUNNEL_SUBDOMAIN`: Default subdomain to use\n- `PLAIN_TUNNEL_HOST`: Tunnel host (defaults to plaintunnel.com)\n\n## Installation\n\nInstall the `plain.tunnel` package from [PyPI](https://pypi.org/project/plain.tunnel/):\n\n```bash\nuv add plain.tunnel --dev\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Connect to your local development server remotely.",
    "version": "0.8.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bcc4081990f6874ba0a29d998d9ffd3841b315150acc18d0e9eb8c26ec500ccc",
                "md5": "dda21abce00e1e830fc24e4a99a761e0",
                "sha256": "5387640bf0b1ee937db0f99da3bddd72a1a83fbe12a596a9c32aaccb6aa04fd4"
            },
            "downloads": -1,
            "filename": "plain_tunnel-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dda21abce00e1e830fc24e4a99a761e0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.13",
            "size": 10401,
            "upload_time": "2025-10-06T17:29:12",
            "upload_time_iso_8601": "2025-10-06T17:29:12.221502Z",
            "url": "https://files.pythonhosted.org/packages/bc/c4/081990f6874ba0a29d998d9ffd3841b315150acc18d0e9eb8c26ec500ccc/plain_tunnel-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b1792e68395ee92818df4f5f64e42cc0b5779e9e5f17ff214c7a21dfb6e73244",
                "md5": "84304e255d80cc624140dbe374b43735",
                "sha256": "c93f887e343c5505d8f4e813f4f0df339f0ca1a2197d8a2253f6139d19ef14ae"
            },
            "downloads": -1,
            "filename": "plain_tunnel-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "84304e255d80cc624140dbe374b43735",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13",
            "size": 26277,
            "upload_time": "2025-10-06T17:29:12",
            "upload_time_iso_8601": "2025-10-06T17:29:12.940216Z",
            "url": "https://files.pythonhosted.org/packages/b1/79/2e68395ee92818df4f5f64e42cc0b5779e9e5f17ff214c7a21dfb6e73244/plain_tunnel-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-06 17:29:12",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "plain.tunnel"
}
        
Elapsed time: 2.87463s