CLI commands
All commands support global flags and read the project at --cwd (default: current directory).
Global flags
| Flag | Description |
|---|---|
--cwd <path> | Project root to scan (required for monorepos) |
--config <path> | Path to cf-ready.config.json (optional) |
--json | JSON-only stdout (no headings or colors) |
--verbose | Extra logging |
--no-color | Disable ANSI colors |
--version | Print version and exit |
--help | Command help |
scan
Run the full readiness pipeline and write all reports.
cf-ready scan [--cwd .] [--config ./cf-ready.config.json] [--json]
| Aspect | Detail |
|---|---|
| Modules | Migration, security, AI readiness, SEO, deployment |
| Output | 9 files — see Reports |
Exit 0 | productionReady: true |
Exit 1 | Blockers 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]
| Flag | Generates |
|---|---|
--ai-readiness | public/robots.txt, llms.txt, llms-full.txt, sitemap.xml, openapi.json, mcp-server-card.json, auth.md |
--seo | SEO suggestions markdown, optional meta snippets |
--force | Overwrite 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
| Command | Writes reports | CI exit codes |
|---|---|---|
scan | All 9 | 0 / 1 / 2 |
inspect | No | 0 / 2 |
migration-plan | migration-plan.md | 0 / 2 |
security-scan | SARIF | 0 / 1 / 2 |
ai-ready | ai-readiness-report.md | 0 / 2 |
seo-ready | seo-readiness-report.md | 0 / 2 |
deploy-check | No (stdout) | 0 / 1 / 2 |
report | All 9 | 0 / 1 / 2 |
fix | Generated assets | 0 / 2 |
ai-optimize | cf-ready-ai-optimize.md | 0 / 2 |
smoke-test | No (stdout) | 0 / 1 / 2 |