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.

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.

Released under the GNU AGPLv3 license.