Skip to main content

Plone Logo

Cookieplone 🍪

PyPI PyPI - Python Version PyPI - Wheel PyPI - License PyPI - Status

Tests

GitHub contributors GitHub Repo stars

Documentation

Welcome to Cookieplone, your starting point for every Plone project. Whether you're building an add-on, starting a new project, or even creating your own Plone Distribution, Cookieplone simplifies the process by using templates maintained by the Plone Community in cookieplone-templates.

Read the full documentation at plone.github.io/cookieplone.

Key features 🌟

Cookieplone offers the following key features for each audience.

For users

  • One stop for all Plone templates: Cookieplone lists the official templates by category, and helps you pick the one for your new Plone project.
  • Simplified usage: Cookieplone asks only the questions a template needs, with sensible defaults, checks your answers, and shows them for review before it generates anything.
  • No installation needed: Run uvx cookieplone, and you will quickly generate your codebase.

For template creators

  • Template repositories: Group templates in a repository with a cookieplone-config.json, hide internal templates, and extend another repository, such as cookieplone-templates, instead of forking it.
  • Built-in validators: Includes built-in validators to ensure user inputs are correct.
  • Jinja2 filters: Includes Jinja2 filters for advanced template control.
  • Sub-templates and hook helpers: Generate sub-templates and run common post-generation actions from your template's hooks, facilitating greater code reuse.
  • pytest plugins: Test your templates with fixtures that Cookieplone provides.

See Create a template to get started.

Installation 💾

Cookieplone needs Python 3.10 or later, uv, and git. Each template checks for the other tools it needs, such as Node.js or Docker, before it asks its first question.

See Install Cookieplone for the requirements of each template, and Plone's Prerequisites for installation for your operating system.

Usage 🛠️

Use uvx (command installed by uv) to run cookieplone and choose a template from its menu:

uvx cookieplone

It is also possible to run a specific version of Cookieplone:

uvx cookieplone@2.0.0

Cookieplone will walk you through the necessary steps, using sensible defaults and offering customization options where needed. The tutorial Create your first Plone project walks through a complete run.

Try a prerelease version

Plain uvx cookieplone (and uvx cookieplone@latest) always picks the latest stable release — prerelease versions (aN, bN, rcN, .devN) are excluded by default, following PEP 440 and the uv resolver defaults.

To opt in to a prerelease — for example, 2.1.0a1 — pin the exact version:

uvx cookieplone@2.1.0a1

Or allow the resolver to consider any prerelease:

uvx --prerelease=allow cookieplone

If you previously installed Cookieplone with uv tool install, reinstall the tool explicitly so the cached stable install is replaced:

uv tool install --reinstall --prerelease=allow cookieplone

You can confirm which version is active with:

uvx cookieplone --version

See Use a prerelease version of Cookieplone for details.

Specify a template

Pass a template ID to skip the menu:

uvx cookieplone project

These are the templates of cookieplone-templates:

Template Description
project Plone 6 Project
aurora_cmfplone Plone Aurora (alpha) with Plone backend
volto_nick Plone Volto using Nick as backend
aurora_nick Plone Aurora (alpha) using Nick as backend
aurora_nick_embedded Plone Aurora (alpha) using Nick as an embedded library (experimental)
monorepo_addon Plone 6 Add-on (Frontend and Backend)
backend_addon Plone 6 Backend Add-on (Python)
frontend_addon Plone 6 Frontend Add-on
aurora_addon Plone Aurora Frontend Add-on
documentation_starter Documentation scaffold for Plone projects

Each template's page lists its requirements, questions, and generated files. uvx cookieplone --all also shows the hidden templates.

Use options to avoid prompts

Cookieplone will ask a lot of questions. You can use some of its options to avoid repeatedly entering the same values.

key=value

Pass answers after the template ID, such as uvx cookieplone project title="My Site". In an interactive run, they pre-fill the questions. See Set answers with extra context.

--answers-file

Point --answers-file (or --answers) to a JSON file with the answers you want to use to pre-populate default values.

--no-input

Use --no-input to make Cookieplone not prompt for questions and use the default values, the answers file, and key=value pairs instead. Cookieplone still validates each value.

--replay and --replay-file

Use --replay to generate a project again with the answers of your previous run of the same template, or --replay-file to read them from a file. See Answers and replay.

All options are listed in the CLI reference.

Configure Cookieplone

Environment Variable Description Example
COOKIEPLONE_REPOSITORY The template repository to use: a local path, a git URL, a zip archive, or an abbreviation such as gh:. COOKIEPLONE_REPOSITORY=/home/plone/cookieplone-templates/ uvx cookieplone
COOKIEPLONE_REPOSITORY_TAG Which tag or branch to use from a git repository. COOKIEPLONE_REPOSITORY_TAG=next uvx cookieplone
COOKIEPLONE_REPO_PASSWORD Password of a password-protected zip archive used as the template repository. COOKIEPLONE_REPO_PASSWORD=very-secure uvx cookieplone
COOKIEPLONE_RENDERER The renderer for the questions: cookiecutter, rich, or stdlib. COOKIEPLONE_RENDERER=rich uvx cookieplone

See the environment variables reference for all variables. If something goes wrong, check Troubleshooting.

Contribute 🤝

We welcome contributions to Cookieplone.

You can create an issue in the issue tracker, or contact a maintainer. Report issues with a template, or propose a new one, in the cookieplone-templates repository.

Branches

Branch Target version Status
main 2.x Active development
1.x 1.x (patch and minor) Maintenance only

All new feature development targets the main branch. The 1.x branch is in maintenance mode and only receives bug fixes and minor improvements released as 1.x versions.

Development requirements

See Installation, and Set up a development environment for the full guide.

Setup

Create a local Python virtual environment and install the pre-commit hooks with the following command.

make install

Run the checked out branch of Cookieplone

uv run cookieplone

Check and format the codebase

make lint

make format runs the same checks and fixes what it can.

Run tests

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

Work on the documentation

Build the documentation, and run its checks, with the following commands.

make docs-html
make docs-test

Support 📢

For support and questions, read the documentation, search the issue tracker, or ask in the Plone Community Forum.

Thank you for choosing Cookieplone for your Plone development needs!

This project is supported by

Plone Foundation Logo

License

The project is released under the MIT License.

Metadata

Release files for cookieplone 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cookieplone 2.0.0
File Size Uploaded
cookieplone-2.0.0.tar.gz 162.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cookieplone 2.0.0
File Interpreter ABI Platform
cookieplone-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 259.6 kB

Release files / cookieplone-2.0.0.tar.gz

Download URL cookieplone-2.0.0.tar.gz
Size 162.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a9a2567801fbd5ed7c47883b72ddb7b2965c86bc242670ac1182151fe2141fa2
BLAKE2b-256 checksum
How to use checksums
55289d4472867343cd0e8d2a6f71ccaa4e095aa1bd48df263f1a5f95baf68091
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / cookieplone-2.0.0-py3-none-any.whl

Download URL cookieplone-2.0.0-py3-none-any.whl
Size 96.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7dee334e3e50198e70af4d8b40e5c41d60c9cf32c73b82c17b38846a60775bb3
BLAKE2b-256 checksum
How to use checksums
33d4d5512d7ea3c96cb4f0237c059cc3ef8c18643116330d2e36e37bd6ecf421
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

2.0.2

2 release files

This release

2.0.0 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.9.10

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page