{
  "slug": "railway-config-migrate-translates-cac-files-to-iac-d79bda877953",
  "title": "railway config migrate translates CaC files to IaC",
  "tools": [
    "railway"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-21T17:21:50.000Z",
  "announced_at": "2026-08-21T17:21:50.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a repository contains `railway.json` or `railway.toml`, run `railway config migrate` to preview its translation to IaC. Run `railway config migrate --apply` to write the generated file and clear the linked service’s Railway Config File setting.",
    "examples": [
      "railway config migrate",
      "railway config migrate --apply",
      "railway config migrate --lang py --apply"
    ],
    "gotchas": [
      "Version: v5.42.0",
      "--apply: Writes the generated file and clears Railway Config File settings; without it, the command previews the file.",
      "--lang <py|go>: Selects Python or Go output; TypeScript is the default. Python and Go authoring are beta.",
      "--service <name>: Migrates only the named service; a single-service migration writes a named `partial` export.",
      "--delete-files: Optionally deletes the old Config as Code files when used with `--apply`.",
      "Migration defaults to dry-run.",
      "The CaC to graph/DSL translation runs in the CLI; thin language SDKs remain authoring-only."
    ]
  },
  "why_it_matters": "When a repository uses `railway.json` or `railway.toml`, migrate its configuration to IaC.",
  "before": "For manual migration, the docs say to import the current project with `railway config pull --force`, translate the desired settings into the IaC DSL, remove the old config file, and clear a custom config-file path in service settings if set.",
  "sources": [
    "https://github.com/railwayapp/cli/releases/tag/v5.42.0",
    "https://github.com/railwayapp/cli/pull/1111",
    "https://github.com/railwayapp/docs/blob/main/content/docs/infrastructure-as-code.md"
  ],
  "rank": 0.92044,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-20261016",
    "verdict_id": "wave1b-20261016:wave1b-20261016-ef87b32155206479-0:gate",
    "evidence_hash": "cefe210551a140f26500fe36a2a43f913fe38bd401fe7bf67d542205221d3766"
  },
  "review": {
    "draft_hash": "c98161bc6b87cd9a9633c94857b7bb0311b0cad55b37f0f918fdba155619c80a",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.92 >= 0.9; 2 needed) and Jev gave 0.66 (>= 0.6 needed)."
  }
}
