How to keep a scaffolded project aligned with improvements in
create-awesome-python-app and
cpa-templates.
create-awesome-python-app generates a one-time snapshot of a template plus
extensions. After scaffolding, the CLI does not maintain a live link to your
project. You own every file and dependency choice going forward.
That is by design -- generated projects should be independent -- but it means updates require deliberate effort.
- Run
uv lock --upgrade(oruv lock --upgrade-package <name>) in your project to refresh pinned versions inuv.lock. - Enable Dependabot if you used the
github-setupextension (see its workflow in cpa-templates). - Compare your
pyproject.tomlscripts, dependency groups, and dev tools with the current template in cpa-templates.
Use uv tree --outdated when available to spot stale direct dependencies.
Scaffold a new project with the same template and extensions, then diff:
uvx create-awesome-python-app@latest my-project-new \
-t <template-slug> \
--addons <extension-slugs> \
--no-install \
--no-interactive
diff -r my-project/ my-project-new/ \
--exclude=.venv \
--exclude=__pycache__ \
--exclude=.git \
--exclude=.pytest_cache \
--exclude=.ruff_cache \
--exclude=dist \
--exclude=buildReview differences in config files (pyproject.toml, ruff.toml, CI
workflows, .python-version) and port changes selectively.
For a single extension update:
- Scaffold a throwaway project with only that extension applied.
- Copy the extension-specific files into your existing project (e.g. Alembic migrations, auth middleware, GitHub Actions workflows).
- Merge
pyproject.tomldependency changes manually.
If you are porting workflows, docs, or CI from create-node-app, use the CPA equivalents:
| CNA | CPA |
|---|---|
cna.config.json | cpa.config.json |
package.json manifest | pyproject.toml |
CNA_CACHE_DIR | CPA_CACHE_DIR |
CNA_REFRESH | CPA_REFRESH |
CNA_REFRESH_AFTER_HOURS | CPA_REFRESH_AFTER_HOURS |
CNA_NO_CATALOG_CACHE | CPA_NO_CATALOG_CACHE |
CNA_CATALOG_URL | CPA_CATALOG_URL |
CNA_STRICT_VERSION | CPA_STRICT_VERSION |
CNA_STRICT_REPRO | CPA_STRICT_REPRO |
CNA_SKIP_GIT | CPA_SKIP_GIT |
CNA_USER_AGENT | CPA_USER_AGENT |
~/.cache/cna (default cache) | ~/.cache/cpa (default cache) |
CLI flags are the same shape (--template / -t, --addons, --cache-dir,
--refresh, --pin, --offline, --no-install). See
cpa-vs-cna-config.md for manifest and tooling
differences (npm vs uv, ESLint vs Ruff).
The catalog lives in
cpa-templates templates.json.
Each entry has a slug and a url.
Slug resolution. Pass a slug instead of a full URL and the CLI resolves it from the catalog:
create-awesome-python-app my-app -t fastapi-starter --addons github-setupRun --list-templates or --list-addons to see available slugs. Invalid
slugs fail with a hint to pass a full URL.
GitHub URLs with ?subdir=. Remote templates use the monorepo layout:
https://github.com/Create-Python-App/cpa-templates?subdir=templates/fastapi-starter
https://github.com/Create-Python-App/cpa-templates?subdir=extensions/all-github-setup
Local file:// URLs. For forks, air-gapped work, or integration tests:
create-awesome-python-app my-app \
-t "file:///path/to/cpa-templates?subdir=templates/fastapi-starter" \
--no-installPinning a revision. Append ?ref=<sha-or-tag> to the URL, or use
--pin <ref> (equivalent to adding ref= to the template URL). With
CPA_STRICT_REPRO=1, ref must be a full 40-character commit SHA.
Catalog override. Point at a fork or fixture:
export CPA_CATALOG_URL="file:///path/to/templates.json"export CPA_NO_CATALOG_CACHE=1 # skip on-disk catalog cacheSee templates-json-schema.md for the full catalog shape.
Track releases for template and extension changes:
When upgrading the CLI:
# ephemeral (recommended)
uvx create-awesome-python-app@latest --help
# Homebrew / AUR / pipx installs
brew upgrade create-awesome-python-app
pipx upgrade create-awesome-python-appUse --strict-version (or CPA_STRICT_VERSION=1) in CI to fail when the
installed CLI is not the latest PyPI release.
Manage the template cache:
create-awesome-python-app cache dir
create-awesome-python-app cache list
create-awesome-python-app cache update [id]
create-awesome-python-app cache cleanThere is no cpa add-extension command yet. To add an extension after the fact:
- Browse the extension in cpa-templates/extensions.
- Read the extension README for required files and dependencies.
- Scaffold a minimal project with that extension and copy the relevant files.
- Install matching dependencies from the extension's
pyproject.toml(or runuv syncin the throwaway project and mirror the dependency blocks).
Use --list-addons -t <template-slug> to see extensions compatible with your
base template.
If you are moving a hand-rolled Cookiecutter/Copier flow into the CPA ecosystem:
- Map your template repo to a
templates.jsonentry (slug, name, category,urlwith?subdir=). - Add
cpa.config.jsonat the template root (see cpa-config-schema.md). - Prefer
uvlockfiles (uv.lock) in generated projects instead of unpinnedrequirements.txtunless the template explicitly targets pip-only workflows. - Convert Jinja-style prompts to
customOptionsincpa.config.jsonwhere possible; use--set key=valuefor non-interactive runs.