Skip to content

CLI Reference

Scan a directory for LLM security vulnerabilities.

Usage: llmarmor scan [OPTIONS] [PATH]
Arguments:
PATH Directory or file to scan. [default: .]
Options:
--strict Enable strict scanning mode.
-v, --verbose Show all findings including INFO and LOW severity.
-q, --quiet Suppress all output. Only the exit code communicates the result.
-f, --format FMT Output format. [default: grouped]
Choices: grouped, flat, json, md, markdown, sarif
-o, --output PATH Write output to PATH instead of stdout.
--config PATH Path to a .llmarmor.yaml configuration file.
--rules List all OWASP LLM Top 10 rules grouped by support status.
--version Print the installed version.
--help Show this message and exit.

List all available rules and their current support status.

Terminal window
llmarmor rules
Terminal window
# Default scan — CRITICAL, HIGH, MEDIUM findings
llmarmor scan ./src
# Save JSON report
llmarmor scan ./src -f json -o findings.json
# SARIF for GitHub Code Scanning
llmarmor scan ./src -f sarif -o results.sarif
# Silent CI gate — exit code only
llmarmor scan ./src --quiet && echo "Clean" || echo "Issues found"
# Maximum coverage: strict + verbose + JSON
llmarmor scan ./src --strict --verbose -f json -o full-report.json