Hi everyone ![]()
A quick heads-up: Cookieplone 2.0.0a1 and 2.0.0a2 are out on PyPI as prereleases, and I'd love to get some early feedback before we cut the final 2.0.0.
If you want the full story behind this release โ why we're doing it, what changed in my thinking over the last two years, and where it's going โ I wrote it up here: Cookieplone, two years in: lessons learned and the road to 2.0
I also walked through 2.0 live on the latest kitconcept Office Hours: https://www.youtube.com/live/XvkYodVe2hA
What's new
A new form wizard
The biggest visible change: the prompts are no longer plain readline questions. Cookieplone now uses tui-forms as its default renderer, which gives you a confirmation page at the end, back-navigation between fields, proper validation error messages, and JSON Schema constraint support. You can still force the old non-interactive behaviour with --no-input, and the renderer is pluggable via config.renderer or the COOKIEPLONE_RENDERER env var.
cookieplone-config.json โ a new repository config format
Template repositories can now ship a cookieplone-config.json file with:
- JSON Schema validation for each template's inputs
- Grouped templates โ users first pick a category, then a template within it
- Global version pinning, so all templates in a repo can share a single source of truth via
{{ versions.<key> }}(with per-template overrides) config.min_version, so a repo can refuse to run against an outdated Cookieplone and show a branded sanity screen instead of a cryptic error
The old cookiecutter.json fallback still works, and there's a new cutter2plone CLI to help you convert existing templates.
Better ergonomics for template authors
run_subtemplates()โ a cleaner way to drive subtemplate generation from post-generation hooks, with an explicit{template_id: handler}dispatchrun_post_gen_actions()+ built-in handlers (initialize_git_repository,create_namespace_packages,remove_files_by_key,move_files,run_make_format) so you stop copy-pasting the same post-gen code across templates- User answers are now dumped to
.cookieplone.jsoninside the generated project, so you can replay or inspect what was used --answers/--answers-fileto load answers from JSON- Author and email now default to your git config
- New validators for
plone_version,volto_version,python_package_name,hostname,language_code
Under the hood
- Formatters (
black,isort,zpretty,ruff) are now invoked viauvxinstead of being runtime dependencies โ lighter install, no version conflicts with your project generate()API consolidated into aGenerateConfigdataclass- New documentation site deployed to GitHub Pages, with a full guide on writing templates
- Much better test coverage across config loaders, wizard, and generator
2.0.0a2 specifically
a2 is mostly polish on top of a1:
- Fixed
{{ versions.X }}not propagating into subtemplates (#178) min_versioncheck now runs before the welcome screen, with a proper sanity screen- New post-gen helpers mentioned above
- Wizard tests no longer leak
COOKIEPLONE_RENDERERfrom your shell
Full changelog: cookieplone/CHANGES.md at main ยท plone/cookieplone ยท GitHub
How to try it
Since it's a prerelease, you need to opt in:
uvx cookieplone@2.0.0a2
What I'd love from you
- Try it against your own templates and tell me what breaks
- Especially: feedback on the new wizard UX and the
cookieplone-config.jsonformat, since those are the two things I most want to stabilize before 2.0.0 final - Issues and PRs welcome: GitHub - plone/cookieplone: Create Plone projects, addons, documentation with ease! ยท GitHub
Thanks! ![]()