Skip to content

CLI Reference

Ogma's Rust backend can run as a local proxy server, an embedded MCP process, or a headless pentest command.

Packaged desktop users normally start Ogma from the application. CLI usage is useful for development, automation, and server-style local testing.

Server Mode

bash
ogma \
  --listen 127.0.0.1:8080 \
  --api-port 127.0.0.1:8181 \
  --data-dir ./ogma-data

Common Flags

FlagDefaultPurpose
--listen127.0.0.1:8080Proxy listener address.
--api-port127.0.0.1:8181REST API and frontend server address.
--data-dir./ogma-dataProject database, certificates, plugins, exports, and local state.
--max-plugin-size52428800Maximum plugin package size in bytes.
--intercept-queue-cap1000Maximum queued intercept items before new traffic is forwarded.
--ui-dirunsetDirectory containing built frontend files to serve from the API server.

OAST Flags

FlagDefaultPurpose
--oast-http-port8888HTTP callback listener. Use 0 to disable.
--oast-https-port8443HTTPS callback listener. Use 0 to disable.
--oast-dns-port5353DNS callback listener. Use 0 to disable.
--oast-smtp-port2525SMTP callback listener. Use 0 to disable.
--oast-domainoast.localDomain used for generated callback hostnames.
--oast-public-ipunsetPublic IP returned by OAST DNS A-record responses.

Headless Pentest Mode

The pentest subcommand runs discovery, passive analysis, optional active scanning, and emits a Markdown report.

bash
ogma pentest https://example.com \
  --depth 3 \
  --concurrency 10 \
  --min-severity medium \
  --output report.md

Pentest Flags

FlagDefaultPurpose
--depth3Discovery depth. 0 means unlimited.
--concurrency10Maximum concurrent requests.
--no-activedisabledDisable active scanning; run discovery and passive analysis only.
--min-severitymediumMinimum severity that returns exit code 1. Valid: info, low, medium, high, critical.
--outputstdoutWrite report to a file instead of stdout.

Exit codes:

CodeMeaning
0Completed and no finding met the severity threshold.
1Completed and at least one finding met the severity threshold.
2Runtime or configuration error.

MCP Mode

MCP can be started from Ogma settings or through the standalone ogma-mcp binary. Hidden backend flags also support embedded MCP mode when Ogma launches an internal MCP process.

For normal setup, use MCP setup.

Standalone ogma-mcp Flags

bash
ogma-mcp \
  --api-url http://127.0.0.1:8181 \
  --body-preview-bytes 2048
FlagEnvironment variableDefaultPurpose
--api-urlOGMA_API_URLhttp://127.0.0.1:8181Running Ogma backend API URL.
--body-preview-bytesunset512Maximum body preview bytes returned by read tools.
--allow-write-findingsOGMA_MCP_ALLOW_WRITE_FINDINGSdisabledEnable finding creation, updates, tags, and evidence linking.
--allow-export-dataOGMA_MCP_ALLOW_EXPORT_DATAdisabledEnable export job creation.
--allow-send-requestsOGMA_MCP_ALLOW_SEND_REQUESTSdisabledEnable tools that send traffic, drive the browser, crawl, probe, test auth, or connect to WebSockets.
--max-sends-per-minuteunset5Per-minute MCP send limit.
--max-sends-per-sessionunset20Send limit for the MCP process lifetime.
--allow-run-workflowsOGMA_MCP_ALLOW_RUN_WORKFLOWSdisabledEnable workflow preview, run, and cancel tools.
--max-workflow-runs-per-minuteunset5Per-minute workflow run limit.
--max-workflow-runs-per-sessionunset20Workflow run limit for the MCP process lifetime.
--allow-intercept-controlOGMA_MCP_ALLOW_INTERCEPT_CONTROLdisabledEnable intercept queue control, forwarding, dropping, and modification.

MCP writes protocol messages to stdout, so runtime logging goes to stderr.

Development Builds

Local build scripts are available at the repository root:

bash
./build-local.sh
./build-desktop-local.sh

Use the desktop build when testing the packaged Electron experience. Use the backend/frontend build when testing API and web UI behavior.

Proprietary software. All rights reserved.