[output] section controls how squirrelscan formats and saves audit reports.
Configuration
Options
format
Type: "console" | "text" | "json" | "html" | "markdown" | "llm" | "xml"
Default: "console"
Output format for audit reports.
Available Formats:
"console"- Rich terminal output with colors and formatting"text"- Plain text output without colors"json"- Machine-readable JSON for automation"html"- Interactive HTML report in browser"markdown"- Markdown format for documentation"llm"- Compact token-optimized XML/text for AI agents (40% smaller than xml)"xml"- Verbose structured XML for enterprise integration
sarif format is only available via the report command, not during audit. See Reports documentation for details.
"console" (Default)
Rich terminal output optimized for human readability.
Features:
- Colored output (red/yellow/green for fail/warn/pass)
- Progress indicators during crawl
- Summary statistics
- Issue grouping by rule
- Interactive formatting
- Local development
- Manual audits
- Terminal-based workflows
- Quick visual feedback
"json"
Machine-readable JSON output for automation and integrations.
Features:
- Complete crawl data
- All rule results
- Structured error information
- Health score calculation
- Timestamps and metadata
- CI/CD pipelines
- Automated testing
- Data analysis
- Integration with other tools
- API responses
"html"
Interactive HTML report that opens in your browser.
Features:
- Visual charts and graphs
- Filterable issue list
- Page-by-page breakdown
- Click-to-navigate
- Responsive design
- Shareable standalone file
- Health score gauge
- Issue distribution charts
- Rule category breakdown
- Page list with status
- Link analysis graphs
- Image optimization metrics
path is not specified, HTML report is saved to:
- Client presentations
- Team sharing
- Visual analysis
- Stakeholder reports
- Archive audits
"llm"
Compact token-optimized format for AI agents - hybrid XML/text structure designed to minimize tokens while maintaining structured data.
Features:
- 40-70% smaller than verbose XML format
- 1-space indentation for token efficiency
- Inline attributes instead of nested elements
- Text prefixes (
Desc:,Fix:,Pages:,Items:) - Comma-separated lists for pages and URLs
- Hybrid XML/text structure for easy parsing
- XML format: 209KB
- LLM format: 125KB (40% reduction)
- Piping to Claude Code, Cursor, GPT, or other AI assistants
- Token-limited API contexts (cost optimization)
- Agent-based workflows requiring structured output
- AI code review and analysis
"xml"
Verbose structured XML format for enterprise integration, archival, and strict schema validation.
Features:
- 2-space indentation for readability
- Fully nested elements (all metadata in dedicated tags)
- Explicit structure with strict schema compliance
- All information preserved without abbreviation
- Enterprise-ready for XML parsers and validators
| Aspect | LLM Format | XML Format |
|---|---|---|
| Size (51 pages) | 125KB | 209KB |
| Indentation | 1 space | 2 spaces |
| Structure | Hybrid XML/text | Pure XML |
| Metadata | Inline attributes | Nested elements |
| Best For | AI agents, tokens | Enterprise, archival |
- Enterprise data integration and ETL pipelines
- Long-term audit archival with full metadata
- Schema validation and compliance requirements
- XML processing tools and libraries
- Integration with enterprise systems (SAP, Oracle, etc.)
path
Type: string
Default: "" (empty = stdout for console/json, auto-generate for html)
Required: No
Output file path for saving reports.
Behavior:
Empty (default):
consoleformat → stdout (terminal)jsonformat → stdouthtmlformat →reports/audit-{timestamp}.html
- Saves to exact path provided
- Creates directories if needed
- Overwrites existing files
Configuration Examples
Console Output (Default)
Terminal output with colors:JSON for CI/CD
Save JSON report for automated testing:HTML for Sharing
Generate shareable HTML report:Multiple Outputs
Use CLI to generate multiple formats:CLI Override
CLI flags override config file: Config file:- CLI flags (
--format,--output) - Highest - Config file (
[output]section) - Built-in defaults - Lowest
Format Comparison
| Feature | Console | JSON | HTML |
|---|---|---|---|
| Human readable | ✓ | ✗ | ✓ |
| Machine readable | ✗ | ✓ | ✗ |
| Colors | ✓ | ✗ | ✓ |
| Interactive | ✗ | ✗ | ✓ |
| Shareable | ✗ | ✓ | ✓ |
| CI/CD friendly | ✗ | ✓ | ✗ |
| Charts/graphs | ✗ | ✗ | ✓ |
| File size | Small | Medium | Large |
| Parse complexity | N/A | Easy | Medium |
Output Schema
JSON Output Schema
Full JSON output structure:- Automated analysis
- Data warehousing
- Custom reporting
- Integration testing
HTML Report Structure
HTML reports include: 1. Overview Section- Health score gauge
- Total pages/links/images
- Crawl duration
- Issue count by severity
- Grouped by rule
- Sorted by severity
- Expandable details
- Quick filters
- Full page list
- Status codes
- Title/description
- Check results per page
- All rules run
- Pass/fail counts
- Category breakdown
- Internal link graph
- Broken links list
- Redirect chains
- External links
- Image list with previews
- Missing alt text
- File size analysis
- Format recommendations
Automation Examples
CI/CD Pipeline
Extract health score in CI:Compare Audits
Compare two audits using JSON:Generate Multiple Reports
Run once, output multiple formats:Troubleshooting
HTML not opening in browser
Solution: Open manually:JSON output too large
Cause: Large sites generate large JSON files Solution: Use console format or filter JSON:Path permission denied
Cause: No write permission to output directory Solution: Use writable directory or fix permissions:Complete Example
Related
- Crawler Settings - Control what gets crawled
- Rules Configuration - Control what gets checked
- Examples - Common use cases