MAGDOX Code Security documentation
CLI reference
Every magdox command, global flags and exit codes.
Status: Preview
Commands follow magdox <command> [subcommand] [flags]. Output is human-readable by default and stable JSON with --format json. Behaviour is identical on Windows, macOS and Linux.
Global flags
| Flag | Purpose |
|---|---|
| --org <slug> | Act within a specific organisation. |
| --format text|json | Output format. |
| --yes | Skip interactive confirmations. |
| --offline | Use only cached rules and data; never contact MAGDOX. |
| --config <path> | Use a specific project configuration file. |
| --quiet / --verbose | Reduce or increase logging. |
Commands
| Command | Purpose |
|---|---|
| magdox login | logout | whoami | Device sign-in, end the session, show identity, organisation and role. |
| magdox init | Create .magdox.yml and register the project. |
| magdox scan | Scan locally and upload findings. Flags: --include, --exclude, --only, --baseline, --show-payload, --local-only, --fail-on. |
| magdox rules status | pull | import <file> | Show cached rule version, refresh, or import an offline bundle. |
| magdox runs list | show | open | fetch | List runs, show one, open it in the dashboard, download report and exports together. |
| magdox report <run> --format pdf|html|md | Download the report for a run. |
| magdox export <run> --format sarif|cyclonedx|spdx|cbom | Download a machine-readable export. |
| magdox findings list | show <id> | Read findings from the terminal. |
| magdox projects list | show | archive | Manage projects. |
| magdox tokens list | create | revoke | Manage CI tokens (admin). |
| magdox config get | set | validate | Inspect and validate configuration. |
| magdox upgrade | verify-install | version | Maintain the CLI. |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Scan completed; no --fail-on threshold exceeded. |
| 1 | Usage or configuration error. |
| 2 | Authentication or authorisation failure. |
| 3 | Scan failed locally. |
| 4 | Scan completed but a --fail-on threshold was exceeded. |
| 5 | Could not reach MAGDOX (upload or rules). Local report is still written. |