Metadata-Version: 2.4
Name: robyn-config
Version: 0.1.1
Summary: CLI for scaffolding Robyn backend templates (DDD/MVC with SQLAlchemy or Tortoise).
Author-email: Leshqa <slav4ik77777@gmail.com>
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.1.7
Requires-Dist: Jinja2>=3.1
Provides-Extra: dev
Requires-Dist: ruff>=0.6.0; extra == "dev"
Requires-Dist: black>=24.10.0; extra == "dev"
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: httpx>=0.27.0; extra == "dev"
Requires-Dist: build>=1.2.1; extra == "dev"
Requires-Dist: twine>=1.6.0; extra == "dev"
Dynamic: license-file

# robyn-config

`robyn-config` is a small CLI that scaffolds Robyn backend projects from the bundled templates. It can generate either DDD or MVC layouts and swaps between SQLAlchemy and Tortoise implementations on demand.

## Installation

```bash
pip install .
# or
uv tool install .
```

## Usage

Create a project with your preferred ORM and architecture:

```bash
robyn-config create my-service --orm sqlalchemy --design ddd ./my-service
robyn-config create newsletter --orm tortoise --design mvc ~/projects/newsletter
```

Options:

- `name` sets the project name used in templated files like `pyproject.toml` and `README.md`.
- `--orm` (`sqlalchemy`|`tortoise`) selects the database layer.
- `--design` (`ddd`|`mvc`) toggles between the Domain-Driven and MVC templates.
- `destination` is the target directory (defaults to `.`); if it is not empty, you will be prompted before overwriting conflicts.

The command copies:

- Common project files (docker-compose, Makefile, env templates, README, pyproject, uv.lock).
- Application code from `src/app_ddd` or `src/app_mvc` into `src/app`.
- Compose helpers from `src/common/compose/app` with ORM-specific dev/prod runners.
- For Tortoise projects, Alembic artifacts are omitted from the Docker image.

## Template contents

The shipped templates live alongside the CLI:

- Root-level files sit under `src/common`.
- Compose files are under `src/common/compose/app`.
- Application code is under `src/ddd` and `src/mvc`.

Feel free to modify these in-place to customize the generated projects.

## Development

Run the linters/tests locally:

```bash
uv venv && source .venv/bin/activate
uv pip install -e .[dev]
ruff check src
pytest
```

Build a wheel for distribution:

```bash
python -m build
```
