mix ragex.audit (Ragex v0.8.0)

View Source

Generates an AI-powered code audit report as JSON.

Combines comprehensive static analysis with an AI-generated professional code audit report. The output is a JSON document containing all structured analysis results plus an "audit" field with the AI-generated Markdown report.

Usage

mix ragex.audit [options]

Options

  • --path PATH - Directory to analyze (default: current directory)
  • --output FILE - Output file (default: stdout)
  • --dead-code - Include dead code analysis (disabled by default, can be slow)
  • --provider PROVIDER - AI provider: deepseek_r1, openai, anthropic, ollama
  • --model MODEL - Model name override
  • --verbose - Show progress on stderr
  • --with-empty - Include empty result categories in output (default: false)
  • --help - Show this help

Examples

# Audit current directory
mix ragex.audit

# Audit specific directory, save to file
mix ragex.audit --path lib/ --output audit.json

# Include dead code analysis with progress
mix ragex.audit --dead-code --verbose --output report.json

Output Format

JSON with the following top-level keys:

  • timestamp - ISO 8601 audit timestamp
  • path - Analyzed directory path
  • audit - AI-generated Markdown audit report (string)
  • graph - Knowledge graph statistics (nodes, edges, modules, functions, embeddings)
  • results - Structured analysis results (compatible with mix ragex.analyze --format json)
  • summary - Issue counts by category
  • config - Analysis configuration used