Skip to main content

A spiritual successor to cruft for managing cookiecutter projects

Project description

rebake

A spiritual successor to cruft for managing cookiecutter projects.

rebake improves on cruft in two key areas:

  1. Better conflict UX — uses git apply -3 to produce inline conflict markers instead of .rej files
  2. New variable detection — prompts for variables added to the template since the project was last updated

Requirements

  • Python 3.12+
  • uv
  • Git

Installation

uv tool install rebake

Or add it to a project:

uv add rebake

Usage

rebake check

Check whether the project is up-to-date with its template.

rebake check [PROJECT_DIR]

Exit codes:

  • 0 — up-to-date
  • 1 — outdated
  • 2 — error (e.g. .cruft.json not found)

rebake update

Apply the latest template changes to the project.

rebake update [PROJECT_DIR]

rebake will:

  1. Abort if there are uncommitted changes (commit or stash first)
  2. Detect new variables added to the template and prompt for their values
  3. Generate a diff between the old and new rendered templates
  4. Apply the diff with git apply -3 — conflicts appear as inline markers
  5. Update .cruft.json with the new commit hash and any newly added variables

Migrating from cruft

rebake reads .cruft.json as-is. No migration needed — just replace cruft with rebake in your commands.

# before
cruft check
cruft update

# after
rebake check
rebake update

.cruft.json format

{
  "template": "https://github.com/owner/template",
  "commit": "abc123...",
  "checkout": "main",
  "context": {
    "cookiecutter": {
      "project_name": "my-project",
      "author": "Jane Doe"
    }
  },
  "skip": ["go.sum", "*.lock"]
}

Development

git clone https://github.com/kitagry/rebake
cd rebake
uv sync
uv run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rebake-0.0.1.tar.gz (34.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rebake-0.0.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file rebake-0.0.1.tar.gz.

File metadata

  • Download URL: rebake-0.0.1.tar.gz
  • Upload date:
  • Size: 34.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rebake-0.0.1.tar.gz
Algorithm Hash digest
SHA256 61cf56427fcc82ba5ef521b4d6958c0d41cc5cc5d69ded2b6a9d8b1d40fbaad4
MD5 c5a157f035aaa6738b62744579d696bb
BLAKE2b-256 6c4aac2a30d53cf24b310396b782e887f81eb049a8b36143779fa537cd4740fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for rebake-0.0.1.tar.gz:

Publisher: release.yml on kitagry/rebake

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rebake-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rebake-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rebake-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bb3132d77410b6168f3827cbdcbe0e4500719c2188932bb4cd1f39d6fd86f82
MD5 0319fe9e2dd7ca43b1b90494403bb9eb
BLAKE2b-256 a36539506bfc7e68fe0a4b9e875e592ef70f011f902d13df1e53bb520bc58ed4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rebake-0.0.1-py3-none-any.whl:

Publisher: release.yml on kitagry/rebake

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page