Metadata-Version: 2.4
Name: pyweb-cli
Version: 4.0.0
Summary: PyWeb CLI — The Python Alternative Web. Register FREE TLDs, host on Hugging Face or your own hardware.
Project-URL: Homepage, https://pyweb.dev
Project-URL: Documentation, https://pyweb.dev/docs
Project-URL: Source, https://github.com/pyweb/pyweb-cli
Project-URL: Issues, https://github.com/pyweb/pyweb-cli/issues
Author-email: PyWeb <hello@pyweb.dev>
License-Expression: MIT
License-File: LICENSE
Keywords: cli,dns,hosting,huggingface,tld,web
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: rich>=13.0.0
Provides-Extra: all
Requires-Dist: textual>=0.50.0; extra == 'all'
Requires-Dist: watchdog>=3.0.0; extra == 'all'
Provides-Extra: tui
Requires-Dist: textual>=0.50.0; extra == 'tui'
Provides-Extra: watch
Requires-Dist: watchdog>=3.0.0; extra == 'watch'
Description-Content-Type: text/markdown

# PyWeb CLI

[![PyPI](https://img.shields.io/pypi/v/pyweb-cli.svg)](https://pypi.org/project/pyweb-cli/)
[![Python](https://img.shields.io/pypi/pyversions/pyweb-cli.svg)](https://pypi.org/project/pyweb-cli/)

> PyWeb — The Python Alternative Web. Register **FREE TLDs**, host on Hugging Face or your own hardware.

`pyweb-cli` is the official command-line tool for PyWeb. It lets you:

- Register custom top-level domains (e.g. `.mybrand`) for free.
- Deploy static sites, landing pages, or simple blogs to the PyWeb network.
- Run a local development server with live reload.
- Manage your domains and deployments from an interactive TUI.

## Install

```bash
pip install pyweb-cli
```

Optional extras:

```bash
# Interactive TUI
pip install pyweb-cli[tui]

# Live reload with file-system events
pip install pyweb-cli[watch]

# Everything
pip install pyweb-cli[all]
```

## Quick start

```bash
# Log in (just a username today; API tokens are optional)
pyweb login mycoolname

# Create a new PyWeb project
pyweb init my-landing-page --template landing

# Move into the project
cd my-landing-page

# Register a free TLD
pyweb create domain .mycoolname

# Deploy it
pyweb deploy

# Open it in your browser
pyweb open .mycoolname
```

## Commands

| Command | Description |
| --- | --- |
| `pyweb init <name>` | Create a new PyWeb project from a template. |
| `pyweb login <username>` | Store your PyWeb username (and optional API token). |
| `pyweb whoami` | Show the current user. |
| `pyweb create domain .tld` | Register a free TLD. |
| `pyweb site link --tld .tld` | Link the current project to a TLD. |
| `pyweb deploy [--tld .tld]` | Deploy the current project. |
| `pyweb serve [--port 8080] [--watch]` | Local preview server. |
| `pyweb open .tld` | Open the live URL. |
| `pyweb list` | List your registered domains. |
| `pyweb status --tld .tld` | Show domain status and last deploy. |
| `pyweb logs --tld .tld` | Show deployment logs. |
| `pyweb tui` | Interactive terminal UI. |

## Configuration

Global config lives in `~/.pyweb/config.json`. Project config lives in `pyweb.json` next to `index.html`.

Example `pyweb.json`:

```json
{
  "name": "my-landing-page",
  "tld": ".mycoolname",
  "template": "landing",
  "visibility": "public"
}
```

Environment variables:

- `PYWEB_API_BASE` — override the default API endpoint.
- `PYWEB_TOKEN` — override the stored API token.

## License

MIT — see [LICENSE](LICENSE).
