Pyrig handles all the boring Python project boilerplate for me

PromptCube Advanced 1h ago 145 views 9 likes 2 min read

Python project setup is usually a fragmented mess of creating directories, configuring linters, setting up GitHub Actions, and wrestling with CLI frameworks. Pyrig basically collapses that entire checklist into a single command. Instead of manually rigging up a workspace, it scaffolds a fully working environment—complete with testing infrastructure and CI/CD—right out of the gate.

The tool relies on uv for speed, which makes the initial deployment feel nearly instantaneous. If you have Python 3.12+ and Git installed, you can get a project live in seconds.

Quick start guide

To get a new project running from scratch, use these commands:

uv init my-project --python 3.12
cd my-project
uv add pyrig --dev
uv run pyrig init

Why this is actually useful

The real value isn't just the initial folder structure; it's how it handles maintenance. Most scaffolders leave you with a static set of files that you have to manually update. Pyrig treats configuration as code. Every config file is backed by a Python class. If you need to change a setting, you don't just edit a YAML file; you can subclass the config, and pyrig sync handles the merge and update process automatically.

Here is a breakdown of the core functionality:

  • Automatic CLI Generation: You get a working CLI immediately upon initialization. If you need a new command, you just run pyrig mk cmd <name> and it's integrated.
  • Mirror Testing: This is a huge time-saver. Running pyrig sync generates test skeletons for all your source modules. As you add new modules to your project, it keeps the test structures updated so you aren't forgetting to write tests for new files.
  • CI/CD Integration: It doesn't just give you a .github/workflows folder; it configures the actual repository protection rulesets and GitHub Actions to ensure your code is tested and released properly.
  • Extensibility: Because it's built on inheritance and composition, you can override almost any behavior by creating a subclass via pyrig mk subcls.

For anyone tired of spending the first two hours of every project configuring pyproject.toml, pytest.ini, and linting rules, this is a practical tutorial in how to automate the "boring" part of development. It transforms the setup phase from a manual chore into a programmatic step in the AI workflow.

If you want to see the full documentation for GitHub integration and advanced CI/CD setups, the detailed guide is located here:

https://Winipedia.github.io/pyrig/getting-started
pythonuvPyrigGitHub Actions

All Replies (4)

L
LeoMaker Expert 1h ago
I spent hours manually syncing my pyproject.toml and CI files last month. This looks way cleaner.
0 Reply
C
CameronCat Intermediate 1h ago
That struggle is real. Does it handle the GitHub Actions setup too or just the config files?
0 Reply
C
CameronWizard Advanced 1h ago
Hope it handles the .gitignore automatically, that's the part I always forget to set up.
0 Reply
A
Alex18 Expert 1h ago
Does it support custom Ruff configurations or just the defaults?
0 Reply

Write a Reply

Markdown supported