# Mojo CLI reference > Reference for Mojo CLI commands: build, run, debug, format, package, doc, demangle, and repl. Version: 1.1.0 This file contains all documentation content in a single document following the llmstxt.org standard. ## mojo build Builds an executable from a Mojo file. ## Synopsis ``` mojo build [options] ``` ## Description Compiles the Mojo file at the given path into an executable. By default, the executable is saved to the current directory and named the same as the input file, but without a file extension. Beware that any Python libraries used in your Mojo project are not included in the executable binary, so they must be provided by the environment where you run the executable. ## Options ### Output options #### `-o ` Sets the path and filename for the executable output. By default, it outputs the executable to the current directory, with the same name and no extension. #### `--emit ` The type of output file to generate. * `exe` (default): emit an executable binary file. * `shared-lib`: emit a shared (dynamic) library. * `object`: (EXPERIMENTAL) emit a single object file. * `llvm`: emit unoptimized LLVM IR. * `llvm-bitcode`: emit bitcode of unoptimized LLVM IR. * `asm`: emit target assembly. For GPU targets, also emits a sidecar file per kernel alongside the host assembly: `.ptx` for NVIDIA, `.amdgcn` for AMD, `.ll` for Metal. ### Compilation options #### `--optimization-level `, `-O`, `--no-optimization (LEVEL=0)` Sets the level of optimization to use at compilation. The value must be a number between 0 and 3. The default is 3. #### `-I ` Appends the given path to the list of directories to search for imported Mojo files. #### `-D ` Defines a named value that can be used from within the Mojo source file being executed. For example, `-Dfoo=42` defines a name `foo` that, when queried with the `std.defines` module from within the Mojo program, would yield the compile-time value `42`. #### `--debug-level `, `-g (LEVEL=full)`, `-g0 (LEVEL=none)`, `-g1 (LEVEL=line-tables)`, `-g2 (LEVEL=full)` Sets the level of debug info to use at compilation. The value must be one of: `none`, `line-tables`, or `full`. Default is `none`, except when using `mojo debug foo.mojo`, which defaults to `full`. Please note that there are issues when generating debug info for some Mojo programs that have yet to be addressed. #### `--num-threads `, `-j` Sets the maximum number of threads to use for compilation. The default is 0 (use all available threads). #### `--elaboration-error-include-prelude` Show elaboration error with locations in mojo startup modules (prelude). #### `--fp-mode ` Controls floating-point behavior as a comma-separated list of `feature=value` items (may be given more than once). The only feature is `contract`, one of `fast` (default) or `off`. `contract=fast` is like Clang's `-ffp-contract=fast`: it fuses `a + b*c` into an FMA across statements and breaking strict IEEE compliance. `contract=off` disables contraction. ### Target options #### `--target-triple ` Sets the compilation target triple. Defaults to the host target. #### `--target-cpu ` Sets the compilation target CPU. Defaults to the host CPU. #### `--target-features ` Sets the compilation target CPU features. Defaults to the host features. #### `--target-abi ` Sets the target ABI name (e.g. `lp64d`), recorded as a `target-abi` LLVM module flag. Unset by default. #### `--march ` Sets the architecture for which to generate code. #### `--mcpu ` Sets the CPU for which to generate code. #### `--mtune ` Sets the CPU for which to tune code. #### `--target-accelerator ` Sets the GPU or accelerator architecture for heterogeneous computing (e.g., sm_90 for NVIDIA H100, gfx942 for AMD MI300). #### `--print-effective-target` Print the effective target configuration after absorbing all command-line flags and exit. #### `--print-supported-targets` Print all available target names and exit. #### `--print-supported-cpus` Print valid CPU names for the specified target and exit. Requires --target-triple. #### `--print-supported-accelerators` Print all supported GPU and accelerator architectures and exit. ### Compilation diagnostic options Controls how the Mojo compiler outputs diagnostics related to compiling and running Mojo source code. #### `--diagnose-missing-doc-strings` Emits diagnostics for missing or partial doc strings. #### `--max-notes-per-diagnostic ` When the Mojo compiler emits diagnostics, it sometimes also prints notes with additional information. This option sets an upper threshold on the number of notes that can be printed with a diagnostic. If not specified, the default maximum is 10. #### `--disable-builtins` Do not use builtins when create package. #### `--disable-warnings` Do not print warning messages. #### `--experimental-fixit` Automatically apply fix-its to the code, and rerun the command again after the fix-its are applied. WARNING: this feature is highly experimental and may result in irreversible data loss. #### `--experimental-export-fixit ` Export fix-its to a YAML file in clang-tidy format instead of applying them directly. The file can be applied using 'clang-apply-replacements'. WARNING: this feature is highly experimental. #### `--Werror` Treat warnings as errors. #### `--Wno-error` Do not treat warnings as errors. #### `--warn-on-unstable-apis` Warn when using unstable APIs from the standard library. #### `--ignore-incompatible-precompiled-file-errors` Ignore errors encountered when loading incompatible Mojo precompiled files. #### `--ignore-deprecated ` Suppress the deprecation warning for the given declaration (e.g. `Foo.bar`, or `some_fn` for a top-level declaration). ### Linker options #### `-Xlinker ` Pass ARG to the linker. #### `--lld-path ` Overrides the path to the `lld` linker used when linking. Takes precedence over the `MODULAR_MOJO_MAX_LLD_PATH` environment variable and the `mojo-max.lld_path` configuration value. ### Experimental compilation options #### `--sanitize ` Turns on runtime checks. The following values are supported: `address` (detects memory issues), and `thread` (detects multi-threading issues). #### `--shared-libasan` Dynamically link the address sanitizer runtime. Requires address sanitization turned on with `--sanitize` option. #### `--debug-info-language ` Sets the language to emit as part of the debug info. The supported languages are: `Mojo`, and `C`. `Mojo` is the default. `C` is useful to enable rudimentary debugging and binary introspection in tools that don't understand Mojo, but is not required for `mojo debug`. ### Common options #### `--diagnostic-format ` The format in which diagnostics and error messages are printed. Must be one of "text" or "json" ("text" is the default). #### `--help`, `-h` Displays help information. #### `--help-hidden` Displays help for hidden options. --- ## mojo debug Launches the Mojo debugger using the command-line interface or an external editor. ## Synopsis ``` mojo debug [debug-options] ``` ## Description This command, which underneath uses the LLDB debugger, or cuda-gdb, offers four basic debug session modes: * Build and debug a Mojo file. mojo debug [options] [runtime args] Builds the Mojo file at the given path and launches it under the debugger. Options, which come before the Mojo file, can include any compilation options expected by the `mojo run`, as well as regular debuggingcommands. Runtime args, which come after the Mojo file, are passed directly to the debuggee upon launch. By default, this mode uses `-O0` and `--debug-level=full` as compilation options. * Debug a precompiled program. mojo debug [options] [runtime args] Launches the program at the given path in the debugger. Options, which come before the program path, cannot include compilation commands. Runtime args, which come after the program path, are passed directly to the debuggee upon launch. * Attach to a running process. mojo debug [options] [--pid | --process-name ] Attaches to the process specified by pid or name, which can be the full path of the process' executable. Options other than the process identifier cannot include compilation options. * Start the debugger command-line interface. mojo debug [options] Launches the debugger CLI with support for debugging Mojo programs. This command only supports LLDB or cuda-gdb options via the `--X` option. You can also select one of two interfaces for the debug session: * CLI: By default, all debug session modes are launched using the regular debugger command-line interface. * VS Code Debug Server: If you add the `--vscode` option, the debug session is launched in VS Code via the Mojo extension. VS Code must be running and the Mojo extension must be enabled. Besides that, the environment variables and the current working directory of this invocation are preserved when launching programs in the debugger on VS Code. Finally, it is worth mentioning that this debugger can debug programs written in other standard native languages like Rust, C and C++, as it is based on LLDB or cuda-gdb. Debugger capabilities: * LLDB: this is the default debugger and has great support for CPU Mojo code, but has no support at all for Mojo GPU code. * cuda-gdb: this is invoked via the `--cuda-gdb` option and has minimal support for CPU Mojo code but it has support for GPU Mojo code. ## Options ### Attach options #### `--pid ` Indicates the debugger to attach to the process with the given PID. #### `--process-name ` Indicates the debugger to attach to the process with the given name or path. ### cuda-gdb options #### `--cuda-gdb` Uses cuda-gdb instead of LLDB for debugging. In this mode, it's possible to step into GPU code, but the CPU debugging experience is degraded. #### `--cuda-gdb-path ` Uses the given CUDA_GDB_PATH instead of looking for cuda-gdb in the PATH environment variable. #### `--break-on-launch` Set the breakOnLaunch option for cuda-gdb. This makes the debugger break on the first instruction of every launched kernel. ### Compilation options #### `--optimization-level `, `-O`, `--no-optimization (LEVEL=0)` Sets the level of optimization to use at compilation. The value must be a number between 0 and 3. The default is 3. #### `-I ` Appends the given path to the list of directories to search for imported Mojo files. #### `-D ` Defines a named value that can be used from within the Mojo source file being executed. For example, `-Dfoo=42` defines a name `foo` that, when queried with the `std.defines` module from within the Mojo program, would yield the compile-time value `42`. #### `--debug-level `, `-g (LEVEL=full)`, `-g0 (LEVEL=none)`, `-g1 (LEVEL=line-tables)`, `-g2 (LEVEL=full)` Sets the level of debug info to use at compilation. The value must be one of: `none`, `line-tables`, or `full`. Default is `none`, except when using `mojo debug foo.mojo`, which defaults to `full`. Please note that there are issues when generating debug info for some Mojo programs that have yet to be addressed. #### `--num-threads `, `-j` Sets the maximum number of threads to use for compilation. The default is 0 (use all available threads). #### `--elaboration-error-include-prelude` Show elaboration error with locations in mojo startup modules (prelude). #### `--fp-mode ` Controls floating-point behavior as a comma-separated list of `feature=value` items (may be given more than once). The only feature is `contract`, one of `fast` (default) or `off`. `contract=fast` is like Clang's `-ffp-contract=fast`: it fuses `a + b*c` into an FMA across statements and breaking strict IEEE compliance. `contract=off` disables contraction. ### Target options #### `--target-triple ` Sets the compilation target triple. Defaults to the host target. #### `--target-cpu ` Sets the compilation target CPU. Defaults to the host CPU. #### `--target-features ` Sets the compilation target CPU features. Defaults to the host features. #### `--target-abi ` Sets the target ABI name (e.g. `lp64d`), recorded as a `target-abi` LLVM module flag. Unset by default. #### `--march ` Sets the architecture for which to generate code. #### `--mcpu ` Sets the CPU for which to generate code. #### `--mtune ` Sets the CPU for which to tune code. #### `--target-accelerator ` Sets the GPU or accelerator architecture for heterogeneous computing (e.g., sm_90 for NVIDIA H100, gfx942 for AMD MI300). #### `--print-effective-target` Print the effective target configuration after absorbing all command-line flags and exit. #### `--print-supported-targets` Print all available target names and exit. #### `--print-supported-cpus` Print valid CPU names for the specified target and exit. Requires --target-triple. #### `--print-supported-accelerators` Print all supported GPU and accelerator architectures and exit. ### Compilation diagnostic options Controls how the Mojo compiler outputs diagnostics related to compiling and running Mojo source code. #### `--diagnose-missing-doc-strings` Emits diagnostics for missing or partial doc strings. #### `--max-notes-per-diagnostic ` When the Mojo compiler emits diagnostics, it sometimes also prints notes with additional information. This option sets an upper threshold on the number of notes that can be printed with a diagnostic. If not specified, the default maximum is 10. #### `--disable-builtins` Do not use builtins when create package. #### `--disable-warnings` Do not print warning messages. #### `--experimental-fixit` Automatically apply fix-its to the code, and rerun the command again after the fix-its are applied. WARNING: this feature is highly experimental and may result in irreversible data loss. #### `--experimental-export-fixit ` Export fix-its to a YAML file in clang-tidy format instead of applying them directly. The file can be applied using 'clang-apply-replacements'. WARNING: this feature is highly experimental. #### `--Werror` Treat warnings as errors. #### `--Wno-error` Do not treat warnings as errors. #### `--warn-on-unstable-apis` Warn when using unstable APIs from the standard library. #### `--ignore-incompatible-precompiled-file-errors` Ignore errors encountered when loading incompatible Mojo precompiled files. #### `--ignore-deprecated ` Suppress the deprecation warning for the given declaration (e.g. `Foo.bar`, or `some_fn` for a top-level declaration). ### Debugger options #### `--X ` Passes ARG as an argument to the debugger when the debug session is launched using the debugger command-line interface. This option can be specified multiple times. It is ignored when using the RPC mode. ### Debug server options #### `--vscode` Launches the debug session on VS Code via the Mojo extension. #### `--rpc` Alias for --vscode. #### `--terminal ` The type of terminal to use when starting a launch debug session. * `console` (default): the debuggee will be launched in the default environment for the editor. If using VS Code, this will be the Debug Console. * `dedicated`: the debuggee will be launched in a dedicated terminal within the editor. #### `--port ` Uses the given PORT to communicate with the RPC debug server. Defaults to trying all ports from 12355 to 12364 inclusive. #### `--stop-on-entry` Automatically stop after launch. #### `--init-command ` Initialization command executed upon debugger startup. Can be specified multiple times. ### Linker options #### `-Xlinker ` Pass ARG to the linker. #### `--lld-path ` Overrides the path to the `lld` linker used when linking. Takes precedence over the `MODULAR_MOJO_MAX_LLD_PATH` environment variable and the `mojo-max.lld_path` configuration value. ### Experimental compilation options #### `--sanitize ` Turns on runtime checks. The following values are supported: `address` (detects memory issues), and `thread` (detects multi-threading issues). #### `--shared-libasan` Dynamically link the address sanitizer runtime. Requires address sanitization turned on with `--sanitize` option. #### `--debug-info-language ` Sets the language to emit as part of the debug info. The supported languages are: `Mojo`, and `C`. `Mojo` is the default. `C` is useful to enable rudimentary debugging and binary introspection in tools that don't understand Mojo, but is not required for `mojo debug`. ### Common options #### `--help`, `-h` Displays help information. #### `--help-hidden` Displays help for hidden options. --- ## mojo demangle Demangles the given name. ## Synopsis ``` mojo demangle [options] ``` ## Description If the given name is a mangled Mojo symbol name, prints the demangled name. If no name is provided, one is read from standard input. ## Options ### Common options #### `--help`, `-h` Displays help information. #### `--help-hidden` Displays help for hidden options. --- ## mojo doc Compiles docstrings from a Mojo file. ## Synopsis ``` mojo doc [options] ``` ## Description This is an early version of a documentation tool that generates an API reference from Mojo code comments. Currently, it generates a structured output of all docstrings into a JSON file, and it does not generate HTML. This output format is subject to change. The input may be a single file or a directory. If you specify a directory, it will generate a single JSON output with documentation for all modules found in that path, recursively. ## Options ### Output options #### `-o ` Sets the path and filename for the JSON output. If not provided, output is written to stdout. ### Compilation options #### `-I ` Appends the given path to the list of directories that Mojo will search for any package/module dependencies. That is, if the file you pass to `mojo doc` imports any packages that do not reside in the local path and are not part of the Mojo standard library, use this to specify the path where Mojo can find those packages. ### Validation options The following validation options help ensure that your docstrings use valid structure and meet other style criteria. By default, warnings are emitted only if the docstrings contain errors that prevent translation to the output format. (More options coming later.) #### `--diagnose-missing-doc-strings` Emits diagnostic warnings for missing or partial doc strings. #### `--docs-base-path ` Sets the path prefix for generated documentation links. ### Compilation diagnostic options Controls how the Mojo compiler outputs diagnostics related to compiling and running Mojo source code. #### `--max-notes-per-diagnostic ` When the Mojo compiler emits diagnostics, it sometimes also prints notes with additional information. This option sets an upper threshold on the number of notes that can be printed with a diagnostic. If not specified, the default maximum is 10. #### `--Werror` Treat warnings as errors. #### `--Wno-error` Do not treat warnings as errors (overrides -Werror). #### `--ignore-deprecated ` Suppress the deprecation warning for the given declaration (e.g. `Foo.bar`, or `some_fn` for a top-level declaration). ### Common options #### `--diagnostic-format ` The format in which diagnostics and error messages are printed. Must be one of "text" or "json" ("text" is the default). #### `--help`, `-h` Displays help information. #### `--help-hidden` Displays help for hidden options. --- ## mojo format Formats Mojo source files. ## Synopsis ``` mojo format [options] ``` ## Description Formats the given set of Mojo sources using a Mojo-specific lint tool. ## Options ### Format options #### `--line-length `, `-l ` Sets the max character line length. Default is 80. ### Diagnostic options #### `--quiet`, `-q` Disables non-error messages. ### Common options #### `--help`, `-h` Displays help information. #### `--help-hidden` Displays help for hidden options. --- ## mojo The Mojo🔥 command line interface. ## Synopsis ``` mojo mojo [run-options] 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`](run.md) — Builds and executes a Mojo file. [`build`](build.md) — Builds an executable from a Mojo file. [`repl`](repl.md) — Launches the Mojo REPL. [`debug`](debug.md) — Launches the Mojo debugger using the command-line interface or an external editor. [`precompile`](precompile.md) — Precompiles a Mojo package. [`format`](format.md) — Formats Mojo source files. [`doc`](doc.md) — Compiles docstrings from a Mojo file. [`demangle`](demangle.md) — Demangles the given name. ## Options ### Diagnostic options #### `--version`, `-v` Prints the Mojo version and exits. ### Cache management options #### `--print-cache-location` Prints the Mojo compile cache (.mojo_cache) location and exits. #### `--clear-cache` Removes the Mojo compile cache (.mojo_cache) after confirmation. Pass '-f' / '--force' to skip the confirmation prompt. ### Common options #### `--help`, `-h` Displays help information. #### `--help-hidden` Displays help for hidden options. --- ## mojo precompile Precompiles a Mojo package. ## Synopsis ``` mojo precompile [options] ``` ## Description Precompiles a directory of Mojo source files into a binary package suitable to share and import into other Mojo programs and modules. A precompiled Mojo package is faster to build with compared to building it from source. It is not intended as a distributable format as it is tied to the version of the compiler that produced it. Loading a precompiled package using a compiler of a different version will error. Despite this, it is technically portable across different systems because it is not an architecture-specific format (it includes only non-elaborated code). The code becomes an architecture-specific executable only after it's imported into a Mojo program that is then compiled with `mojo build`. To create a Mojo package, first add an `__init__.mojo` file to your package directory. Then pass that directory name to this command, and specify the output path and filename with `-o`. For more information, see [Mojo modules and packages](https://mojolang.org/docs/manual/packages/). ## Options ### Output options #### `-o ` Sets the path and filename for the output package. The filename must end with `.mojoc` or `.mojopkg`. The filename given here defines the package name you can then use to import the code (minus the file extension). If you don't specify this option, a `.mojoc` file is generated in the current working directory, with a name based on the name of the input directory. ### Compilation options #### `-I ` Appends the given path to the list of directories to search for imported Mojo files. ### Compilation diagnostic options Controls how the Mojo compiler outputs diagnostics related to compiling and running Mojo source code. #### `--diagnose-missing-doc-strings` Emits diagnostics for missing or partial doc strings. #### `--max-notes-per-diagnostic ` When the Mojo compiler emits diagnostics, it sometimes also prints notes with additional information. This option sets an upper threshold on the number of notes that can be printed with a diagnostic. If not specified, the default maximum is 10. #### `--disable-builtins` Do not use builtins when create package. #### `--disable-warnings` Do not print warning messages. #### `--experimental-fixit` Automatically apply fix-its to the code, and rerun the command again after the fix-its are applied. WARNING: this feature is highly experimental and may result in irreversible data loss. #### `--experimental-export-fixit ` Export fix-its to a YAML file in clang-tidy format instead of applying them directly. The file can be applied using 'clang-apply-replacements'. WARNING: this feature is highly experimental. #### `--Werror` Treat warnings as errors. #### `--Wno-error` Do not treat warnings as errors. #### `--warn-on-unstable-apis` Warn when using unstable APIs from the standard library. #### `--ignore-incompatible-precompiled-file-errors` Ignore errors encountered when loading incompatible Mojo precompiled files. #### `--ignore-deprecated ` Suppress the deprecation warning for the given declaration (e.g. `Foo.bar`, or `some_fn` for a top-level declaration). ### Common options #### `--diagnostic-format ` The format in which diagnostics and error messages are printed. Must be one of "text" or "json" ("text" is the default). #### `--help`, `-h` Displays help information. #### `--help-hidden` Displays help for hidden options. --- ## mojo repl Launches the Mojo REPL. ## Synopsis ``` mojo repl [lldb-options] ``` ## Description Launches a Mojo read-evaluate-print loop (REPL) environment, which provides interactive development in the terminal. You can also start the REPL by running `mojo` without CLI arguments. Options and arguments are forwarded to the underlying LLDB tool, which runs the REPL. Beware: the REPL has known issues and isn't under active development. We don't offer any REPL stability guarantees. To check REPL status and future developments, watch the Mojo REPL roadmap discussion on https://forum.modular.com/t/mojo-repl-roadmap/1158. ## Options ### Common options #### `--help`, `-h` Displays help information. #### `--help-hidden` Displays help for hidden options. --- ## mojo run Builds and executes a Mojo file. ## Synopsis ``` mojo run [options] [path-arguments...] ``` ## Description Compiles the Mojo file at the given path and immediately executes it. Another way to execute this command is to simply pass a file to `mojo`. For example: mojo hello.mojo Options for this command itself, such as the ones listed below, must appear before the input file `path` argument. Any command line arguments that appear after the Mojo source file `path` are interpreted as arguments for that Mojo program. ## Options ### Compilation options #### `--optimization-level `, `-O`, `--no-optimization (LEVEL=0)` Sets the level of optimization to use at compilation. The value must be a number between 0 and 3. The default is 3. #### `-I ` Appends the given path to the list of directories to search for imported Mojo files. #### `-D ` Defines a named value that can be used from within the Mojo source file being executed. For example, `-Dfoo=42` defines a name `foo` that, when queried with the `std.defines` module from within the Mojo program, would yield the compile-time value `42`. #### `--debug-level `, `-g (LEVEL=full)`, `-g0 (LEVEL=none)`, `-g1 (LEVEL=line-tables)`, `-g2 (LEVEL=full)` Sets the level of debug info to use at compilation. The value must be one of: `none`, `line-tables`, or `full`. Default is `none`, except when using `mojo debug foo.mojo`, which defaults to `full`. Please note that there are issues when generating debug info for some Mojo programs that have yet to be addressed. #### `--num-threads `, `-j` Sets the maximum number of threads to use for compilation. The default is 0 (use all available threads). #### `--elaboration-error-include-prelude` Show elaboration error with locations in mojo startup modules (prelude). #### `--fp-mode ` Controls floating-point behavior as a comma-separated list of `feature=value` items (may be given more than once). The only feature is `contract`, one of `fast` (default) or `off`. `contract=fast` is like Clang's `-ffp-contract=fast`: it fuses `a + b*c` into an FMA across statements and breaking strict IEEE compliance. `contract=off` disables contraction. ### Target options #### `--target-triple ` Sets the compilation target triple. Defaults to the host target. #### `--target-cpu ` Sets the compilation target CPU. Defaults to the host CPU. #### `--target-features ` Sets the compilation target CPU features. Defaults to the host features. #### `--target-abi ` Sets the target ABI name (e.g. `lp64d`), recorded as a `target-abi` LLVM module flag. Unset by default. #### `--march ` Sets the architecture for which to generate code. #### `--mcpu ` Sets the CPU for which to generate code. #### `--mtune ` Sets the CPU for which to tune code. #### `--target-accelerator ` Sets the GPU or accelerator architecture for heterogeneous computing (e.g., sm_90 for NVIDIA H100, gfx942 for AMD MI300). #### `--print-effective-target` Print the effective target configuration after absorbing all command-line flags and exit. #### `--print-supported-targets` Print all available target names and exit. #### `--print-supported-cpus` Print valid CPU names for the specified target and exit. Requires --target-triple. #### `--print-supported-accelerators` Print all supported GPU and accelerator architectures and exit. ### Compilation diagnostic options Controls how the Mojo compiler outputs diagnostics related to compiling and running Mojo source code. #### `--diagnose-missing-doc-strings` Emits diagnostics for missing or partial doc strings. #### `--max-notes-per-diagnostic ` When the Mojo compiler emits diagnostics, it sometimes also prints notes with additional information. This option sets an upper threshold on the number of notes that can be printed with a diagnostic. If not specified, the default maximum is 10. #### `--disable-builtins` Do not use builtins when create package. #### `--disable-warnings` Do not print warning messages. #### `--experimental-fixit` Automatically apply fix-its to the code, and rerun the command again after the fix-its are applied. WARNING: this feature is highly experimental and may result in irreversible data loss. #### `--experimental-export-fixit ` Export fix-its to a YAML file in clang-tidy format instead of applying them directly. The file can be applied using 'clang-apply-replacements'. WARNING: this feature is highly experimental. #### `--Werror` Treat warnings as errors. #### `--Wno-error` Do not treat warnings as errors. #### `--warn-on-unstable-apis` Warn when using unstable APIs from the standard library. #### `--ignore-incompatible-precompiled-file-errors` Ignore errors encountered when loading incompatible Mojo precompiled files. #### `--ignore-deprecated ` Suppress the deprecation warning for the given declaration (e.g. `Foo.bar`, or `some_fn` for a top-level declaration). ### Linker options #### `-Xlinker ` Pass ARG to the linker. #### `--lld-path ` Overrides the path to the `lld` linker used when linking. Takes precedence over the `MODULAR_MOJO_MAX_LLD_PATH` environment variable and the `mojo-max.lld_path` configuration value. ### Experimental compilation options #### `--sanitize ` Turns on runtime checks. The following values are supported: `address` (detects memory issues), and `thread` (detects multi-threading issues). #### `--shared-libasan` Dynamically link the address sanitizer runtime. Requires address sanitization turned on with `--sanitize` option. #### `--debug-info-language ` Sets the language to emit as part of the debug info. The supported languages are: `Mojo`, and `C`. `Mojo` is the default. `C` is useful to enable rudimentary debugging and binary introspection in tools that don't understand Mojo, but is not required for `mojo debug`. ### Common options #### `--diagnostic-format ` The format in which diagnostics and error messages are printed. Must be one of "text" or "json" ("text" is the default). #### `--help`, `-h` Displays help information. #### `--help-hidden` Displays help for hidden options.