{
  "slug": "railway-config-commands-manage-project-infrastructure-as-code-e6a42d3df4d1",
  "title": "railway config commands manage project infrastructure as code",
  "tools": [
    "railway"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-05T12:50:23.000Z",
  "announced_at": "2026-06-05T12:50:23.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When managing Railway infrastructure from a repository, create `.railway/railway.ts` or import the linked project, then preview and apply its changes. Migrate services managed by `railway.json` or `railway.toml` before planning configuration changes.",
    "examples": [
      "railway config init",
      "railway config pull",
      "railway config plan && railway config apply --yes"
    ],
    "gotchas": [
      "Version: v5.2.0",
      "--yes: Apply without prompting for confirmation.",
      "Prerequisite: Install the Railway CLI; authenticate and link the current directory to the Railway project and environment. If unlinked, `pull` and `plan` prompt for a project and environment.",
      "Prerequisite: Install the TypeScript SDK from the repository root with `npm install railway`.",
      "`railway config plan` is safe and does not change Railway.",
      "`railway config apply` asks before applying unless `--yes` is passed.",
      "`railway up` deploys this directory when the service has no GitHub or image source.",
      "Services already managed by `railway.json` or `railway.toml` must be migrated before `.railway/railway.ts` can manage them.",
      "Advanced placement can still specify region names.",
      "Secrets imported from Railway may be omitted or represented with `preserve()` so they are not overwritten.",
      "Docs conflict: Current CLI documentation says `railway up` behavior is unchanged, while the supplied release note says it previews pending configuration changes and asks before applying them. https://github.com/railwayapp/cli/blob/master/assets/iac/README.md",
      "Docs conflict: The current TypeScript SDK documentation requires Railway CLI 5.42.1 or newer, which differs from the card's stated v5.2.0. https://github.com/railwayapp/railway-ts-sdk"
    ]
  },
  "why_it_matters": "When managing Railway infrastructure from a repository, create or import `.railway/railway.ts`, preview its changes, and apply them.",
  "before": "The `railway config` commands were not available.",
  "sources": [
    "https://github.com/railwayapp/cli/releases/tag/v5.2.0",
    "https://github.com/railwayapp/cli/pull/921",
    "https://github.com/railwayapp/cli/blob/master/assets/iac/README.md",
    "https://github.com/railwayapp/docs/blob/main/content/docs/infrastructure-as-code.md"
  ],
  "rank": 0.97062,
  "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-a83500d7e47c8f6f-0:gate",
    "evidence_hash": "ef484b718664e10614a051aeb63fab5ce1342d4adef898772b3cd10719947499"
  },
  "review": {
    "draft_hash": "36111cb633583e41f6208aa8e0ab29ab6d7ffb6f0093af01b76dc40a810104f6",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-20261016:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.83 (>= 0.6 needed)."
  }
}
