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

# bakefile

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

<img src="https://mintcdn.com/wisl/FkcdlzAR4sgoRvLE/img/brand/og-card-light.png?fit=max&auto=format&n=FkcdlzAR4sgoRvLE&q=85&s=a1051ad67e88fbde19c66e09b0e12f4d" className="sd-hero sd-hero-light" alt="An OOP task runner. Write tasks once, reuse everywhere." width="1200" height="630" data-path="img/brand/og-card-light.png" />

<img src="https://mintcdn.com/wisl/FkcdlzAR4sgoRvLE/img/brand/og-card-dark.png?fit=max&auto=format&n=FkcdlzAR4sgoRvLE&q=85&s=1f38822b911c942600685e7cae569298" className="sd-hero sd-hero-dark" alt="An OOP task runner. Write tasks once, reuse everywhere." 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" />
  </a>

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

  <a href="https://pypi.python.org/pypi/bakefile">
    <img src="https://img.shields.io/pypi/v/bakefile.svg?color=blue" alt="pypi" />
  </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" />
  </a>

  <a href="https://pypi.python.org/pypi/bakefile">
    <img src="https://img.shields.io/pypi/l/bakefile" alt="license" />
  </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.

## A taste

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

bakebook = Bakebook()


@bakebook.command()
def hello(name: str = "world"):
    console.echo(f"Hello {name}!")
```

```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>
