mojox
CLI and execution layer for Mojo build tooling.
mojox reads your pyproject.toml manifest (via mojox-core), discovers targets, builds an execution plan, and runs mojo commands with structured output. It handles profile resolution, local settings (.mojox/config.toml), diagnostic formatting, and -- in dev mode -- transparent ore acceleration (LLVM bitcode splitting for faster rebuilds) when LLVM tools are available.
Install
uv add mojox "mojo-compiler==1.0.0" # in a project
uv tool install mojox # globally
Subcommands
test
Run test targets (dev profile by default).
mojox test # all test targets
mojox test -k "parse" tests/unit/ # filter by name + path
mojox test --output-format json # NDJSON to stdout (CI)
mojox test --no-fail-fast # run all tests even after failures
mojox test --failure-output final # show failing output after all tests
Test-specific flags:
| Flag | Default | Description |
|---|---|---|
--output-format {human,json} |
human |
Output format; json emits NDJSON to stdout |
--fail-fast / --no-fail-fast |
--fail-fast |
Stop after first failure |
--success-output {immediate,final,never} |
never |
When to show passing test output |
--failure-output {immediate,final,never} |
immediate |
When to show failing test output |
-k / --filter PATTERN |
Filter tests by name (case-insensitive substring) | |
paths (positional) |
Filter tests by file or directory prefix |
run
Run a single .mojo file (dev profile by default).
mojox run src/main.mojo
build
Compile binary targets (release profile by default).
mojox build
check
Validate the manifest and run lints. No compiler needed.
mojox check
metadata
Output the build plan as JSON.
mojox metadata
Common flags
These flags are available on every subcommand:
| Flag | Description |
|---|---|
--profile PROFILE |
Build profile (dev, release, or user-defined) |
-j / --jobs N |
Maximum concurrent compilations |
--timeout SECONDS |
Per-target timeout |
--dry-run |
Show planned commands without executing |
-v / --verbose |
Expand grouped output |
--no-config |
Disable .mojox/config.toml discovery |
--config-file PATH |
Explicit config file path |
-D / --define KEY=VALUE |
Define a compile-time variable (repeatable) |
--flag VALUE |
Extra flag passed through to the compiler (repeatable; use --flag=VALUE for dash-prefixed flags) |
How it works
- Parses
pyproject.tomlviamojox-core(manifest model layer) - Reads
.mojox/config.tomllocal settings, if present (TOCTOU-safe viaopenat) - Resolves policy: profile, defines, flags, CLI overrides
- Discovers targets and builds a plan (pure -- returns commands as data)
- Executes the plan: runs
mojocommands, collects outcomes, formats output - In dev mode, transparently uses ore acceleration when LLVM tools are available; degrades gracefully to standard
mojo run
Exit codes
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Test failure(s) |
2 |
Compilation or configuration error |
See also
mojox-core-- manifest parsing, target discovery, and build planning (pure model layer)mojox-build-- PEP 517 build backend for packaging Mojo libraries as wheels
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mojox-0.5.0.tar.gz.
File metadata
- Download URL: mojox-0.5.0.tar.gz
- Upload date:
- Size: 39.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1dc49ff800aeff20e6ad7594c9256d5296886e0f627586ccec14d8ac4694b97f
|
|
| MD5 |
563115b9726b5597267df16f43ab727a
|
|
| BLAKE2b-256 |
b3a94003595b239152e16d014e342367693fc99b3f905f4272a210be2e1b1286
|
File details
Details for the file mojox-0.5.0-py3-none-any.whl.
File metadata
- Download URL: mojox-0.5.0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c670935294ff9154dc44d70ef9ad0249ab5b10390ade7db5cd58640e0e647c8a
|
|
| MD5 |
39cac195cbbb6d845c8a6686563deedb
|
|
| BLAKE2b-256 |
f055e22e786d88d0298a18a0d756d50e4bff7291cd43552b9fb8b36ad2b206be
|