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>
OptionEnvironmentPurpose
--configMACH5_CONFIGMach5 config file for remote commands.
--endpointMACH5_ENDPOINTMach5 API endpoint override.
--tokenMACH5_TOKENAuthorization token payload override.

Local package commands

CommandPurpose
m5c init <path>Create a starter workspace file.
m5c validate [path] --workspace --offlineValidate package, contract, module, mapping, import, detection, and app package manifests.
m5c test [path] --workspaceRun 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 serveServe local/offline MCP tools over stdio.

Remote resource commands

CommandPurpose
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> --yesDelete 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.

Analytics Cookies

Help us understand website usage.

Necessary storage remembers your choice. With your consent, Mach5 also uses PostHog analytics to measure website traffic and interactions.

Change this anytime from Cookie Settings in the footer. Privacy Notice.