Show HN: Pyrig – One command to set up a production-ready Python project

  • Posted 9 hours ago by Winipedia
  • 1 points
https://github.com/Winipedia/pyrig
I built pyrig because I did the same setup everytime I started a proper python project. I genuinely believe this can be a great tool, for me it has already genuinely simplified my python project development. I would love feedback on this of any kind. Below is a description of what pyrig is and does.

pyrig generates and maintains a complete, production-ready Python project from a single command. It creates all the files you need — source structure, tests, CI/CD, documentation, configs — and keeps them in sync as your project evolves.

uv init

uv add pyrig

uv run pyrig init

You get: package structure with a CLI entry point, test framework with 90% coverage enforcement, GitHub Actions (CI/CD, releases, docs deployment), pre-commit hooks, MkDocs documentation site, and container support.

The key difference from templates like cookiecutter is that pyrig isn't a one-shot scaffold. It's idempotent — rerun it anytime to update configs, add missing files, or sync with the latest defaults. It merges missing values without removing your customizations.

Under the hood, each config file (pyproject.toml, GitHub workflows, .gitignore, etc.) is a Python class that generates the file with sensible defaults, validates it, and merges in anything missing. You can create custom configs by subclassing — pyrig discovers them automatically.

It also supports multi-package inheritance, so you can build a multiproject-wide base on top of pyrig and have all your projects inherit the same configs, CLI commands, test fixtures, and build steps:

pyrig → service-base → auth-service

→ payment-service

→ notification-service

Opinionated: Python 3.12+, all ruff rules enabled, strict type checking with ty, 90% test coverage minimum, linear git history with branch protection.

GitHub: https://github.com/Winipedia/pyrig

Docs: https://winipedia.github.io/pyrig

Code-Wiki AI Docs: https://codewiki.google/github.com/winipedia/pyrig

0 comments