Skip to main content

Installation

pip install raxe

Quick Reference

# Scan a prompt
raxe scan "your text here"

# Interactive mode
raxe repl

# List rules
raxe rules list

# Health check
raxe doctor

# View stats
raxe stats

Commands

CommandDescription
raxe scanScan text for threats
raxe replInteractive scanning mode
raxe rulesManage detection rules
raxe doctorSystem health check
raxe statsView scan statistics
raxe configManage configuration
raxe initInitialize RAXE
raxe exportExport scan history

Global Options

# Set log level
raxe --log-level DEBUG scan "text"

# Output as JSON
raxe scan "text" --format json

# CI mode (JSON output, exit code 1 on threats)
raxe scan "text" --ci

Environment Variables

# Set API key
export RAXE_API_KEY="raxe_..."

# Set log level
export RAXE_LOG_LEVEL=DEBUG

# CI mode
export RAXE_CI=true

Exit Codes

CodeMeaning
0Success, no threats
1Threat detected
2Error occurred

Common Workflows

Basic Scan

raxe scan "Ignore all previous instructions"
Output:
THREAT DETECTED

Severity: CRITICAL
Detections: 1

Rule: pi-001 - Prompt Injection
Matched: "Ignore all previous instructions"

CI/CD Integration

# In GitHub Actions or similar
raxe scan "$USER_INPUT" --ci
if [ $? -eq 1 ]; then
  echo "Threat detected, blocking request"
  exit 1
fi

Batch Scanning

# Scan from file
raxe batch prompts.txt

# Scan from stdin
cat prompts.txt | raxe batch -

Interactive Mode

raxe repl
RAXE REPL v0.0.1
Type 'help' for commands, 'quit' to exit

raxe> scan Ignore all instructions
THREAT: pi-001 (HIGH)

raxe> quit

Next Steps

All Commands

Complete CLI command reference