Skip to content

CLI Reference

FAT Agent includes a suite of Python scripts that form the analysis pipeline. All scripts live under plugins/fat-agent-with-superpowers/scripts/ and use Python stdlib only (no pip dependencies for core scripts).


Core Pipeline

The standard audit pipeline chains three scripts:

python scripts/analyse-html.py page.html \
  | python scripts/calculate-score.py \
  | python scripts/generate-badge.py --output badge.svg

analyse-html.py

Extracts audit signals from an HTML file.

# From file
python scripts/analyse-html.py page.html

# From URL (enables mixed content detection)
python scripts/analyse-html.py --url https://example.com page.html

# From stdin
curl -s https://example.com | python scripts/analyse-html.py

# With specific modules
python scripts/analyse-html.py page.html --modules seo,security,links

# With a profile
python scripts/analyse-html.py page.html --profile quick

Output: JSON analysis report to stdout.

Flag Description
--url URL Page URL for domain extraction and mixed content detection
--modules LIST Comma-separated module IDs to run
--profile NAME Audit profile name (quick, full, local, ecommerce, seo, security, accessibility, content)

calculate-score.py

Scores an analysis report produced by analyse-html.py.

python scripts/calculate-score.py report.json
python scripts/calculate-score.py < report.json
cat report.json | python scripts/calculate-score.py

Output: JSON scores object with per-category scores, overall score, and grade.

Flag Description
--modules LIST Only score these modules
--profile NAME Score using this profile's module set

generate-badge.py

Generates an SVG score badge from a scores JSON.

python scripts/generate-badge.py scores.json
python scripts/generate-badge.py scores.json --category seo
python scripts/generate-badge.py scores.json --output badge.svg
Flag Description
--category NAME Generate badge for a specific category
--output PATH Write SVG to file instead of stdout

Extended Tools

Script Purpose Docs
crawl.py Multi-page BFS crawler Crawler
bulk_audit.py Multi-site batch auditing Bulk Audit
lighthouse.py Lighthouse CLI wrapper Lighthouse
visual_regression.py Screenshot comparison Visual Regression
ci_gate.py CI/CD threshold gate CI Gate
generate_html_dashboard.py HTML dashboard report Dashboard
generate-report.py Word/PowerPoint reports Reports
generate-charts.py Chart generation Reports
client_facing.py Jargon-to-plain-English Client-Facing API
profiles.py Profile definitions Profiles

Environment

All scripts require Python 3.10+ and use only the standard library. No pip install is needed for the core pipeline.

Optional dependencies:

  • Playwright -- for visual regression screenshots
  • Node.js + Lighthouse -- for Core Web Vitals measurement