CLI Reference
Scan Command
Basic syntax:
clausi scan PATH [options]Default: Without --claude or --openai flags, scans use Clausi AI (no API key needed). Pricing: $2.00 minimum + $0.80/100k tokens.
Scan Options
| Flag | Description |
|---|---|
-r, --regulation | Regulation key (repeat for multiple) |
--claude [MODEL] | BYOK: Use your Anthropic API key ($0.50/scan) |
--openai [MODEL] | BYOK: Use your OpenAI API key ($0.50/scan) |
--preset | Use clause preset (critical-only, high-priority) - saves 60-80% cost |
--open-findings | Auto-open findings.md in your default editor |
--template | Report template (default, detailed, executive) |
-o, --output | Output directory (otherwise uses config) |
--max-cost | Maximum cost in dollars (e.g., --max-cost 1.00) |
--skip-confirmation | Skip the confirmation prompt |
--min-severity | Minimum severity to report (info, warning, high, critical) |
--ignore | Ignore files/directories (can be given multiple times) |
--show-cache-stats | Display cache statistics (shows cost savings) |
Examples
EU AI Act Scan (Clausi AI - Default)
clausi scan . -r EU-AIAUses Clausi AI, no API key needed
Scan with Claude (BYOK)
clausi scan . -r EU-AIA --claudeUses your Anthropic API key, $0.50 flat rate per scan
Multiple Regulations
clausi scan ~/project -r EU-AIA -r GDPR -r SOC2Cost-Saving Preset
clausi scan . -r EU-AIA --preset critical-only --open-findingsScans only critical clauses (saves 60-80% cost)
Output Files
Upon completion the CLI stores reports in your project's clausi/ folder:
findings.md– Main compliance findings reporttraceability_matrix.md– Code-to-clause mappingcompliance_report.pdf– Executive PDF reportmetadata.json– Scan session metadata
Configuration
Settings are stored in a YAML file:
Windows: %USERPROFILE%\.clausi\config.yml
macOS/Linux: ~/.clausi/config.yml
Example configuration:
# API keys (optional - for BYOK mode)
api_keys:
anthropic: "sk-ant-..." # For --claude flag
openai: "sk-..." # For --openai flag
report:
company_name: "ACME Corp"
company_logo: "C:/assets/logo.png"
template: "default" # default | detailed | executive
regulations:
default: EU-AIA # default regulation for scansConfig Commands
| Command | Purpose |
|---|---|
clausi config show | Display current configuration |
clausi config set [...] | Update configuration values |
clausi config edit | Open config in your editor |
clausi config path | Print config file location |
Environment Variables
| Variable | Purpose |
|---|---|
ANTHROPIC_API_KEY | API key for Claude (Anthropic) - for BYOK mode |
OPENAI_API_KEY | API key for OpenAI - for BYOK mode |
CLAUSI_OUTPUT_DIR | Overrides output directory |
Precedence: CLI flag → environment variable → config file → default
Tip: Using BYOK Mode
Set your API key as an environment variable for BYOK mode ($0.50/scan):
export ANTHROPIC_API_KEY=sk-ant-your-key-hereGet your key from: console.anthropic.com