m5c command reference
Quick reference for the m5c CLI.
Global options
m5c --config ~/.mach5/config.yaml <command>
m5c --endpoint https://mach5.example.com --token "$MACH5_TOKEN" <command>
| Option | Environment | Purpose |
|---|---|---|
--config | MACH5_CONFIG | Mach5 config file for remote commands. |
--endpoint | MACH5_ENDPOINT | Mach5 API endpoint override. |
--token | MACH5_TOKEN | Authorization token payload override. |
Local package commands
| Command | Purpose |
|---|---|
m5c init <path> | Create a starter workspace file. |
m5c validate [path] --workspace --offline | Validate package, contract, module, mapping, import, detection, and app package manifests. |
m5c test [path] --workspace | Run conformance, mapping, module, and expected-finding tests. |
m5c build <path> --out <dir> | Build a deterministic local package artifact. |
m5c inspect <path> | Inspect a package artifact and print JSON. |
m5c lower <path> --dev --bindings <file> --out <dir> | Lower package source into generated bundle output and reports. |
m5c import sigma <path> --out <dir> --reports <dir> | Preview/export Sigma rules as Detection IR plus diagnostics. |
m5c mcp serve | Serve local/offline MCP tools over stdio. |
Remote resource commands
| Command | Purpose |
|---|---|
m5c apply -f <file> --namespace <ns> | Apply one YAML resource file. |
m5c bundle validate <dir> --namespace <ns> | Validate a bundle against a namespace. |
m5c bundle apply <dir> --namespace <ns> | Install or upgrade a bundle. |
m5c bundle list --namespace <ns> | List bundles in a namespace. |
m5c bundle get <name> --namespace <ns> | Get bundle status. |
m5c bundle members <name> --namespace <ns> | List resources owned by a bundle. |
m5c bundle delete <name> --namespace <ns> --yes | Delete a bundle and owned resources. |
m5c export <namespace> -o <file> | Export namespace resources. |
m5c export --all-namespaces -d <dir> | Export resources from all namespaces. |
m5c smoke <path> | Run runtime smoke scenarios against lowered bundles. |
Output formats
validate and test support human and JSON output.
m5c validate apps/security-analytics --workspace --format json
m5c test apps/security-analytics --workspace --format json
Use JSON in CI and human output during local development.