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:
- Partial apply on conflict — uses
git apply --rejectto apply all applicable hunks; only the unresolvable portions are saved as.rejfiles - New variable detection — prompts for variables added to the template since the project was last updated
Requirements
- Python 3.12+
- uv
- Git
Quick Start
uvx rebake check
uvx rebake update
No installation required. Uses uv.
Installation
To install permanently:
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-date1— outdated2— error (e.g..cruft.jsonnot found)
rebake update
Apply the latest template changes to the project.
rebake update [PROJECT_DIR]
rebake will:
- Abort if there are uncommitted changes (commit or stash first)
- Detect new variables added to the template and prompt for their values
- Generate a diff between the old and new rendered templates
- Apply the diff with
git apply --reject— applicable hunks are written immediately; unresolvable hunks are saved as.rejfiles for manual resolution - Update
.cruft.jsonwith 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rebake-0.0.2.tar.gz.
File metadata
- Download URL: rebake-0.0.2.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72a14d4a1307bf4bc609ec69c228c8855d8e8d3d2eac9bdf726fb82ee5be909f
|
|
| MD5 |
0fd6a745313e0d0c3f076a30db22e932
|
|
| BLAKE2b-256 |
f3cf165f1db666da42751bdba501d2f0133617eeedf374a909ab19d3012863f8
|
Provenance
The following attestation bundles were made for rebake-0.0.2.tar.gz:
Publisher:
release.yml on kitagry/rebake
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rebake-0.0.2.tar.gz -
Subject digest:
72a14d4a1307bf4bc609ec69c228c8855d8e8d3d2eac9bdf726fb82ee5be909f - Sigstore transparency entry: 1013337910
- Sigstore integration time:
-
Permalink:
kitagry/rebake@4721310f711ca6f3294b78f596781949c1ef42cd -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/kitagry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4721310f711ca6f3294b78f596781949c1ef42cd -
Trigger Event:
push
-
Statement type:
File details
Details for the file rebake-0.0.2-py3-none-any.whl.
File metadata
- Download URL: rebake-0.0.2-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33d00ff21e93da18bec5cdad7d3883926a71504bb5521201aba4d3506af7e321
|
|
| MD5 |
2bf2fe8a8fd6b7389bc49f2287806bee
|
|
| BLAKE2b-256 |
50eb994c1f8d60b322a66a9bf82b03e43d538f1529a6732bab8aa54719d3d0dd
|
Provenance
The following attestation bundles were made for rebake-0.0.2-py3-none-any.whl:
Publisher:
release.yml on kitagry/rebake
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rebake-0.0.2-py3-none-any.whl -
Subject digest:
33d00ff21e93da18bec5cdad7d3883926a71504bb5521201aba4d3506af7e321 - Sigstore transparency entry: 1013337950
- Sigstore integration time:
-
Permalink:
kitagry/rebake@4721310f711ca6f3294b78f596781949c1ef42cd -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/kitagry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4721310f711ca6f3294b78f596781949c1ef42cd -
Trigger Event:
push
-
Statement type: