An OOP task runner. Write tasks once, reuse everywhere. Like a Makefile, but reusable and in Python.
Documentation: bakefile.wisl.dev
- 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.
pip install bakefileOr via uv:
uv tool install bakefilefrom bake import Bakebook, command, console
class MyBakebook(Bakebook):
@command()
def build(self) -> None:
console.echo("Building...")
self.ctx.run("cargo build")
bakebook = MyBakebook()bake buildGenerate a bakefile with bakefile init, or start from the simple example. Full walkthrough in the quickstart.
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
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, deptrybake 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.
Contributions are welcome. See CLAUDE.md for development guidelines, including project structure, testing conventions, and the development workflow.
Wisaroot Lertthaweedech – wisl.dev
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.