The modern, green-on-first-render Python project generator.
uv · ruff · mypy · pytest · pre-commit · GitHub Actions · optional Docker & docs — in one command.
CookiePyStarter is a Cookiecutter template that generates the Python project you always end up hand-rolling: a uv-managed, src-layout package wired with ruff, mypy, pytest, pre-commit, and GitHub Actions CI — and every generated project is green on first render (the generator itself runs lint, type check, and tests before it hands you the keys).
Works with the stock cookiecutter CLI — nothing else to install.
|
Post-generation hook runs |
Built native for uv with modern PEP 621 metadata and PEP 735 dependency groups. Zero legacy |
|
Shipped with |
Prompt-driven license generation: choose MIT, Apache-2.0, BSD-3-Clause, or CC0 (None). The post-gen hook bakes author & year cleanly. |
|
Opt-in during generation for a multi-stage |
Every generated project includes a zero-config |
uvx cookiecutter gh:mramitdas/CookiePyStarterAnswer 10 short prompts (or press Enter for defaults) and get a project that
already passes ruff check, ruff format --check, mypy --strict, and
pytest — plus an initial git commit and pre-commit hooks installed.
Prefer pip? pipx run cookiecutter gh:mramitdas/CookiePyStarter works too.
flowchart LR
A["10 Prompts"] --> B["Jinja2 Rendering"]
B --> C["Post-Gen Hook"]
C --> D["uv sync & git init"]
D --> E["ruff & mypy & pytest"]
E --> F["🎉 Green Project Ready"]
my_awesome_project/
├── src/my_awesome_project/ # src-layout package (__version__ + utility + tests)
├── tests/ # pytest suite with coverage (non-vacuous)
├── pyproject.toml # PEP 621 metadata; ruff/mypy/pytest config inline
├── .pre-commit-config.yaml # ruff + ruff-format + mypy hooks
├── .github/workflows/ci.yml # GitHub Actions: lint + typecheck + tests
├── LICENSE # your choice: MIT / Apache-2.0 / BSD-3-Clause / CC0
├── README, CHANGELOG, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY
├── AGENTS.md + STANDING_APPROVALS.md # rules for AI coding agents
└── Dockerfile + mkdocs.yml # only when you opted in
Every dependency lives in pyproject.toml (PEP 735 dependency groups) — no
requirements/ files, no setup.sh, no deserted tooling.
| Prompt | Default | Choices |
|---|---|---|
project_name |
My Awesome Project | any |
package_name |
derived | valid Python identifier |
project_description |
A short description… | any |
author |
Your Name | any |
email |
you@example.com | any |
github_username |
your_github_username | any |
license |
MIT | MIT / Apache-2.0 / BSD-3-Clause / None (CC0) |
python_version |
3.12 | 3.10 – 3.14 |
docker |
no | no / yes |
docs |
no | no / yes |
The package name is validated before generation: invalid input (spaces, hyphens, keywords) aborts with a clear error, not a broken project.
| CookiePyStarter | cookiecutter-pypackage | |
|---|---|---|
| Dependency management | uv (fast, PEP 735 groups) | pip / requirements |
| Lint + format | ruff (one tool) | flake8 + isort + separate config |
| Green-on-first-render | yes — generator runs the checks | no |
| Windows CI for the template itself | yes (render matrix) | partial |
| Generated project tests | real package imports + coverage | hello-world style |
| Docs engine option | mkdocs-material | mkdocs |
| License choice at generation | 4 options incl. CC0 | fixed |
This template targets the modern Python project structure (src layout, PEP 621, single-source tool config) that the ecosystem has converged on in 2026. If you want a Django/Flask web scaffold, look at cookiecutter-django — CookiePyStarter is deliberately framework-agnostic.
Long-form guides live in docs/ and are published on GitHub Pages:
- Python cookiecutter template — how to use and extend
- uv + cookiecutter — dependency management that doesn't hurt
- Modern Python project structure — why src layout wins
- Python boilerplate generator — picking the right starting point
- uv (the post-generation hook uses it to sync dependencies, install pre-commit, and verify the project is green) and git. Without uv, generation stops with a friendly error.
- Questions → Stack Overflow, tag cookiecutter
- Bugs / ideas → open an issue
- Support the project → GitHub Sponsors · PayPal
PRs welcome — see CONTRIBUTING and the Code of Conduct.
This template is licensed under the Apache License 2.0. Generated projects choose their own license at generation time.


