Metadata-Version: 2.4
Name: phoxtail
Version: 0.1.1
Summary: The engine behind every Phoxtail project.
Author-email: Phoxmor <info@phoxtail.com>
Maintainer-email: Evangelos Pisinas <evangelos.pisinas@phoxtail.com>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://phoxtail.com
Project-URL: Repository, https://github.com/phoxmor/phoxtail
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Framework :: Django
Classifier: Framework :: Wagtail
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.9.0
Requires-Dist: rich>=13.0.0
Requires-Dist: questionary>=2.0.0
Requires-Dist: jinja2>=3.1.0
Provides-Extra: dev
Requires-Dist: pip-tools>=7.0.0; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: ruff>=0.4.0; extra == "dev"
Dynamic: license-file

# Phoxtail

The engine behind every Phoxtail project.

Phoxtail is a CLI toolkit that automates the development and deployment workflow for Phoxtail projects — Docker configuration, environment setup, database operations, nginx, SSL, media sync, and more.

## Requirements

- Python 3.11+
- [uv](https://docs.astral.sh/uv/) (recommended) or pip

## Installation

### As a CLI tool

```bash
# Recommended: installs in an isolated environment
uv tool install phoxtail

# Or with pip/pipx
pip install phoxtail
```

### For development

```bash
git clone git@github.com:phoxmor/phoxtail.git
cd phoxtail
uv venv
source .venv/bin/activate
uv pip install -e ".[dev]"
```

## Usage

Run `phoxtail` from the root of any Phoxtail project (where `phoxtail.toml` lives):

```bash
phoxtail --help
```

### Commands

| Command | Description |
|---|---|
| `phoxtail docker up/down/restart` | Docker lifecycle management |
| `phoxtail docker create compose` | Generate docker-compose.yaml |
| `phoxtail docker create dockerfile` | Generate Dockerfile |
| `phoxtail env create` | Generate .env files (dev/production) |
| `phoxtail nginx create initial` | Nginx config for SSL certificate retrieval |
| `phoxtail nginx create production` | Nginx config with SSL/TLS |
| `phoxtail ssl obtain/renew` | SSL certificate management |
| `phoxtail db backup/restore` | Database backup and restore |
| `phoxtail db pull` | Pull database from remote server |
| `phoxtail media pull` | Sync media files from remote server |
| `phoxtail requirements compile` | Compile Python dependencies |
| `phoxtail manage <command>` | Run Django management commands |
| `phoxtail test` | Run the test suite |
| `phoxtail lint` | Run linting and formatting |
| `phoxtail version` | Show CLI version |

## Project detection

Phoxtail detects projects by looking for `phoxtail.toml` in the current directory. This file declares the project name, Docker image prefix, database clusters, and their dependencies.

## Development

### Running tests

```bash
pytest
```

### Project structure

```
phoxtail/
  phoxtail/
    __init__.py         # Package version
    __main__.py         # CLI entry point (Typer app)
    commands/           # Command modules
    utils/              # Shared utilities (config, docker, env, templates)
    templates/          # Jinja2 templates (Dockerfile, compose, nginx, env)
    tests/              # Test suite
  pyproject.toml
  LICENSE
  README.md
```

## License

BSD 3-Clause. See [LICENSE](LICENSE).
