Answers and replay#
Cookieplone provides two separate mechanisms for reusing previous answers: the answers file and the Cookiecutter replay system. They look similar but serve different purposes and are not interchangeable.
The answers file#
Every successful generation writes a file named .cookieplone.json into the generated project directory.
This file records the answers the user provided, plus metadata about which template was used.
Format#
{
"__template__": "project",
"project_title": "My Plone Site",
"author_name": "Érico Andrei",
"author_email": "ericof@plone.org",
"hostname": "mysite.example.com",
"plone_version": "6.1.2"
}
The __template__ key records the template name.
All other keys are the field names from the template schema with their resolved values.
Computed fields are not stored—they are re-derived on each run.
Using the answers file#
Pass the file back to Cookieplone with --answers-file (or --answers):
cookieplone --answers myproject/.cookieplone.json
Cookieplone reads the answers as defaults.
If __template__ is present, it selects the template automatically.
The wizard still runs, allowing you to change any value before regenerating.
Combine with --no-input to regenerate without any prompts:
cookieplone --no-input --answers myproject/.cookieplone.json
When to use the answers file#
Re-running Cookieplone to apply template updates to an existing project (use with
-for-s).Pre-filling answers for CI/CD pipelines.
Sharing a repeatable configuration with a team.
Recovering from a mistake by editing the file and re-running.
Key differences#
Aspect |
Answers file ( |
Cookiecutter replay |
|---|---|---|
Stores computed fields? |
No (re-derived each run) |
Yes (captures full rendered context) |
Runs the wizard? |
Yes (with pre-filled defaults) |
No (skips wizard entirely) |
Editable for re-runs? |
Yes—designed to be edited |
Not intended for editing |
Used in CI? |
Yes—combine with |
Possible but unusual |
Stored where? |
Inside the generated project |
In |
CLI flag |
|
|