Scroll to navigation

MAGE(1) User Commands MAGE(1)

NAME

mage - make/rake-like build tool using Go

DESCRIPTION

mage [options] [target]

Mage is a make-like command runner. See https://magefile.org for full docs.

Commands:

clean out old generated binaries from CACHE_DIR

-compile <string>

output a static binary to the given path
show this help
create a starting template if no mage files exist
list mage targets in this directory
show version info for the mage binary

OPTIONS

-d <string>

directory to read magefiles from (default "." or "magefiles" if exists)
turn on debug messages
force recreation of compiled magefile
sets the GOARCH for the binary created by -compile (default: current arch)
use the given go binary to compile the output (default: "go")
sets the GOOS for the binary created by -compile (default: current OS)
sets the ldflags for the binary created by -compile (default: "")
show description of a target
keep intermediate mage files around after running

-t <string>

timeout in duration parsable format (e.g. 5m30s)
show verbose output when running mage targets

-w <string>

working directory where magefiles will run (default -d value)

SEE ALSO

make(1)

February 2025 mage 1.15.0+ds-2