# Cookiecutter

> Cross-platform CLI that generates projects from templates, using cookiecutter.json prompts and pre/post-generate hooks. Works with local or GitHub templates.

Stars: 25.2k · Language: Python · License: BSD-3-Clause · Categories: Dev Tools

- Repository: https://github.com/cookiecutter/cookiecutter
- Website: https://pypi.org/project/cookiecutter/
- Page: https://www.trmn.sh/tools/cookiecutter

## Install

- uv: `uv tool install cookiecutter`

## Overview

Cookiecutter is a command-line project generator. It takes a template (a directory containing variables) and prompts the user for values, then writes a new project into the current working directory based on those answers. Templates can be local directories or remote repositories, and GitHub repos can be referenced with a `gh:` prefix, for example `uvx cookiecutter gh:audreyfeldroy/cookiecutter-pypackage`.

Template authors define the interface in a single `cookiecutter.json` file, which declares every variable and its default. Templates can be written in any language or markup format, so they work for Python packages, Rust, Terraform, docs sites, and similar boilerplate. Pre-prompt, pre-generate and post-generate hooks, written as shell or Python scripts, handle extra setup such as `git init` or dependency installation.

Cookiecutter runs on Windows, macOS and Linux, and supports Python 3.10 to 3.14. Users do not need to know Python to use a template. It can also be called from Python code via `from cookiecutter.main import cookiecutter`, passing either a local path or a repo reference. It suits developers and teams who repeatedly scaffold similar projects, and template maintainers who publish reusable starters such as cookiecutter-pypackage, cookiecutter-django and cookiecutter-pytest-plugin.

### Installation

```bash
# via uv
uv tool install cookiecutter
```

## Alternatives

- [AWS CLI](https://www.trmn.sh/tools/aws-cli.md): Official command line interface for Amazon Web Services, with profile-based credentials, configurable output, and shell tab completion. (Python, 17.4k stars)
- [GDB dashboard](https://www.trmn.sh/tools/gdb-dashboard.md): A standalone .gdbinit written in Python that shows a modular dashboard of program state in GDB each time the debugged program stops. (Python, 12.3k stars)
- [Hatch](https://www.trmn.sh/tools/hatch.md): Python project manager covering builds, environments, Python distributions, testing, static analysis, version management, and publishing to PyPI. (Python, 7.3k stars)
- [isort](https://www.trmn.sh/tools/isort.md): Python command line utility and library that sorts imports alphabetically and groups them into sections by type. (Python, 7.0k stars)
- [Grip](https://www.trmn.sh/tools/grip.md): Python command-line server that renders local Markdown readme files through the GitHub Markdown API, with live refresh and HTML export. (Python, 6.8k stars)

---

Canonical: https://www.trmn.sh/tools/cookiecutter
