8 ms·
Show HN: Pyrig – A tool that automates project setup and maintenance
# What is pyrig?
pyrig is a package and tool that *rigs up* your project. It scaffolds and initializes a complete, fully configured, installed and working Python project with one command and makes the process of developing and maintaining it more seamless and efficient by automating things like configuration management, CLI generation, testing infrastructure, and more.
# Requirements
* Python 3.12+
* Git
* uv
# Quick Start
uv init my-project --python 3.12
cd my-project
uv add pyrig --dev
uv run pyrig init
See the [Getting Started Guide](https://Winipedia.github.io/pyrig/getting-started https://Winipedia.github.io/pyrig/getting-started) for detailed setup instructions to also fully integrate with GitHub and CI/CD from the start.
# Features
# [Project Scaffolding & Initialization](https://Winipedia.github.io/pyrig/scaffolding https://Winipedia.github.io/pyrig/scaffolding)
`pyrig init` generates a complete project in one command that works out of the box. This includes everything a modern python project needs:
* Standardized directory structure
* Fully configured dev tools (linters, formatters, type checkers, test frameworks, git hooks, etc.)
* End-to-end CI/CD pipeline with GitHub Actions and integrated repository protection
* Complete and working CLI
* And much more...
# [File & Configuration Management](https://Winipedia.github.io/pyrig/config-files https://Winipedia.github.io/pyrig/config-files)
Every generated file is backed by a Python class that validates and merges automatically. Override any config by subclassing, or define entirely new config files — pyrig discovers and manages them for you. Run `pyrig sync` to create or update all config files at once. Run `pyrig mk subcls` to generate a subclass for overriding a specific file.
# [Automatic CLI](https://Winipedia.github.io/pyrig/cli https://Winipedia.github.io/pyrig/cli)
`pyrig init` sets up a CLI for your project that works immediately. Generate and add new commands by running `pyrig mk cmd <name>`. An automatic version command is included that shows the version of your project. Run `my-project version` to see it in action.
# [Mirror Test Generation & Maintenance](https://Winipedia.github.io/pyrig/mirror-tests https://Winipedia.github.io/pyrig/mirror-tests)
Generate test skeletons with `pyrig sync`. This will generate test skeletons for all source modules and update them automatically as your project evolves.
# [Multi-Package Inheritance and Extensibility Architecture](https://Winipedia.github.io/pyrig/architecture https://Winipedia.github.io/pyrig/architecture)
Override and customize any and all behaviour to suit your project's needs. pyrig's classes are designed for inheritance and composition, allowing you to create custom configurations, tools, and more by subclassing and simply overriding methods. pyrig will automatically discover and use your custom classes without any additional configuration. Run `pyrig mk subcls` to generate a subclass for any pyrig class.
# [CI/CD & Repository Protection](https://Winipedia.github.io/pyrig/ci-cd https://Winipedia.github.io/pyrig/ci-cd)
Pyrig generates GitHub Actions workflows for CI/CD which automatically test and release your code. They also configure and apply repository protection settings and protection rulesets. Push your code to GitHub after initialization and see it in action.
# Commands
Run `pyrig --help` to see a list of all available commands and their usage. Run `pyrig <command> --help` for more information about a specific command and its usage. Run `my-project --help` to see the automatically generated CLI for your project.
# Documentation
|[*Full Documentation*](https://Winipedia.github.io/pyrig https://Winipedia.github.io/pyrig)|The manually written documentation|
|:-|:-|
|[*CodeWiki*](https://codewiki.google/github.com/winipedia/pyrig https://codewiki.google/github.com/winipedia/pyrig)|AI-generated documentation|
|[*Tutorials*](https://www.youtube.com/@Winipedia-py/playlists https://www.youtube.com/@Winipedia-py/playlists)|YouTube tutorials for pyrig|
- Fajar_Rahmad 2mo agoThis looks useful. However, for the release action, it might be better to use tool such as git-cliff to generate changelog or calculate the next version number.
- Winipedia 2mo agoI used to autobump the version in the release, but this prevents one from thinking about their versioning and just release everything with that autobump, so lets say the autobump is minor, you might release major changes or patches as minor changes, so I decided to not do that automatically. And for the changelog I decided to just use the automatic changelog that github can produce for simplicity. However it would not be difficult to add those things via a plugin if one wanted to
- vancekai 2mo ago[dead]