AI Agents Guide
Full integration patterns. Read more
No explanation needed. Just copy, paste, and run.
# Summary review: header + findings narrativeunfault review
# All findings grouped by severity and rule (linter view)unfault lint
# Detailed output with suggested fixesunfault review --output full
# Machine-readable JSONunfault review --output json
# Focus on stability onlyunfault review --dimension stabilityStructured output for Claude, Cursor, Copilot, and other AI assistants.
# JSON output for programmatic parsingunfault review --output json
# Focus on specific dimensionsunfault review --dimension stability --output jsonunfault review --dimension correctness --output json
# Impact analysis before changesunfault graph impact src/api/routes.py --jsonunfault graph critical --json --limit 5Add this to your AGENTS.md or system prompt:
Before committing, run:\`\`\`bashunfault review --output json\`\`\`
If high-severity findings are reported, address them before committing.Before changing a file, check its blast radius:\`\`\`bashunfault graph impact <file>\`\`\`# SARIF for GitHub Code Scanningunfault review --output sarif > results.sarif- name: Run Unfault run: unfault review --output sarif > results.sarif
- name: Upload SARIF uses: github/codeql-action/upload-sarif@v3 with: sarif_file: results.sarif# Fail if findings detected (exit 5)unfault review && echo "Clean!" || echo "Findings found"
# Explicit checkunfault review --output jsonif [ $? -eq 5 ]; then echo "Review the findings above" exit 1fi# Pipe to jq for filteringunfault review --output json | jq '.contexts[].findings | map(select(.severity == "High"))'
# Count findingsunfault review --output json | jq '[.contexts[].findings] | flatten | length'# Full detailed output with suggested fixesunfault review --output full
# Focus on one dimensionunfault review --dimension stability --output fullunfault review --dimension performance --output fullunfault review --dimension correctness --output full
# Preview fixes without applyingunfault review --dry-run# What breaks if I change this file?unfault graph impact src/core/auth.py
# Find the most connected filesunfault graph critical --limit 10
# What uses this library?unfault graph library requestsunfault graph library httpx
# External dependencies of a fileunfault graph deps src/api/client.py
# Graph statisticsunfault graph stats# Configure LLM for AI-powered review summariesunfault config llm openai --model gpt-4ounfault config llm anthropic --model claude-3-5-sonnet-latestunfault config llm ollama --model llama3.2
# View current configunfault config showunfault config llm show
# Check observability integrationsunfault config integrations showunfault config integrations verify| Flag | What it does |
|---|---|
--output full | Detailed output with fix suggestions |
--output json | Machine-readable JSON |
--output sarif | SARIF 2.1.0 for GitHub/IDE integration |
--output concise | Brief statistics only |
--dimension X | Focus on one dimension |
--dry-run | Preview fixes without applying |
--fix | Auto-apply suggested fixes |
--offline | Skip SLO and trace fetching |
--refresh-cache | Re-fetch observability data |
| Code | Meaning |
|---|---|
| 0 | Success, no findings |
| 5 | Success, findings detected |
| 1 | General error |
| 2 | Config error |
| 4 | Network error |
| 6 | Invalid input |