Skip to main content

A powerful CLI tool to bootstrap and manage production-ready Robyn applications with best practices built-in.

Project description

robyn-config

Downloads PyPI version License Python DeepWiki

robyn-config is a comprehensive CLI tool designed to bootstrap and manage Robyn applications. It streamlines your development workflow by generating production-ready project structures and automating repetitive tasks, allowing you to focus on building your business logic.

Think of it as the essential companion for your Robyn projects-handling everything from initial setup with best practices to injecting new feature components as your application grows.

📦 Installation

You can simply use Pip for installation.

pip install robyn-config

🤖 AI Agent Skills

robyn-config also supports AI agent skills, which let agents apply reusable project-specific workflows and guidance.

To add the Robyn Config skills pack, run:

npx skills add Lehsqa/robyn-config-skills

🤔 Usage

🚀 Create a Project

To bootstrap a new project with your preferred architecture and ORM, run:

# Create a DDD project with SQLAlchemy (uses uv by default)
robyn-config create my-service --orm sqlalchemy --design ddd ./my-service
# Create an MVC project with Tortoise ORM, locking with poetry
robyn-config create newsletter --orm tortoise --design mvc --package-manager poetry ~/projects/newsletter
# Launch the interactive create UI
robyn-config create -i

Interactive mode defaults destination to . and lets you edit all fields before confirmation. If you pass flags (for example --orm tortoise), those values are prefilled in the form and still editable.

➕ Add Business Logic

Once inside a project, you can easily add new entities (models, routes, repositories, etc.) using the add command. This automatically generates all necessary files and wiring based on your project's architecture.

# Add a 'product' entity to your project
cd my-service
robyn-config add product

This will:

  • Generate models/tables.
  • Create repositories.
  • Setup routes and controllers.
  • Register everything in the app configuration.
  • Respect your configured paths: add reads injection targets from [tool.robyn-config.add] in pyproject.toml (e.g., domain/operational/presentation paths for DDD or views/repository/urls for MVC). You can customize those paths before running add to steer where new code is written.

🛡️ Add Admin Panel

Add admin panel scaffolding to an existing project:

cd my-service
robyn-config adminpanel

This generates a default superadmin with credentials admin/admin.

You can override the default superadmin credentials when scaffolding:

robyn-config adminpanel -u superadmin -p super-secret-password ./my-service

The adminpanel command will:

  • Generate the admin module in src/app/infrastructure/adminpanel for DDD projects, or in src/app/adminpanel for MVC projects.
  • Read ORM from [tool.robyn-config].orm and scaffold only required ORM internals while keeping generated module filenames ORM-agnostic.
  • Wire adminpanel.register(...) into src/app/server.py.
  • Respect [tool.robyn-config.add].database_table_path for injecting admin tables (Role, UserRole).
  • Write/update [tool.robyn-config.adminpanel] metadata in pyproject.toml with created = true.
  • Ensure required dependencies exist in the target project: jinja2, aiosqlite, pandas, openpyxl.
  • Prompt before overwriting if admin panel scaffolding was already created.

🏃 CLI Options

Usage: robyn-config [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  add     Add new business logic to an existing robyn-config project.
  adminpanel  Add admin panel scaffolding to an existing robyn-config project.
  create  Copy the template into destination with specific configurations.

create command options:

  • name: Sets the project name used in templated files like pyproject.toml and README.md. Required unless -i is used.
  • -i, --interactive: Launch a Textual terminal UI to fill create options interactively.
  • --orm: Selects the database layer. Options: sqlalchemy (default), tortoise.
  • --design: Toggles between the architecture templates. Options: ddd (default), mvc.
  • --package-manager: Choose how dependencies are locked/installed. Options: uv (default), poetry.
  • destination: The target directory. Defaults to . (including in interactive mode).

add command options:

  • name: The name of the entity/feature to add (e.g., user, order-item).
  • project_path: Path to the project root. Defaults to current directory.

adminpanel command options:

  • -u, --username: Default superadmin username injected into generated bootstrap code. Defaults to admin.
  • -p, --password: Default superadmin password injected into generated bootstrap code. Defaults to admin.
  • project_path: Path to the project root. Defaults to current directory.

🐍 Python Version Support

robyn-config is compatible with the following Python versions:

Python >= 3.11

Please make sure you have the correct version of Python installed before starting to use this project.

💡 Features

  • Rapid Scaffolding: Instantly generate robust, production-ready Robyn backend projects.
  • Integrated Component Management: Use the CLI to inject models, routes, and repositories into your existing architecture, ensuring consistency and best practices.
  • Architectural Flexibility: Native support for Domain-Driven Design (DDD) and Model-View-Controller (MVC) patterns.
  • ORM Choice: Seamless integration with SQLAlchemy or Tortoise ORM.
  • Package Manager choice: Lock/install via uv (default) or poetry, with fresh lock files generated in quiet mode.
  • Admin Panel Scaffolding: adminpanel builds an ORM-aware admin module, auto-wires routes, and supports custom superadmin credentials.
  • Resilient operations: create cleans up generated files if it fails; add and adminpanel roll back with a temporary project backup on errors.
  • Production Ready: Includes Docker, Docker Compose, and optimized configurations out of the box.
  • DevEx: Pre-configured with ruff, pytest, black, and mypy for a superior development experience.
  • AI Agent Skills: Installable skills support for AI agents to streamline specialized workflows.

🗒️ How to contribute

🏁 Get started

Feel free to open an issue for any clarifications or suggestions.

⚙️ To Develop Locally

Prerequisites

  • Python >= 3.11
  • uv (recommended) or pip

Setup

  1. Clone the repository:

    git clone https://github.com/Lehsqa/robyn-config.git
    
  2. Setup a virtual environment and install dependencies:

    uv venv && source .venv/bin/activate
    uv pip install -e .[dev]
    
  3. Run linters and tests:

    make check
    

✨ Special thanks

Special thanks to the Robyn team for creating such an amazing framework!

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

robyn_config-0.5.0.tar.gz (150.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

robyn_config-0.5.0-py3-none-any.whl (222.3 kB view details)

Uploaded Python 3

File details

Details for the file robyn_config-0.5.0.tar.gz.

File metadata

  • Download URL: robyn_config-0.5.0.tar.gz
  • Upload date:
  • Size: 150.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for robyn_config-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0bae38d2d1a512e20a425612ac5753e4f494c8a968ce52b001549d24ec129bda
MD5 3bae8ecbb09f90ed55a8d9f9fbfc99dc
BLAKE2b-256 0158459159db1993c29c14333a7b58e3218313ff416aa86a8401ecdfe3c0ddee

See more details on using hashes here.

Provenance

The following attestation bundles were made for robyn_config-0.5.0.tar.gz:

Publisher: python-publish.yml on Lehsqa/robyn-config

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file robyn_config-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: robyn_config-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 222.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for robyn_config-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22be3cc5568d48f4b7fc6809ecddea2927b1952f2d4371d8c06e7e0590f1ff9a
MD5 3935ba36c84e33cddcd2c5ba149693df
BLAKE2b-256 61c84397e128f4dea44e2c5893ce761ee9f5ab498b2bd227de9ba2e9a57414d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for robyn_config-0.5.0-py3-none-any.whl:

Publisher: python-publish.yml on Lehsqa/robyn-config

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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