> For the complete Mojo documentation index, see [llms.txt](/llms.txt).
> Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

# mojo

The Mojo🔥 command line interface.

## Synopsis

```
mojo <command>
mojo [run-options] <path>
mojo [options]
mojo
```

## Description

The `mojo` CLI provides all the tools you need for Mojo development, such as commands to run, compile, and precompile 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 precompile --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.mojo

And 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 all the [Mojo releases](https://mojolang.org/releases/).

## Commands

[`run`](https://mojolang.org/docs/cli/run.md) — Builds and executes a Mojo file.

[`build`](https://mojolang.org/docs/cli/build.md) — Builds an executable from a Mojo file.

[`repl`](https://mojolang.org/docs/cli/repl.md) — Launches the Mojo REPL.

[`debug`](https://mojolang.org/docs/cli/debug.md) — Launches the Mojo debugger using the command-line interface or an external editor.

[`package`](https://mojolang.org/docs/cli/precompile.md) — Compiles a Mojo package.

[`format`](https://mojolang.org/docs/cli/format.md) — Formats Mojo source files.

[`doc`](https://mojolang.org/docs/cli/doc.md) — Compiles docstrings from a Mojo file.

[`demangle`](https://mojolang.org/docs/cli/demangle.md) — Demangles the given name.

## 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.

