CLI (npx aiscan)

CLI (npx aiscan)

Scan from your terminal or CI with npx aiscan — flags, output modes, CI gates, and exit codes.

The AIScan CLI runs the exact same engine as the website against the stable v1 public API. Zero dependencies, Node 18+, nothing to install.

Quick start

npx aiscan example.com

You get a scored report in your terminal: overall score and grade, the five dimension bars, every failing check with the evidence we observed and the fix, plus a link to the full shareable report.

Prefer not to use npm? Pipe the script straight from us:

curl -fsSL https://aiscan.site/cli.mjs | node - example.com

Options

--page                 Grade one specific URL instead of the whole site (Pro)
--fresh                Bypass the 5-minute result cache
--json                 Raw JSON report (pipe into jq)
--md                   Markdown report (great for PR comments)
--fix                  Print a copy-paste prompt for Claude Code / Cursor
--key <key>            API key (or set AISCAN_API_KEY)
--private / --public   Visibility of the saved report
--min-score <n>        Exit 1 if the score is below n
--fail-on essential|any
-q, --quiet            Score line only
--no-color, -h, -v

Multiple URLs are allowed: npx aiscan site-a.com site-b.com. Gates apply to the lowest score.

Output modes

npx aiscan example.com --json | jq '.checks[] | select(.status=="fail") | .id'
npx aiscan example.com --md   >> report.md
npx aiscan example.com --quiet

The JSON is the full ScanResult — including tier (essential / recommended / bonus), evidence, specs citations and naReason. See Scoring.

Use in CI

# .github/workflows/agent-readiness.yml
name: Agent readiness
on: [push]
jobs:
  aiscan:
    runs-on: ubuntu-latest
    steps:
      - name: Scan
        env:
          AISCAN_API_KEY: ${{ secrets.AISCAN_API_KEY }}
        run: npx aiscan https://example.com --min-score 85 --fail-on essential --md >> $GITHUB_STEP_SUMMARY

Add an API key so CI isn't subject to the anonymous 5 scans/min per-IP limit. Generate one at your profile.

Agent fix loop

--fix turns the report into a prompt an AI coding agent can act on directly — every failing check with the observed evidence, the required outcome, and the re-verify command.

npx aiscan example.com --fix | pbcopy   # then paste into Claude Code / Cursor

Agents that speak MCP can skip the copy-paste entirely — see MCP Server and Agent Skill.

Plans & limits

  • Anonymous — 5 scans/min per IP. Saved reports are public.
  • Free account — API key (no per-IP limit), private reports by default, scan history, and manual re-scans of tracked domains.
  • Pro--page per-page scans, scheduled monitoring with grade-change email alerts, and higher scan limits.

Without a Pro key, --page returns HTTP 403 with a clear message rather than silently downgrading to a site scan.

Exit codes

  • 0 — scan completed and all gates passed
  • 1 — a gate failed (--min-score / --fail-on) or the plan doesn't allow the request
  • 2 — bad usage (missing or invalid URL, unknown flag)
  • 3 — network or API error