Welcome to Cookieplone, a powerful wrapper around Cookiecutter designed to streamline the development of Plone codebases. Whether you're building a backend add-on, a new Volto add-on, a full project with both backend and frontend, Cookieplone simplifies the process using robust Cookiecutter templates.
Cookieplone offers the following key features for each audience.
- One stop for all Plone templates: Cookieplone helps you find the correct template to start your new Plone project.
- Simplified usage: Cookieplone provides an enhanced experience over standard Cookiecutter usage by offering predefined sane defaults and a unified approach to generating various Plone projects.
- Batteries included: No need to install lots of dependencies. Run
pipx run cookieplone
, and you will quickly generate your codebase.
- Built-in validators: Includes built-in validators to ensure user inputs are correct.
- Jinja2 filters: Includes Jinja2 filters for advanced template control.
- Subtemplates: Mechanism to easily instantiate subtemplates within cookiecutter hooks -- i.e. post_gen_hook -- , facilitating greater code reuse.
First, ensure you have UV
installed on your system.
See how to install these and check Plone's prerequisites.
Set up your system with Plone's prerequisites.
Use uvx
(command installed by uv
) to run cookieplone
and see all available template options:
uvx cookieplone
It is also possible to run a specific version of Cookieplone:
Cookieplone will walk you through the necessary steps, using sensible defaults and offering customization options where needed.
Cookieplone will ask a lot of questions. You can use some of its options to avoid repeatedly entering the same values.
You can use the --no-input
option to make Cookieplone not prompt for parameters and only use cookiecutter.json
file content.
You can use the options --replay
and --replay-file
to not prompt for parameters and only use information entered previously or from a specified file.
See Replay Project Generation in the cookiecutter documentation for more information.
You can also specify other templates.
Template | Description | Command |
---|---|---|
backend_addon | Create a Plone add-on to be used with the backend. | pipx run cookieplone backend_addon |
frontend_addon | Create a Plone add-on to be used with the frontend. | pipx run cookieplone frontend_addon |
The updated list of templates can be found at the cookieplone-templates repository.
Environment Variable | Description | Example |
---|---|---|
COOKIEPLONE_REPOSITORY | Where to look for templates to be used. | COOKIEPLONE_REPOSITORY=/home/plone/cookieplone-templates/ pipx run cookieplone |
COOKIEPLONE_REPOSITORY_TAG | Which tag/branch to use from a remote repository. | COOKIEPLONE_REPOSITORY_TAG=experimental pipx run cookieplone |
COOKIEPLONE_REPO_PASSWORD | Password to use when using a remote repository that is password protected. | COOKIEPLONE_REPO_PASSWORD=very-secure pipx run cookieplone |
We welcome contributions to Cookieplone.
You can create an issue in the issue tracker, or contact a maintainer.
Install UV
, and create a local virtual environment with the following command.
make install
uv run cookieplone
make check
pytest
is this package's test runner.
Run all tests with the following command.
make test
Run all tests, but stop on the first error and open a pdb
session with the following command.
uv run pytest -x --pdb
Run only tests that match test_run_sanity_checks_fail
with the following command.
uv run pytest -k test_run_sanity_checks_fail
Run only tests that match test_run_sanity_checks_fail
, but stop on the first error and open a pdb
session with the following command.
uv run pytest -k test_run_sanity_checks_fail -x --pdb
For support, questions, or more detailed documentation, visit the official Cookieplone repository.
Thank you for choosing Cookieplone for your Plone development needs!
The project is released under the MIT License.