Thanks for contributing! Please follow the Code of Conduct.
git clone https://github.com/Create-Python-App/create-python-app.git
cd create-python-app
uv sync --group dev
uv run pre-commit install
make test
make lint
make typecheckThe CLI can run entirely offline for catalog-related tests by switching into fixture mode. Use --fixture to opt in for a single run, or set the environment variables below for the current shell.
--fixtureenables fixture mode and optionally accepts a directory argument. When you pass a directory, it setsCPA_FIXTURE_DIRfor that run.CPA_CATALOG_FIXTURE=1enables the same offline catalog path without using the flag.CPA_FIXTURE_DIR=/path/to/repopoints to the repository root that contains the fixture tree. The CLI looks forfixtures/catalog/templates.jsonthere, and local template sources live underfixtures/templates/andfixtures/extensions/.
The repository ships a small fixture catalog in fixtures/catalog/templates.json so you can list templates or run a smoke scaffold without hitting GitHub raw URLs.
From the repository root, this works without network access:
uv run create-awesome-python-app --fixture . --list-templatesThis uses the local fixture template under fixtures/templates/example-cli:
repo="$(pwd)"
uv run create-awesome-python-app --fixture "$repo" --template "file://$repo/fixtures/templates/example-cli" --no-install --no-interactive ./tmp-cpa-smokeIf you prefer environment variables instead of the flag, the equivalent is:
export CPA_CATALOG_FIXTURE=1
export CPA_FIXTURE_DIR="$repo"
uv run create-awesome-python-app --list-templatesThe fixture behavior is exercised in packages/create-awesome-python-app/tests/test_cli.py and packages/create-awesome-python-app/tests/test_catalog_fetch.py.
- Branch from
main - Keep changes focused; link an issue
- Use Conventional Commits
- Ensure tests/lint/typecheck pass
- Fill out the PR template
Template and extension authoring lives in cpa-templates.
To test scaffolding against a local cpa-templates checkout:
export CPA_TEMPLATES_ROOT=/path/to/cpa-templates
uv run pytest packages/create-awesome-python-app/tests/test_cpa_templates_integration.py -vThe catalog is fetched from cpa-templatestemplates.json (override with CPA_CATALOG_URL).