https://github.com/callowayproject/cookie-composer
Create Cookiecutter projects from multiple templates
https://github.com/callowayproject/cookie-composer
cookiecutter cookiecutter-template jinja2 python template template-engine templates templating
Last synced: 3 months ago
JSON representation
Create Cookiecutter projects from multiple templates
- Host: GitHub
- URL: https://github.com/callowayproject/cookie-composer
- Owner: callowayproject
- License: bsd-3-clause
- Created: 2022-02-28T20:07:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2026-02-23T20:00:21.000Z (4 months ago)
- Last Synced: 2026-02-24T02:43:14.504Z (4 months ago)
- Topics: cookiecutter, cookiecutter-template, jinja2, python, template, template-engine, templates, templating
- Language: Python
- Homepage: https://callowayproject.github.io/cookie-composer/
- Size: 3.87 MB
- Stars: 20
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Cookie Composer
[][pypi_]
[][status]
[][python version]
[][license]
[](https://codecov.io/gh/callowayproject/cookie-composer)
[pypi_]: https://pypi.org/project/cookie-composer/
[status]: https://pypi.org/project/cookie-composer/
[python version]: https://pypi.org/project/cookie-composer
[license]: https://github.com/callowayproject/cookie-composer/blob/master/LICENSE
Documentation: https://callowayproject.github.io/cookie-composer/
Cookie composer builds on the [cookie cutter](https://github.com/cookiecutter/cookiecutter) project to generate projects based on one or more cookiecutter templates.
## Goals
- Create new projects from a composition of several templates
- Add new capabilities to an existing repository by applying a template
- Apply template updates to the generated project
## Introduction
Cookie Cutter treats templates like sandwiches. There are templates for hamburgers, clubs, and any other kind of sandwich you can dream up. You might have options and defaults on a template, like `Hold the mustard?[False]:` or `Mustard type [dijon]:`, but those are decided by the template author.

If you look closely at the sandwiches (templates), there is usually many things in common. What if we treated the templates as compositions of other templates:

You now can manage several smaller and specialized templates that provide functionality. Each template's options will be specific to what that template needs.

Cookie Composer uses a composition file to describe the layers required, and even override a template's default answers.
```yaml
template: bottom-bun
context:
toasting_level: light
buttered: False
---
template: burger
---
template: cheese
context:
kind: swiss
---
template: bacon
context:
cooking_level: crispy
---
template: ketchup
---
template: mustard
context:
type: yellow
---
template: top-bun
context:
toasting_level: light
buttered: False
```
We have created [a repo of highly composable templates](https://github.com/coordt/cookiecomposer-templates) as examples or reference. However, Cookie Composer is designed to handle any Cookie Cutter template.
## Purpose
- Separate out parts to a repo into composable templates
- Boilerplate
- README, CONTRIBUTING, docs, Makefile, license, tooling configurations
- Project-specific
- Django
- Flask
- Library
- Data science
- CI/CD specific
- Helm chart
- GitHub Actions vs. Jenkins vs. ...
- Documentation specific
- Sphinx
- MkDocs
- Each composable template is managed and updated individually
- A project can update itself based on chages in layers
## Please contribute
- Documentation critiques
- Documentation suggestions
- Feature suggestions
- Feature improvements
- Edge case identification
- Code improvements