{
  "slug": "cf-init-creates-and-sets-up-worker-projects-73f22863bdc9",
  "title": "cf init creates and sets up Worker projects",
  "tools": [
    "cf"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-27T20:00:20.957Z",
  "announced_at": "2026-09-27T20:00:20.957Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When creating a Worker in a new or empty directory, run `cf init <directory>`; after setup, enter the project and run `cf dev`.",
    "examples": [
      "cf init my-worker\ncd my-worker\ncf dev",
      "cf init my-worker --no-install\ncd my-worker\nnpm install\ncf dev"
    ],
    "gotchas": [
      "Version: 1.0.0-beta.2",
      "Availability: Uses `@cloudflare/vite-plugin` v2 beta.",
      "Requires The command installs dependencies with the package manager you pick unless `--no-install` is used.",
      "directory: Target directory; if omitted, cf prompts for one. For hello-world creation it must be new or empty (only `.git` may exist).",
      "--no-install: Skips dependency installation; run a package manager's install command in the project before `cf dev`.",
      "Prerequisite: Install `cf`; the official CLI README requires Node.js 22 or newer.",
      "Prerequisite: You do not need to sign in until deployment.",
      "A new or empty directory is required for hello-world Worker creation; a `.git` directory is allowed.",
      "Directories that already contain files are configured with autoconfig instead.",
      "Without `--no-install`, dependencies are installed with the selected package manager.",
      "With `--no-install`, `cf dev` or the project's `typecheck` script generates `.cloudflare/types/index.d.ts` later.",
      "The default initializer `cf init workers [directory]` currently behaves the same way."
    ]
  },
  "why_it_matters": "Create and set up a hello-world Worker in a new or empty project directory.",
  "sources": [
    "https://github.com/cloudflare/cf/blob/main/packages/cli/CHANGELOG.md#100-beta2",
    "https://developers.cloudflare.com/cf/get-started/first-worker/",
    "https://github.com/cloudflare/cf/blob/main/packages/cli/README.md"
  ],
  "rank": 0.9306,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "recover-20261008",
    "verdict_id": "recover-20261008:recover-20261008-eceeda192225b411-7:gate",
    "evidence_hash": "d04c0fb39e2077cf20dad96236fe6f221b1cea3b7fa62ec1af7ecaca08c56073"
  },
  "review": {
    "draft_hash": "51bcebdf41d13ca23460a60753b71bb5944b8024ece98c4d1048d375c04876d5",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "recover-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.93 >= 0.9; 2 needed) and Jev gave 0.80 (>= 0.6 needed)."
  }
}
