skillfed

cruft

Allows you to maintain all the necessary cruft for packaging and building projects separate from the code you intentionally write. Built on-top of CookieCutter.

cruft v2.16.0 245.8K downloads/30d#8,723 on PyPI
Permissive license MIT DORMANT released

What it is and what it does

cruft is a project scaffolding and maintenance tool built on top of Cookiecutter. It automates the creation of new projects from templates and, uniquely, helps you keep those projects in sync with template changes over time. Most template tools leave you with copy-pasted boilerplate to manage manually; cruft tracks the template source and can apply updates automatically, letting you benefit from improvements to shared templates across many projects.

The package works by storing template metadata in a `.cruft.json` file that records the template source, commit hash, and variables used. You can then run `cruft update` to pull in new template changes, `cruft check` to verify a project is up-to-date (useful in CI), and `cruft diff` to see what has diverged. You can also skip specific files from updates and update template variables without regenerating the entire project.

Use it for:

  • Maintain consistent boilerplate across multiple projects by updating a shared template once and rolling out changes.
  • Add template synchronization checks to CI pipelines using `cruft check` to catch projects that have drifted.
  • Link an existing Cookiecutter-generated project to its template source using `cruft link` to start tracking updates.
  • Update template variables in an existing project without regenerating it from scratch.
  • Automate template update detection and pull request creation across repositories using GitHub Actions.
  • Compute diffs between local project boilerplate and the upstream template to identify customizations.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

cruft creates new projects from Cookiecutter templates and keeps them synchronized with template updates over time, automating boilerplate management throughout a project's lifecycle.

Yes, if you manage multiple projects from shared templates and want to keep boilerplate synchronized. The low install friction and permissive license make it practical. However, the dormant maintenance status (597 days since last release) means you should verify compatibility with your current Cookiecutter and Python versions before adopting it for new projects.

Install

cruft on PyPI

pip

pip install cruft

uv

uv add cruft

poetry

poetry add cruft

Installing cruft

Before you install

Low install friction with six runtime dependencies (click, cookiecutter, gitpython, importlib-metadata, toml, typer). Maintenance is dormant—last release was 597 days ago—so expect no active bug fixes or feature development, though the package remains functional for its core use case.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute cruft freely as long as you include the original license notice.

Quickstart

pip install cruft
cruft create https://github.com/example/cookiecutter-template
# Later, to sync with template updates:
cruft update

Requires Python >=3.7; git must be available on your system for template repository operations.

Verify before relying

  • Whether dormant status affects template compatibility with modern Cookiecutter versions or recent Python releases.
  • Real-world experience with complex template variable updates and conflict resolution during cruft update operations.
  • Performance and reliability when managing large numbers of projects or deeply nested template structures.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 6 — click, cookiecutter, gitpython, importlib-metadata, toml, typer
Maintenance dormant — 597 days since the last release
First released
Downloads 245,830/month — #8,723 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cruft-2.16.0-py3-none-any.whl

Tags

project template scaffoldingcookiecutter template managementboilerplate synchronizationtemplate update automationproject initialization from templatesmaintain template-generated codetemplate drift detection
project-scaffoldingtemplate-managementcookiecutter

More Build Tools packages