Configuration
Optional cf-ready.config.json in your project root. Override path with --config. All fields are optional — CF Ready auto-detects framework and target when omitted.
Full example (Next.js)
{
"projectName": "Next.js Cloudflare App",
"productionUrl": "https://example.com",
"framework": "nextjs",
"target": "cloudflare-workers",
"outputDir": ".",
"migration": {
"preferredPath": "vinext",
"fallbackPath": "opennext",
"allowAutoMigration": false
},
"aiPolicy": "allow-assistive-agents",
"seo": {
"defaultTitle": "Next.js Cloudflare App",
"defaultDescription": "A production-ready Next.js app for Cloudflare.",
"defaultImage": "/og.png",
"organizationName": "OrangeCloud"
},
"criticalRoutes": ["/", "/login", "/dashboard", "/api/health"],
"security": {
"blockOnSecrets": true,
"blockOnCriticalDependencies": true
},
"ai": {
"workerUrl": "https://your-worker.workers.dev",
"model": "openai/gpt-4o-mini",
"gatewayId": "default"
}
}
Repository copies: examples/nextjs, examples/vite.
Field reference
| Field | Type | Description |
projectName | string | Display name in reports and generated assets |
productionUrl | URL | Canonical production URL for sitemap, llms.txt, smoke tests |
framework | enum | nextjs, vite, react-spa, astro, remix, express, nodejs, static, … |
target | enum | cloudflare-workers, cloudflare-pages, vercel, netlify, … |
outputDir | string | Where reports are written (default: .) |
aiPolicy | enum | allow-assistive-agents | restrict | block — affects robots.txt drafts |
criticalRoutes | string[] | Paths for smoke-test and sitemap generation (default: ["/"]) |
migration
| Field | Description |
preferredPath | e.g. vinext, cloudflare-pages |
fallbackPath | e.g. opennext when vinext is risky |
allowAutoMigration | Always false in MVP — CF Ready never auto-migrates |
seo
Defaults used by fix --seo and SEO finding recommendations.
| Field | Description |
defaultTitle | Suggested page title |
defaultDescription | Meta description draft |
defaultImage | OG image path (e.g. /og.png) |
organizationName | JSON-LD Organization name |
security
| Field | Default | Description |
blockOnSecrets | true | Fail production-ready on high/blocker security findings |
blockOnCriticalDependencies | true | Fail on critical npm audit issues |
ai
| Field | Description |
workerUrl | CF Ready worker for ai-optimize (e.g. deployed Web Agent worker) |
model | Workers AI model id (default: openai/gpt-4o-mini) |
apiToken | Optional Bearer token for worker auth |
gatewayId | AI Gateway id (default: default) |
Config discovery. CF Ready looks for cf-ready.config.json in --cwd. Missing config is valid. Explicit --config to a missing file throws an error.