OS Manuals

/usr/bin/mage

a Make/rake-like dev tool using Go

From mage 1.17.2-r11 (os), captured 2026-11-05 by running mage --help (exit 0). permalink

mage [options] [target]

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

Commands:
  -autocomplete
            print target names for shell completion, without compiling
  -clean    clean out old generated binaries from CACHE_DIR
  -compile <string>
            output a static binary to the given path
  -h        show this help
  -init     create a starting template if no mage files exist
  -install <string>
            install shell tab completion (bash, zsh, fish, powershell/pwsh)
  -l        list mage targets in this directory
  -version  show version info for the mage binary

Options:
  -d <string>
              directory to read magefiles from (default "." or "magefiles" if exists)
  -debug      turn on debug messages
  -f          force recreation of compiled magefile
  -goarch     sets the GOARCH for the binary created by -compile (default: current arch)
  -gocmd <string>
		      use the given go binary to compile the output (default: "go")
  -goos       sets the GOOS for the binary created by -compile (default: current OS)
  -ldflags    sets the ldflags for the binary created by -compile (default: "")
  -multiline  retain line returns in help docs (default: convert to spaces)
  -h          show description of a target
  -keep       keep intermediate mage files around after running
  -t <string>
              timeout in duration parsable format (e.g. 5m30s)
  -v          show verbose output when running mage targets
  -w <string>
              working directory where magefiles will run (default -d value)
Options (20)
OptionDescriptionSource
-autocompleteprint target names for shell completion, without compilinghelp
-cleanclean out old generated binaries from CACHE_DIRhelp
-compile stringoutput a static binary to the given pathhelp
-hshow this helphelp
-initcreate a starting template if no mage files existhelp
-install stringinstall shell tab completion (bash, zsh, fish, powershell/pwsh)help
-llist mage targets in this directoryhelp
-versionshow version info for the mage binaryhelp
-d stringdirectory to read magefiles from (default "." or "magefiles" if exists)help
-debugturn on debug messageshelp
-fforce recreation of compiled magefilehelp
-goarchsets the GOARCH for the binary created by -compile (default: current arch)help
-gocmd stringuse the given go binary to compile the output (default: "go")help
-goossets the GOOS for the binary created by -compile (default: current OS)help
-ldflagssets the ldflags for the binary created by -compile (default: "")help
-multilineretain line returns in help docs (default: convert to spaces)help
-keepkeep intermediate mage files around after runninghelp
-t stringtimeout in duration parsable format (e.g. 5m30s)help
-vshow verbose output when running mage targetshelp
-w stringworking directory where magefiles will run (default -d value)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.