bakefile
An OOP task runner. Write tasks once, reuse everywhere. Like a Makefile, but reusable and in Python.
Documentation: bakefile.wisl.dev
Why bakefile?
- Reusable - Makefile and Justfile work well, but reusing tasks across projects is hard. bakefile makes tasks Python class methods, so you inherit and share them like any other code.
- Python - Write Python instead of a DSL. Real language features, type checking with ruff and ty, and the rest of Python's tooling.
ctx.run()still handles normal CLI commands through subprocess. - Language-agnostic - Tasks are Python, but the commands they run can target any language (Go, Rust, JS, etc.).
Tasks are class methods you inherit, override, and compose, so reusable task libraries (bakelib Spaces) just work. bakefile is new, built on modern typed Python (Typer + Pydantic). Production-proven: I run it daily at my company.
See how bakefile compares to Make, Just, Task, mise, and Invoke in Why bakefile.
Installation
pip install bakefile
Or via uv:
uv tool install bakefile
Quick Start
from bake import Bakebook, command, console
class MyBakebook(Bakebook):
@command()
def build(self) -> None:
console.echo("Building...")
self.ctx.run("cargo build")
bakebook = MyBakebook()
bake build
Generate a bakefile with bakefile init, or start from the simple example. Full walkthrough in the quickstart.
Documentation
Full documentation lives at bakefile.wisl.dev:
- Why bakefile - comparison with Make, Just, Task, mise, and Invoke
- Concepts - Bakebook, commands, context, PEP 723
- Usage - logging, settings
- CLI reference -
bakeandbakefile - bakelib - Spaces, environments, cache, secrets
- Examples and troubleshooting
Development
git clone https://github.com/wislertt/bakefile.git
cd bakefile
uv tool install bakefile
bake setup-dev # Setup development environment (macOS only)
bake assert-setup-dev # Verify the setup is correct
bake test # Unit tests (fast)
bake test-integration # Integration tests (slow, real subprocess)
bake lint # prettier, toml-sort, ruff format, ruff check, ty, deptry
bake setup-dev only supports macOS. On other platforms, run bake --dry-run setup-dev to see the commands and follow platform-specific alternatives.
The project uses uv for dependency management.
Contributing
Contributions are welcome. See CLAUDE.md for development guidelines, including project structure, testing conventions, and the development workflow.
Author
Wisaroot Lertthaweedech – wisl.dev
License
Licensed under the Apache License 2.0. See LICENSE for the full text.
The wordmark in docs/img/brand/ uses outlined paths from Shantell Sans, licensed under the SIL Open Font License 1.1.
Metadata
Release files for bakefile 0.0.76
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bakefile-0.0.76.tar.gz | 79.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bakefile-0.0.76-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 191.3 kB
Release files / bakefile-0.0.76.tar.gz
| Download URL | bakefile-0.0.76.tar.gz |
|---|---|
| Size | 79.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2b8aafe7941e6cddc4812921db72fd109069fdaee32d4c7d68454a68330d320
|
|
BLAKE2b-256 checksum How to use checksums |
4de52695f31aa86d4e14fd9d6dea85462d63c833956cac0129dbf0e0fa57fc3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / bakefile-0.0.76-py3-none-any.whl
| Download URL | bakefile-0.0.76-py3-none-any.whl |
|---|---|
| Size | 112.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
996bec096dd44c073d73fab8809926d8a408fc969aebcbf847a0a0808a23f833
|
|
BLAKE2b-256 checksum How to use checksums |
f4379b67f23f7e4e97eabb8f8f563816527a947a987f6d703f1caacb177f6d25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|