Metadata-Version: 2.4
Name: pyrig
Version: 14.0.0
Summary: Pyrig is a toolkit that standardizes and automates Python project setup, configuration, development, and maintenance.
Keywords: pyrig,project-setup,scaffolding,boilerplate,project-template,automation,configuration,developer-tools,code-quality,ci-cd,devops
Author: Winipedia
License-Expression: MIT
License-File: LICENSE
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: System :: Software Distribution
Classifier: Topic :: System :: Installation/Setup
Requires-Dist: typer>=0.21.1
Maintainer: Winipedia
Requires-Python: >=3.12
Project-URL: Homepage, https://github.com/Winipedia/pyrig
Project-URL: Documentation, https://Winipedia.github.io/pyrig
Project-URL: Source, https://github.com/Winipedia/pyrig
Project-URL: Issues, https://github.com/Winipedia/pyrig/issues
Project-URL: Changelog, https://github.com/Winipedia/pyrig/releases
Description-Content-Type: text/markdown

# pyrig

<!-- security -->
[![DependencyAuditor](https://img.shields.io/badge/security-pip--audit-blue?logo=python)](https://github.com/pypa/pip-audit)
[![SecurityChecker](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
<!-- ci/cd -->
[![CI](https://img.shields.io/github/actions/workflow/status/Winipedia/pyrig/health_check.yml?label=CI&logo=github)](https://github.com/Winipedia/pyrig/actions/workflows/health_check.yml)
[![CD](https://img.shields.io/github/actions/workflow/status/Winipedia/pyrig/deploy.yml?label=CD&logo=github)](https://github.com/Winipedia/pyrig/actions/workflows/deploy.yml)
<!-- code-quality -->
[![DependencyChecker](https://img.shields.io/badge/dependencies-deptry-blue)](https://github.com/osprey-oss/deptry)
[![MarkdownLinter](https://img.shields.io/badge/markdown-rumdl-darkgreen)](https://github.com/rvben/rumdl)
[![PythonLinter](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![TypeChecker](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
[![VersionControlHookManager](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/j178/prek/master/docs/assets/badge-v0.json)](https://github.com/j178/prek)
<!-- testing -->
[![CoverageTester](https://codecov.io/gh/Winipedia/pyrig/branch/main/graph/badge.svg)](https://codecov.io/gh/Winipedia/pyrig)
[![ProjectTester](https://img.shields.io/badge/tested%20with-pytest-46a2f1.svg?logo=pytest)](https://pytest.org)
<!-- tooling -->
[![PackageManager](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![Pyrigger](https://img.shields.io/badge/built%20with-pyrig-3776AB?logo=buildkite&logoColor=black)](https://github.com/Winipedia/pyrig)
[![RemoteVersionController](https://img.shields.io/github/stars/Winipedia/pyrig?style=social)](https://github.com/Winipedia/pyrig)
[![VersionController](https://img.shields.io/badge/Git-F05032?logo=git&logoColor=white)](https://git-scm.com)
<!-- documentation -->
[![DocsBuilder](https://img.shields.io/badge/MkDocs-Documentation-326CE5?logo=mkdocs&logoColor=white)](https://www.mkdocs.org)
[![Documentation](https://img.shields.io/badge/Docs-GitHub%20Pages-black?style=for-the-badge&logo=github&logoColor=white)](https://Winipedia.github.io/pyrig)
<!-- project-info -->
[![PackageIndex](https://img.shields.io/pypi/v/pyrig?logo=pypi&logoColor=white)](https://pypi.org/project/pyrig)
[![ProgrammingLanguage](https://img.shields.io/pypi/pyversions/pyrig)](https://www.python.org)
[![License](https://img.shields.io/github/license/Winipedia/pyrig)](https://github.com/Winipedia/pyrig/blob/main/LICENSE)

<!-- rumdl-disable MD013 -->
---

> Pyrig is a toolkit that standardizes and automates Python project setup, configuration, development, and maintenance.

---

<!-- rumdl-enable MD013 -->

## 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

```bash
uv init
uv add pyrig
uv run pyrig init
```

See the [Getting Started Guide](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)

`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)

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)

`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)

Generate test skeletons with `pyrig sync`.
This will generate test skeletons for all source modules
and update them automatically as your project evolves.

### [Test Fixtures](https://Winipedia.github.io/pyrig/fixtures)

pyrig enables automatic sharing and registration of pytest fixtures.
Run `pyrig mk fixture <name>` to generate a new fixture that is
automatically registered and available across all your tests.

### [Multi-Package Inheritance and Extensibility 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)

Pyrig generates GitHub Actions workflows for CI/CD and automatically configures
and applies repository protection settings and branch protection rules to ensure
your repository is protected.
Run `pyrig protect-repo` to apply or update repository protection settings or
simply use the fully working CI/CD pipeline to apply them automatically.

## Commands

Run `pyrig <command> --help` for more information about a specific command and
its usage.

```bash
uv run pyrig init                    # Full project initialization
uv run pyrig sync                    # Synchronize project
uv run pyrig mk fixture <name>       # Generate a new pytest fixture
uv run pyrig mk cmd <name>           # Create a new CLI subcommand stub
uv run pyrig mk subcls               # Generate and override subclasses
uv run pyrig protect-repo            # Configure repository protection
uv run pyrig scratch                 # Execute the project's .scratch.py file
uv run pyrig rmpyc                   # Remove __pycache__ directories
uv run pyrig version                 # Show pyrig version
uv run my-project --help             # Your project's CLI
uv run my-project version            # Show your project's version
```

## Documentation

| | |
|---|---|
| **[Full Documentation](https://Winipedia.github.io/pyrig)** | The manually written documentation |
| **[CodeWiki](https://codewiki.google/github.com/winipedia/pyrig)** | AI-generated documentation |
| **[Tutorials](https://www.youtube.com/@Winipedia-py/playlists)** | YouTube tutorials for pyrig |
