mojo
The Mojoπ₯ command line interface.
Synopsisβ
mojo <command>
mojo [run-options] <path>
mojo [options]
mojoDescriptionβ
The mojo CLI provides all the tools you need for Mojo development, such as commands to run, compile, and package Mojo code. A list of all commands are listed below, and you can learn more about each one by adding the --help option to the command (for example, mojo package --help).
However, you may omit the run and repl commands. That is, you can run a Mojo file by simply passing the filename to mojo:
mojo hello.mojoAnd you can start a REPL session by running mojo with no commands.
You can check your current version with mojo --version. For version information, see the Mojo changelog.
Commandsβ
run β Builds and executes a Mojo file.
build β Builds an executable from a Mojo file.
repl β Launches the Mojo REPL.
debug β Launches the Mojo debugger using the command-line interface or an external editor.
package β Compiles a Mojo package.
format β Formats Mojo source files.
doc β Compiles docstrings from a Mojo file.
demangle β Demangles the given name.
test β DEPRECATED. Execute unit, integration, and documentation tests.
Optionsβ
Diagnostic optionsβ
--version, -vβ
Prints the Mojo version and exits.
Common optionsβ
--help, -hβ
Displays help information.
--help-hiddenβ
Displays help for hidden options.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!