[output] section controls how squirrelscan formats and saves audit reports.
Configuration
Options
format
Type: "console" | "json" | "html"
Default: "console"
Output format for audit reports.
Available Formats:
"console"- Rich terminal output with colors and formatting"json"- Machine-readable JSON for automation"html"- Interactive HTML report in browser
"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
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