magus v0.4.3 is out. See what's new
¶ View markdown source · ✎ Suggest an edit
1 min read

Module

A magus stdlib namespace a magusfile imports for host capabilities: filesystem, exec, vcs, and more.

Elsewhere

A Go module is a versioned set of packages declared by go.mod; a JavaScript module is one file with its imports and exports; a Python module is one .py file. A magus module is a host namespace a Buzz script imports for a capability such as fs, vcs or magus.

Example

import "std";
import "fs";

fun main(args: [str]) > void !> any {
    foreach (p in fs\glob("*.md")) { std\print(p.value); }
}

magus describe module fs lists every method the module has.

Used in

In the docs:

In the code (magus refs <name> lists every site):

  • langservice.Module (Go)
  • std.Module (Go)
  • gopherbuzz.Module (Go)
  • scipbuzz.module (Go)
  • debug.Module (Go)

See also

glossarycore-model
Last updated (2df714e8)
Glossary

Magusfile

The magusfile.buzz that declares a project's targets (as export funs) and binds its spells. Magusfile in full.

Op

A single tool-native command a target composes (long form: operation); the middle of the work hierarchy (Spell to Op to Target). Op in full.

Module

A magus stdlib namespace a magusfile imports for host capabilities: filesystem, exec, vcs, and more. Module in full.

Buzz

The language magusfiles are written in (the .buzz engine). Buzz in full.

Service

A long-running or shared process magus manages across runs, distinct from a one-shot target. Service in full.

CI

An ordinary target you compose yourself with ctx.needs; magus does not hardcode its stages. It is the anchor magus affected ci keys off, and ci strips the rw charm. CI in full.

Knowledge graph

The queryable graph of a workspace's spells, targets, docs, and code relationships; query it with magus query/explain/path. Knowledge graph in full.

Lease

The grant a holder takes on a job: the write and read paths that job declared, enforced in the checkout that took it with magus job exec. A job is the piece of work; a lease is permission over it. Lease in full.

Conventions

Placeholders

Angle brackets mark a value you replace with your own; never type the brackets:

magus run <target>
magus completion <shell>    # e.g. bash, zsh, fish

<target>, <path>, <shell>, <name> and the like are stand-ins, not literal text.