---
title: Magusfile
order: 3
description: "The magusfile.buzz that declares a project's targets (as export funs) and binds its spells."
tags: [glossary, core-model]
---

# Magusfile

The `magusfile.buzz` that declares a project's targets (as `export fun`s) and
binds its spells.

## Example

A target is an exported function that takes the run's context.

```buzz
import "magus";

export fun build(ctx: magus\Context, args: [str]) > void !> any {
    ctx.needs(generate);
}
```

## Used in

<!-- BEGIN GLOSSARY USAGE (generated by glossary-usage-generate from the knowledge graph; edit the generator, not this list) -->

In the docs:

- [The magusfile](../concepts/workspace.md#the-magusfile)
- [magus\pry(): breakpoint in a magusfile](../guides/debugging.md#maguspry-breakpoint-in-a-magusfile)
- [3. Read your first magusfile](../guides/getting-started.md#3-read-your-first-magusfile)
- [Magusfile API: a locked namespace](../guides/migrating/breaking-changes.md#magusfile-api-a-locked-namespace)
- [Magusfile Module Reference](../reference/buzz/index.md#magusfile-module-reference)
- [MGS1017: magusfile is not a spell](../reference/codes/magusfile/MGS1017.md#mgs1017-magusfile-is-not-a-spell)

<!-- END GLOSSARY USAGE -->

## See also

- [Targets](../concepts/targets.md)
- [Target](target.md)
