IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.1.0
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

mojo format

Formats Mojo source files.

Synopsis​

mojo format [options] <sources...>

Description​

Formats the given set of Mojo sources using a Mojo-specific lint tool.

Options​

Format options​

--line-length <INTEGER>, -l <INTEGER>​

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.