> ## Documentation Index
> Fetch the complete documentation index at: https://bakefile.wisl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> bakefile is a Python task runner with two CLIs: bake runs tasks from bakefile.py, bakefile manages the project. It is not a service or platform.
> Tasks are methods on Bakebook classes in bakefile.py, decorated with @command. Subprocesses run through self.ctx.run().
> Examples are backed by tests; copy them verbatim.

# Python task runner, Makefile alternative

> An OOP task runner. Write tasks once, reuse everywhere. Like a Makefile, but reusable and in Python.

<link rel="preconnect" href="https://mintcdn.com" />

<img src="https://mintcdn.com/bakefile/wxh2SUmEC1OnK5Pg/img/brand/og-card-light.png?fit=max&auto=format&n=wxh2SUmEC1OnK5Pg&q=85&s=46cf0d31beee9080c0e4f0c266d40e6b" className="sd-hero sd-hero-light" alt="An OOP task runner. Write tasks once, reuse everywhere." loading="eager" fetchpriority="high" decoding="sync" noZoom width="1200" height="630" data-path="img/brand/og-card-light.png" />

<img src="https://mintcdn.com/bakefile/wxh2SUmEC1OnK5Pg/img/brand/og-card-dark.png?fit=max&auto=format&n=wxh2SUmEC1OnK5Pg&q=85&s=6ee3d3371788572bc978b1267ab57bb8" className="sd-hero sd-hero-dark" alt="An OOP task runner. Write tasks once, reuse everywhere." loading="eager" fetchpriority="high" decoding="sync" noZoom width="1200" height="630" data-path="img/brand/og-card-dark.png" />

<div className="not-prose sd-badges">
  <a href="https://github.com/wislertt/bakefile/actions/workflows/cd.yml">
    <img src="https://img.shields.io/github/actions/workflow/status/wislertt/bakefile/cd.yml?branch=main&label=tests&logo=github" alt="tests" noZoom />
  </a>

  <a href="https://codecov.io/gh/wislertt/bakefile">
    <img src="https://codecov.io/gh/wislertt/bakefile/graph/badge.svg?token=G0ZRDBGAJB" alt="codecov" noZoom />
  </a>

  <a href="https://pypi.python.org/pypi/bakefile">
    <img src="https://img.shields.io/pypi/v/bakefile.svg?color=blue" alt="pypi" noZoom />
  </a>

  <a href="https://github.com/wislertt/bakefile/">
    <img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue?logo=python" alt="python versions" noZoom />
  </a>

  <a href="https://pypi.python.org/pypi/bakefile">
    <img src="https://img.shields.io/pypi/l/bakefile" alt="license" noZoom />
  </a>
</div>

## 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, 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.).

See the full [comparison](/getting-started/why-bakefile) against Make, Just, Task, mise, and Invoke.

<img src="https://mintcdn.com/bakefile/mOwdC7cD0PnrTBxr/img/preview/demo-app/bakefile-preview.gif?s=bf9710b8585e35eca01141b4b2180d1f" alt="Defining tasks in a bakefile.py, listing them with bake, and running bake build" className="sd-preview" noZoom width="960" height="640" data-path="img/preview/demo-app/bakefile-preview.gif" />

## A taste

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from bake import Bakebook, command, console


class MyBakebook(Bakebook):
    @command()
    def hello(self, name: str = "world"):
        console.echo(f"Hello {name}!")


bakebook = MyBakebook()
```

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bake hello --name Alice
# Hello Alice!
```

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/getting-started/installation">
    Install with pip or uv, plus the optional bakelib helpers.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/getting-started/quickstart">
    Create a bakefile.py, define tasks, and run them with bake.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.