CLI Reference
The mst command is the entrypoint for creating, checking, building, running, and cleaning Monster projects.
Basic Commands
mst init hello-monster
cd hello-monster
mst run
mst check exam.mnst
mst emit-llvm exam.mnst
mst build exam.mnst
mst run exam.mnst
mst clean
mst -upgrade
mst --help
mst --version
Build Profiles and Optimization
mst build --debug exam.mnst
mst run --debug exam.mnst
mst build --release --opt-level 3 --cpu native exam.mnst
Debug builds keep the raw LLVM IR in target/mst/, default to --opt-level 0,
and link with clang -g. Release builds default to --opt-level 2.
Use --opt-level 0|1|2|3 and --cpu generic|native when you want
to tune the LLVM and clang pipeline.
Project Manifest
Monster.toml stores the default package entry and build options. Command-line
flags override the manifest.
[package]
name = "hello-monster"
entry = "src/main.mnst"
[build]
profile = "release"
opt-level = 2
cpu = "generic"
With an entry configured, mst check, mst emit-llvm,
mst build, and mst run can be used without a source file.
Passing Program Arguments
mst run examples/argv.mnst -- hello from monster
Everything after -- is forwarded to the compiled Monster program. Monster
programs can receive these through main(argc: i32, argv: **u8).
Build Output
Generated binaries and intermediate LLVM files live in target/mst/.
This keeps project roots clean while preserving artifacts useful for debugging.
Update Compiler
mst -upgrade
This downloads the latest published GitHub Release and installs it back into the
current mst install directory. Global installs may ask for sudo.