Skip to content
Early preview. Maxon is under active development — incomplete in places, with breaking changes expected before a 1.0 release.

CLI Reference

Everything the maxon compiler driver accepts: the commands, their options, the project layout they read, and the tools around them.

maxon help prints the same command and option list from the driver itself, and maxon help <command> prints one command’s part of it. Where this document and that listing disagree, the listing is the compiler.

maxon is one binary. It compiles, runs, formats and tests Maxon programs, serves editors and AI agents, and reads back what a program did.

Command Description
maxon <file>.maxon [args...] Run a Maxon file as a script: maxon run without the command word
maxon build <file|directory>... Compile a Maxon program to an executable
maxon cache [clear] Report what this compiler has cached on the host, or remove it
maxon coverage <run|report> <exe> Run a --coverage binary and report line and branch coverage (Debugging and Profiling)
maxon debug --dump-info <exe> Print the .mxdbg debug-info sidecar beside a binary (Debugging and Profiling)
maxon debug --symbolize <exe> <offset...> Resolve code offsets to file:line:col (Debugging and Profiling)
maxon fmt [file|directory] Re-print .maxon sources in canonical layout, in place
maxon help [<command>] Print the command and option reference, whole or for one command
maxon lsp-server Speak the Language Server Protocol over stdio (Editor Support)
maxon mcp-server [--dev] Speak the Model Context Protocol over stdio (MCP Server)
maxon monitor [--filter=…] <exe> [args...] Run a --debugstream binary and print its trace events (Debugging and Profiling)
maxon profile run <exe> Sample a running program and report where its CPU time went (Debugging and Profiling)
maxon run <file|directory> [args...] Compile a program, or reuse a cached build of it, and run it
maxon test [directory] Run a project’s own test declarations
maxon upgrade [--dry-run] Update this compiler’s install to the newest release
maxon version Print the version, the commit it was built from, and the host target

Four more commands are for working on the compiler itself: spec-test, scale-test, verify-recheck and verify-warm-rebuild. maxon with no arguments does not list them; maxon help does. See Working on the Compiler.

Only the first command word on a line is the command. A later one is an ordinary positional argument, so maxon fmt fmt formats the directory fmt/.

An option the driver does not implement is refused before any command runs (`error: unknown option: