Skip to content

Scaffolded Project Structure

This page documents the complete file tree that pyrig init produces when run inside a fresh project directory. The example below uses a project named my-project.

Quick Start Recap

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

Generated File Tree

my-project/
├── .gitignore                              # Git ignore rules
├── .python-version                         # Python version pin
├── .scratch.py                             # Local scratch file (not committed)
├── CODE_OF_CONDUCT.md                      # Contributor Covenant code of conduct
├── CONTRIBUTING.md                         # Contribution guidelines
├── LICENSE                                 # MIT license
├── prek.toml                               # Version control hook definitions
├── pyproject.toml                          # Package metadata and tool configuration
├── README.md                               # Project README with badges
├── SECURITY.md                             # Security policy
├── uv.lock                                 # Locked dependency manifest
├── zensical.toml                           # Documentation site configuration
│
├── .github/
│   ├── CODEOWNERS                          # Wildcard code ownership rule for the repo owner
│   ├── settings.json                       # Repository settings and rulesets
│   ├── pull_request_template.md            # Pull request description template
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml                  # Bug report issue form
│   │   ├── config.yml                      # Issue template chooser configuration
│   │   └── feature_request.yml             # Feature request issue form
│   └── workflows/
│       ├── health_check.yml                # CI: tests, linting, hooks, dependency audit
│       ├── release.yml                     # CD: tagging, GitHub release
│       └── deploy.yml                      # CD: repo settings/rulesets, documentation deployment
│
├── docs/
│   └── index.md                            # Documentation home page
│
└── src/
    └── my_project/                         # Package root (project name → snake_case)
        ├── __init__.py                     # Top-level package module
        └── py.typed                        # PEP 561 marker (typed package)

Notes

  • pyrig init starts from a clean slate. Any managed config file that already exists — e.g. the placeholders uv init creates — is deleted before the tree above is regenerated. pyproject.toml is the only exception; it is never deleted.
  • .scratch.py is version-control-ignored and created locally. It is not committed and can be recreated at any time with pyrig sync. You can run the file to experiment with code snippets with the pyrig scratch command.
  • .github/settings.json is read by the deploy workflow to apply repository settings and protection rulesets via the GitHub API on every release.
  • tests/ is not created by pyrig init. Test files are generated by pyrig sync as you add source modules — each source module gets a mirrored test file skeleton automatically.