mix ragex.audit
(Ragex v0.14.0)
View Source
Generates an AI-powered code audit report.
Combines comprehensive static analysis with an AI-generated professional
code audit report. By default outputs 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)--format FORMAT- Output format:json(default) ormarkdown--output FILE- Write output to file instead of 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 (JSON to stdout)
mix ragex.audit
# Render AI audit report in terminal
mix ragex.audit --format markdown
# Save rendered markdown to file (ANSI escape sequences stripped)
mix ragex.audit --format markdown --output report.md
# Audit specific directory, save JSON to file
mix ragex.audit --path lib/ --output audit.json
# Include dead code analysis with progress
mix ragex.audit --dead-code --verbose --output report.jsonOutput Format
JSON (default)
JSON with the following top-level keys:
timestamp- ISO 8601 audit timestamppath- Analyzed directory pathaudit- AI-generated Markdown audit report (string)graph- Knowledge graph statistics (nodes, edges, modules, functions, embeddings)results- Structured analysis results (compatible withmix ragex.analyze --format json)summary- Issue counts by categoryconfig- Analysis configuration used
Markdown (--format markdown)
Renders only the AI-generated audit report. When printed to stdout, uses
ANSI-styled Markdown (via Marcli). When written to a file (--output),
escape sequences are stripped for clean readable Markdown.