CLI commands

All commands support global flags and read the project at --cwd (default: current directory).

Global flags

FlagDescription
--cwd <path>Project root to scan (required for monorepos)
--config <path>Path to cf-ready.config.json (optional)
--jsonJSON-only stdout (no headings or colors)
--verboseExtra logging
--no-colorDisable ANSI colors
--versionPrint version and exit
--helpCommand help

scan

Run the full readiness pipeline and write all reports.

cf-ready scan [--cwd .] [--config ./cf-ready.config.json] [--json]
AspectDetail
ModulesMigration, security, AI readiness, SEO, deployment
Output9 files — see Reports
Exit 0productionReady: true
Exit 1Blockers or security policy failure

inspect

Repository metadata only — no category scans, no report files.

cf-ready inspect --json

Detects framework, package manager, deployment target, API routes, and key config files. Output is always JSON (even without --json for structured fields).

migration-plan

cf-ready migration-plan

Runs migration checks and writes migration-plan.md with framework-specific steps (e.g. Next.js vinext path, Vite → Pages).

security-scan

cf-ready security-scan [--json]

Security module only. Writes security-findings.sarif for GitHub code scanning and CI.

Checks: env files, secret patterns, CORS, source maps in public output, security headers config, npm audit when available.

ai-ready

cf-ready ai-ready

AI readiness category only. Writes ai-readiness-report.md. Checks robots.txt, llms.txt, sitemap, OpenAPI, MCP card.

seo-ready

cf-ready seo-ready

SEO category only. Writes seo-readiness-report.md. Checks titles, meta, OG, Twitter cards, canonical, JSON-LD, sitemap, robots.

deploy-check

cf-ready deploy-check

Subset for deploy gates: deployment + migration + security findings. Useful in release pipelines before wrangler deploy.

report

cf-ready report

Re-runs a full scan and regenerates all report files (same as scan for output).

fix

Generate draft assets only when flags are explicit. Never runs without a flag.

cf-ready fix --ai-readiness [--force]
cf-ready fix --seo [--force]
cf-ready fix --ai-readiness --seo [--force]
FlagGenerates
--ai-readinesspublic/robots.txt, llms.txt, llms-full.txt, sitemap.xml, openapi.json, mcp-server-card.json, auth.md
--seoSEO suggestions markdown, optional meta snippets
--forceOverwrite existing generated files (default: skip)

Exit 2 if neither --ai-readiness nor --seo is set.

ai-optimize

Call Cloudflare Workers AI (via configured worker URL) for migration/refactor suggestions.

cf-ready ai-optimize [--focus migration|security|all]
  [--worker-url https://your-worker.workers.dev]
  [--model openai/gpt-4o-mini]
  [--ai-token TOKEN]
  [--dry-run]

Writes cf-ready-ai-optimize.md. Requires ai.workerUrl in config or --worker-url. Use --dry-run to preview the payload without calling AI.

smoke-test

cf-ready smoke-test --url https://your-app.example.com [--json]

HTTP checks against live URL using criticalRoutes from config (default: /). Reports status codes and response times. --url is required.

Command summary

CommandWrites reportsCI exit codes
scanAll 90 / 1 / 2
inspectNo0 / 2
migration-planmigration-plan.md0 / 2
security-scanSARIF0 / 1 / 2
ai-readyai-readiness-report.md0 / 2
seo-readyseo-readiness-report.md0 / 2
deploy-checkNo (stdout)0 / 1 / 2
reportAll 90 / 1 / 2
fixGenerated assets0 / 2
ai-optimizecf-ready-ai-optimize.md0 / 2
smoke-testNo (stdout)0 / 1 / 2