---
schema_version: 1
route: /t/railway.md
tool: "railway"
---

# sincecutoff.com /t/railway — Railway CLI

- name: Railway CLI
- kind: cli
- children: none
- homepage: <https://github.com/railwayapp/cli>

Changes to the tools coding agents drive, since a model's training cutoff, each linked to its first-party source. Check installed versions and limitations before acting; a cutoff date does not establish what a model knows.
Original editorial content: [Apache 2.0](https://sincecutoff.com/v1/data-license.txt), by [0xPatrick](https://0xpatrick.dev). Preserve applicable license and [NOTICE](https://sincecutoff.com/notice.txt) attribution when redistributing. Third-party source text and examples retain their own rights. [License scope and attribution](https://sincecutoff.com/v1/license.json).
To stay current, read the changes feed: [`/v1/changes.md?tool=railway`](https://sincecutoff.com/v1/changes.md?tool=railway) (or `.json`), adding `since=YYYY-MM-DD` for your training cutoff. Entries for registered children are included; the registry itself is `/v1/tools.json`. How to page and save your place: [llms.txt](https://sincecutoff.com/llms.txt).

### Railway IaC manages service CDN edge caching (2026-10-15)
- slug: railway-iac-manages-service-cdn-edge-caching-7f99c2aba009
- score: 0.94

How to use it:

When the environment config supports `cdn`, add the block to manage a service’s edge caching and reconcile it with the environment. Pull a cached service’s config to see the serialized block; defaults are omitted.

Examples:

```
cdn:
  enabled: true
  defaultTtlSeconds: <seconds>
  htmlCaching: <mode>
  staleWhileRevalidate: <boolean>
  purgeOnDeploy: <mode>
```

- why_it_matters: Manage a service’s edge caching settings through a Railway config file and reconcile them with the environment.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.69.0>, <https://github.com/railwayapp/cli/pull/1276>
- gotchas: "Version: v5.69.0"; "cdn.enabled: Enables caching; `false` is normalized away like removing the block."; "cdn.defaultTtlSeconds: Default edge TTL in seconds; default is `7200` and is omitted when serialized."; "cdn.htmlCaching: HTML caching mode; default is `\"auto\"` and is omitted when serialized."; "cdn.staleWhileRevalidate: Stale-while-revalidate setting; default is `true` and is omitted when serialized."; "cdn.purgeOnDeploy: Purge-on-deploy mode; default is `\"html\"` and is omitted when serialized."; "Prerequisite: The environment config must serialize `cdn`; until then, an authored block does not take effect."; "CDN settings are serialized only while caching is on."; "Only knobs that differ from the edge defaults are serialized; defaults are `defaultTtlSeconds: 7200`, `htmlCaching: \"auto\"`, `staleWhileRevalidate: true`, and `purgeOnDeploy: \"html\"`."; "The CDN update has `deployEffect: none`; settings live on the edge and do not reach the container."; "Until the environment config serializes `cdn`, an authored block does not take effect."

### railway cron list and run commands (2026-10-12)
- slug: railway-cron-list-and-run-commands-fabce9b44ef2
- score: 0.96

How to use it:

If the linked Railway service has a cron schedule, use `railway cron list` to view recent runs or `railway cron run --yes` to enqueue an off-schedule run.

Examples:

```
railway cron list
```

```
railway cron list --service <SERVICE> --environment <ENV> --limit 50
```

```
railway cron run --service <SERVICE> --yes
```

- why_it_matters: List or run cron jobs while working with a Railway project.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.65.0>, <https://docs.railway.com/cli/cron>, <https://docs.railway.com/cli>
- gotchas: "Version: v5.65.0"; "list: Subcommand to list recent runs, newest first; targets the linked service by default."; "run: Subcommand to trigger an off-schedule run now; targets the linked service by default."; "-s, --service <SERVICE>: Service name or ID; defaults to the linked service."; "-e, --environment <ENV>: Environment; defaults to the linked environment."; "-p, --project <PROJECT>: Project ID or name; defaults to the linked project."; "--limit <N>: For `list`, maximum runs to show; default 20, maximum 1000."; "--json: Output in JSON format."; "-y, --yes: For `run`, skip confirmation; required when stdout is not a terminal."; "Prerequisite: Authenticate with a Railway account before using the CLI; the CLI docs specify `railway login` or a token for CI/CD."; "Prerequisite: The target service must have a cron schedule configured in service settings or in a config file's `deploy` section; otherwise the command errors."

### railway config plan, apply, and pull accept --environment (2026-10-08)
- slug: railway-config-plan-apply-and-pull-accept-environment-7c22c475194c
- score: 0.91

How to use it:

When you need to target a specific Railway environment, add `--environment <ENV>` to `railway config plan`, `apply`, or `pull`. `<ENV>` can be the environment name or ID.

Examples:

```
railway config plan --environment <ENV>
```

```
railway config apply --environment <ENV>
```

```
railway config pull --environment <ENV>
```

- why_it_matters: Target an environment when planning, applying, or pulling Railway configuration.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.64.0>, <https://docs.railway.com/cli/global-options>, <https://github.com/railwayapp/docs/blob/main/content/docs/infrastructure-as-code.md>
- gotchas: "Version: v5.64.0"; "--environment <ENV>: Selects an environment by name or ID. The release note documents this option for `config plan`, `config apply`, and `config pull`."; "Prerequisite: Authenticate with `railway login` and link the current directory to the Railway project with `railway link`; if it is not linked, these config commands prompt for a project and environment."; "Docs conflict: Current official docs say config commands do not expose `--environment` selectors, while the v5.64.0 release note explicitly adds this option to plan, apply, and pull. The usage above follows the release note; the current docs may describe newer behavior."

### railway IaC project variables policy controls variable diffs (2026-10-08)
- slug: railway-iac-project-variables-policy-controls-variable-diffs-b3abcdfe5b21
- score: 0.92

How to use it:

When IaC should not own some or all project variables, set the project-level `variables` policy: `ignore` excludes matching keys from both sides of the diff, and `managed: false` prevents variable sets and deletes. A service declaring `env` or `variables` is an error when `managed` is false.

Examples:

```
project("example", { variables: { managed: true, ignore: ["SECRETS_*", "web/*"] }, resources: [...] })
```

```
railway config plan
```

```
railway config apply
```

- why_it_matters: Configure IaC variable ownership and ignored keys when planning or applying project configuration.
- before: Before this change, a desired service with no `env` could delete every remote variable; `preserve()` only protected variables per key.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.64.0>, <https://github.com/railwayapp/cli/pull/1256>, <https://docs.railway.com/infrastructure-as-code>
- gotchas: "Version: v5.64.0"; "variables.managed: Boolean ownership setting. `false` prevents variable sets and deletes; services declaring `env` or `variables` then cause an error. Defaults to `true` when the policy is absent."; "variables.ignore: Array of key patterns to exclude from both sides of the diff; ignored keys are never set or deleted. Defaults to `[]`."; "variables.ignore` pattern `KEY_GLOB`: Matches that key on every service. Only `*` is special; matching is case-sensitive and applies to the full key."; "variables.ignore` pattern `service/KEY_GLOB`: Matches keys only on the named resource. Only `*` is special; matching is case-sensitive and applies to the full key."; "Prerequisite: Install the CLI and authenticate; connect the current directory to the target project and environment with `railway link`."; "Prerequisite: Install the matching IaC authoring package: TypeScript `npm install railway`; Python `pip install railway-sdk`; Go `go get github.com/railwayapp/railway-go-sdk@v0.3.0`. Python and Go authoring are beta."; "`KEY_GLOB` matches that key on every service; `service/KEY_GLOB` matches only on the named resource."; "Only `*` is special; matching is case-sensitive and applies to the full key."; "Ignored keys are removed from both sides before diffing and are never set or deleted."; "With `managed: false`, a service declaring `env` or `variables` is an error."; "The policy defaults to `{ managed: true, ignore: [] }` when absent."

### railway trace adds per-environment tracing in IaC (2026-09-28)
- slug: railway-trace-adds-per-environment-tracing-in-iac-7bfcc301d79b
- score: 0.95

How to use it:

When configuring tracing for a Railway environment, set the service’s `tracing` switches in IaC or enable tracing for that environment with `railway trace`.

Examples:

```
const api = service("api", { tracing: { enabled: true, autoInstrumentation: true } });
```

```
railway trace enable --service <SERVICE> --environment <ENVIRONMENT>
```

- why_it_matters: Configure tracing separately for each environment in an IaC setup or through `railway trace`.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.63.0>, <https://docs.railway.com/infrastructure-as-code/reference>, <https://docs.railway.com/cli/trace>
- gotchas: "Version: v5.63.0"; "tracing.enabled: Enables edge tracing and adds `OTEL_*` variables on the service’s next deploy. Omitted or `false` means tracing is off."; "tracing.autoInstrumentation: Enables automatic instrumentation; it only takes effect while `enabled` is true. The docs do not say the two switches are mutually exclusive."; "--service <SERVICE>: Service name or ID; defaults to the linked service. Conflicts with `--all`."; "--environment <ENV>: Selects the environment; defaults to the linked environment."; "Prerequisite: IaC tracing requires CLI 5.63.0 or newer and a compatible SDK: TypeScript `railway` 3.12.0+, Python `railway-sdk` 0.4.0+, or Go `railway-go-sdk` v0.3.0+."; "Prerequisite: Changing tracing with `railway trace enable` requires a user or workspace token; a project token in `RAILWAY_TOKEN` cannot enable tracing."; "Prerequisite: Tracing is a preview feature under active development."

### railway trace adds tracing settings and traces (2026-09-23)
- slug: railway-trace-adds-tracing-settings-and-traces-47da1838bd29
- score: 0.91

How to use it:

When debugging a Railway project, use `railway trace status` to inspect tracing settings and `railway trace list` / `railway trace get <TRACE_ID>` to inspect traces. [Railway CLI trace docs](https://docs.railway.com/cli/trace)

Examples:

```
railway trace status
```

```
railway trace list --since 30m --errors
```

```
railway trace get <TRACE_ID>
```

- why_it_matters: Inspect tracing settings and traces while debugging a Railway project.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.60.0>, <https://docs.railway.com/cli/trace>
- gotchas: "Version: v5.60.0"; "railway trace status (required): Subcommand to show tracing settings and the last exported span times."; "railway trace list (required): Subcommand to list traces, newest first."; "--since <TIME>: Start of the time window; relative time or ISO 8601. Defaults to `1h`."; "--errors: Only include traces with an error span; adds `@status:error` to the filter."; "railway trace get <TRACE_ID> (required): Subcommand to show one trace; `<TRACE_ID>` is a required W3C trace ID of 32 hexadecimal characters."; "-s, --service <SERVICE>: Service name or ID; defaults to the linked service."; "-e, --environment <ENV>: Environment to use; defaults to the linked environment."; "-p, --project <PROJECT_ID>: Project to use; defaults to the linked project. When set, also pass `--environment`."; "--json: Output in JSON format."; "--service and --all: Mutually exclusive for applicable subcommands; `--all` selects every service in the environment."; "Prerequisite: Tracing is a preview feature under active development."; "Prerequisite: Commands use the linked service, environment, and project by default; pass `--service`, `--environment`, or `--project` to select them explicitly."; "Prerequisite: A project token in `RAILWAY_TOKEN` can run `status`, `list`, and `get`; changing tracing requires a user or workspace token."

### railway config partials adds IaC ownership commands (2026-09-21)
- slug: railway-config-partials-adds-iac-ownership-commands-0468cfeecf30
- score: 0.98

How to use it:

When an authoring file is missing or you need to change named IaC ownership, inspect the linked environment’s partials, then release selected ownership or transfer it to another partial; clear all named ownership, update the authoring configuration, and run a fresh plan before whole-project planning. These commands change ownership metadata only.

Examples:

```
railway config partials list
railway config partials list --json
```

```
railway config partials transfer <FROM> <TO> --resource <ADDRESS> --resource <ADDRESS> --dry-run
railway config partials transfer <FROM> <TO>
```

```
railway config partials release <NAME> --dry-run
railway config partials release <NAME>
```

- why_it_matters: When managing named IaC partials whose authoring file is missing, inspect ownership, transfer selected resources, or release ownership before returning to whole-project planning.
- before: The docs do not state a prior workflow for orphaned named ownership. They state that a fresh railway config plan is required after ownership changes; whole-project planning requires clearing all named ownership first.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.59.0>, <https://github.com/railwayapp/cli/pull/1226>, <https://github.com/railwayapp/cli/blob/v5.59.0/assets/iac/README.md>
- gotchas: "Version: v5.59.0"; "FROM (required): Source partial; every selected address must currently belong to it."; "TO (required): Destination partial; can be new or existing."; "NAME (required): Partial whose ownership will be released."; "--resource ADDRESS: Repeat to select addresses. Omit all instances to affect the entire source partial (transfer) or all ownership held by the named partial (release). Transfer selections must belong to FROM."; "--dry-run: Preview affected addresses without executing the ownership change; with --json, provides a read-only JSON preview."; "--json: List outputs ownership details and etag; for mutations it proceeds without prompting and includes affectedResources, resulting iacPartials, and wholeProjectAvailable. Use --dry-run for a read-only JSON preview."; "--yes: Confirms mutation without prompting."; "--base-config-etag: Supplies the preview’s baseConfigEtag for a separate CI review and execution step; CLI example pairs it with --yes --json."; "Prerequisite: Commands use the linked Railway project and environment, including environment-scoped RAILWAY_TOKEN credentials."; "Prerequisite: Release and transfer require environment ADMIN access."; "Prerequisite: Commands work when the original authoring file no longer exists."; "Commands use the linked project and environment, including environment-scoped `RAILWAY_TOKEN` credentials."; "Release and transfer require environment ADMIN access."; "Every selected address must currently belong to the source partial."; "The commands work without the original authoring file."; "Release and transfer do not delete resources, change resource configuration, redeploy anything, or edit local files."; "All named ownership must be cleared before whole-project planning is available."; "The supplied guide excerpt is truncated; additional confirmation, JSON/CI usage, and re-planning guidance may apply."

### railway code creates a fresh cloud-agent VM and adds project selection (2026-09-15)
- slug: railway-code-creates-a-fresh-cloud-agent-vm-and-adds-project-selection-7cbe05950b0f
- score: 0.91

How to use it:

When starting a Railway coding-agent session for repository work, run `railway code` to open `railway-agent-tui` on a fresh VM. In the picker, press `n` from the main screen or Option+N from an existing VM, session, or focused terminal; use `p` to choose the project and environment, and optionally toggle **Use bootstrap** and press `b` to choose one.

Examples:

```
railway code
```

```
railway ca
# Main screen: press n to open the new-VM picker.
```

- why_it_matters: When starting a Railway coding-agent session for repository work, launch a fresh VM with the intended project and environment, optionally selecting a bootstrap.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.57.2>, <https://github.com/railwayapp/cli/pull/1203>, <https://github.com/railwayapp/cli/blob/v5.57.2/docs/cloud-agents.md>
- gotchas: "Version: v5.57.2"; "Cloud Agents access (required): Required to use the cloud-agent commands."; "n: Opens the new-VM picker from the `railway ca` main screen."; "Option+N: Opens the new-VM picker from an existing session; the picker starts with that VM's project and environment."; "p: Selects the project and environment for this VM; the saved default project appears first, and this choice does not change it."; "Use bootstrap: Toggle with arrow keys and Enter or click; when enabled, the Select Bootstrap row appears."; "b: Opens the bootstrap list from the Select Bootstrap row."; "Prerequisite: Cloud Agents access is required."; "Bare `railway code` opens `railway-agent-tui` on a new VM."; "Piped sessions and agent arguments after `--` use the terminal directly."; "The picker starts with the current VM's project and environment when opened from an existing VM, session, or focused terminal."; "Choosing a project applies to this VM and does not change the saved default project."; "Changing environments clears a named bootstrap selection."

### railway sandbox create and fork accept public domains (2026-09-11)
- slug: railway-sandbox-create-and-fork-accept-public-domains-5c9386fca72a
- score: 0.97

How to use it:

When creating or forking a sandbox that needs public HTTPS routes and private-network access, pass `--private-network` and repeat `--domain [PREFIX:]PORT` for each route. Read the published URLs from human or JSON output; if routes are still publishing, check `railway sandbox list` for the URLs.

Examples:

```
railway sandbox create --private-network --domain <PORT>
```

```
railway sandbox fork <SOURCE_SANDBOX_ID> --private-network --domain <PREFIX>:<PORT> --json
```

- why_it_matters: Create or fork a sandbox with public HTTPS routes while keeping it on the private network.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.54.0>, <https://github.com/railwayapp/cli/pull/1197>, <https://docs.railway.com/cli/sandbox>, <https://docs.railway.com/sandboxes/quickstart>
- gotchas: "Version: v5.54.0"; "--domain [PREFIX:]PORT: Repeatable; publishes an HTTP domain on a port, optionally with a prefix. Requires `--private-network`. Prefixes must be unique, 1–46 lowercase letters, digits, or hyphens, with no leading or trailing hyphen; ports must be unique and from 1 to 65535. Up to 10 domains are supported."; "--private-network: Joins the environment's private network. Required when using `--domain`; forks do not inherit the source sandbox's network mode."; "<SOURCE_SANDBOX_ID>: Optional source sandbox ID for `fork`; defaults to the active sandbox. The source sandbox must be running."; "--json: Outputs the created sandbox as JSON."; "Prerequisite: Install the Railway CLI, sign in, and select/link the project and environment to use."; "Prerequisite: The source sandbox must be running to fork it."; "Prerequisite: Public domains require `--private-network`. Creation can report `domains: publishing`; run `railway sandbox list` to see the URLs."; "Requires `--private-network`."; "Routes may still be publishing when creation reports the URLs."

### railway ca bootstrap save, list, and default commands manage reusable cloud-agent starting points (2026-09-11)
- slug: railway-ca-bootstrap-save-list-and-default-commands-manage-reusable-cloud-agent-6baaf5f4a620
- score: 0.96

How to use it:

When starting a repository coding session, save and select a ready bootstrap with `railway ca bootstrap`, or pass `--no-bootstrap` for a clean VM. Launch with `railway code` or `railway ca create` using the selected bootstrap option.

Examples:

```
railway ca bootstrap save <name> --agent <agent-name> [--default]
railway ca bootstrap list
railway ca bootstrap default <name>
```

```
railway code --codex --bootstrap <name>
```

```
railway ca create <vm-name> --bootstrap <name>
railway code --codex --no-bootstrap
```

- why_it_matters: Start a repository coding session from a reusable cloud-agent environment or a clean VM.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.53.0>, <https://github.com/railwayapp/cli/pull/1195>, <https://github.com/railwayapp/cli/blob/master/docs/cloud-agents.md>
- gotchas: "Version: v5.53.0"; "<name> (required): Bootstrap name to save or select."; "--agent <agent-name> (required): Select the running VM to capture when saving."; "--default: Set this machine's local default after capture succeeds."; "--bootstrap <name>: Choose a named bootstrap for a new VM."; "--no-bootstrap: Skip the saved default bootstrap."; "--environment <environment>: Select another environment for bootstrap operations."; "--json: Request structured output from bootstrap list, save, or default."; "Option+N: Current docs say this opens a new-VM picker from an existing session."; "Prerequisite: Cloud Agents access is required."; "Prerequisite: Bootstraps capture running VMs; saving waits for capture to finish."; "Failed captures are hidden from the TUI bootstrap pickers."; "Ready bootstraps and captures still saving appear before **No Default**, with **Create New** last."; "Defaults change only after capture succeeds."; "The `--bootstrap` and `--no-bootstrap` launch choices do not change the stored default."; "Docs conflict: The release note says Option+N opens a new session on the same VM; current official docs say it opens the new-VM picker and creates a fresh VM. Version-specific behavior after v5.53.0 is not established by the current page."

### railway code explicit harness launches default to fresh VMs and use native clients (2026-09-11)
- slug: railway-code-explicit-harness-launches-default-to-fresh-vms-and-use-native-clien-a76c4733f3cb
- score: 0.91

How to use it:

When launching with an explicit harness flag, `railway code` creates a fresh VM by default. Use `connect [agent]` to reconnect to an existing backend, `--agent <name-or-id>` to select an agent for setup, or `railway ca ssh <agent>` for a shell; resume a remote Codex thread with `/resume` or select it in the CA sidebar.

Examples:

```
railway code --opencode2 --name my-box
```

```
railway code --codex connect <agent>
```

```
railway ca ssh <agent>
```

- why_it_matters: Launch a cloud coding agent with a selected harness and work with its remote conversations.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.53.0>, <https://github.com/railwayapp/cli/pull/1193>, <https://github.com/railwayapp/cli/blob/v5.53.0/README.md>
- gotchas: "Version: v5.53.0"; "--codex, --opencode, --opencode2, --claude, --grok, --railway (required): Select the harness; each explicit harness flag starts a fresh VM by default. Choose the flag for the desired harness."; "connect [agent]: Reconnect to an existing backend; the agent name or ID can be supplied to target it."; "--agent <name-or-id>: Select an existing agent for explicit server setup."; "--new: Accepted but optional when launching with an explicit harness flag."; "remote: A harness launch in remote mode; fresh VM default applies."; "desktop-only: Codex Desktop-only setup mode; fresh VM default applies."; "--: Passes subsequent arguments to the harness; fresh VM default applies to harness arguments after it."; "<agent> (required): Agent name or ID for `railway ca ssh`; opens a login shell."; "/resume: Codex command to reopen a remote thread."; "Prerequisite: Authenticate with a Railway account using `railway login` before using the CLI."; "Fresh VM defaults apply to explicit harness flags, including `remote`, Codex `desktop-only`, and harness arguments after `--`."; "Bare launches and shared CA/Desktop provisioning retain their existing targeting behavior."; "If the matching local terminal client is missing, Railway offers to install it; declining, Esc, or Ctrl+C at the prompt leaves the server running and prints connection details."; "An occupied port or a different running project directory requires another agent."

### railway CLI adds Codex remote terminal and Desktop setup (2026-09-10)
- slug: railway-cli-adds-codex-remote-terminal-and-desktop-setup-6e42c5b990d0
- score: 0.97

How to use it:

When setting up or reconnecting a Railway cloud agent for Codex, use `railway code --codex` with the documented creation, `connect`, or `desktop-only` form; retrieve saved details with `railway code get-config [<agent-name-or-id>]`. Desktop-only saves SSH and project configuration for Codex Desktop’s next startup and leaves the backend running.

Examples:

```
railway code --codex --new
railway code --codex --agent <agent-name> --dir <remote-directory>
railway code --codex connect [<agent-name-or-id>]
```

```
railway code --codex desktop-only --new
railway code --codex desktop-only --agent <agent-name> --dir <remote-directory>
```

```
railway code get-config [<agent-name-or-id>]
```

- why_it_matters: Set up or reconnect a local Codex terminal or Desktop client to a persistent Railway cloud agent.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.52.0>, <https://github.com/railwayapp/cli/pull/1188>, <https://github.com/railwayapp/cli/blob/v5.52.0/README.md>
- gotchas: "Version: v5.52.0"; "--codex (required): Select Codex setup or connection."; "--new: Create a fresh VM for the new agent setup."; "--agent <name-or-id>: Select an existing agent for setup; used instead of `--new`."; "--dir <remote-directory>: Select the remote project directory."; "connect [<agent-name-or-id>]: Reconnect to a running Codex server; without an argument, discover running servers."; "desktop-only: Run Desktop setup without prompting to install or launch a local terminal client."; "get-config <agent-name-or-id>: Select saved connection details by agent name or ID; omit to retrieve the most recently saved connection."; "--name <name>: Override the generated Codex agent name."; "Prerequisite: Install the Railway CLI and authenticate with `railway login`."; "Prerequisite: Codex server must support `--ws-auth` and `--ws-token-file`; terminal mode uses a local client matching the server version."; "Terminal setup carries available local Codex sign-in and configured skills/MCP sync."; "Terminal setup starts App Server on port 8080 and verifies its public WebSocket handshake."; "Desktop-only setup verifies the public endpoint, registers SSH, saves the remote project for Codex Desktop to import at its next startup, then exits while leaving the backend running."; "Desktop-only setup does not prompt to install or launch a local terminal client."; "Generated names are checked against existing names before creation; when using the default cloud agents project, the label comes from the local repository or directory instead of the project name."; "Reconnect migrates older default aliases while preserving custom settings."; "Tools, files, and threads live on the VM."; "Docs conflict: Current Railway CLI documentation describes newer behavior: Codex App Server defaults to a configured code port (default 4096) or legacy port 8080; the v5.52.0 README says port 8080. Used the version-tagged documentation."

### railway supports bulk-editing variables in $EDITOR with a reviewed diff (2026-09-02)
- slug: railway-supports-bulk-editing-variables-in-editor-with-a-reviewed-diff-39a6103f190a
- score: 0.97

How to use it:

When bulk-editing Railway variables, run `railway variable edit` with the target project, environment, and service. Review the redacted diff and confirm before applying.

Examples:

```
railway variable edit --project <project-id> --environment <environment> --service <service>
```

- why_it_matters: Bulk-edit Railway variables while reviewing the proposed changes before applying them.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.48.0>, <https://github.com/railwayapp/railway-skills/blob/main/plugins/railway/skills/use-railway/references/configure.md>
- gotchas: "Version: v5.48.0"; "--project <project-id> (required): Selects the Railway project."; "--environment <environment> (required): Selects the environment."; "--service <service> (required): Selects the service."; "Prerequisite: CLI 5.48+; workflow requires a TTY or an explicitly configured $EDITOR or $VISUAL."; "Prerequisite: Saving in the editor is not approval; the CLI displays a redacted diff and asks before applying."

### railway mysql, postgres, and redis add HA commands (2026-08-31)
- slug: railway-mysql-postgres-and-redis-add-ha-commands-ff3767a31236
- score: 0.95

How to use it:

When managing HA for a Railway MySQL, PostgreSQL, or Redis database, use the corresponding engine command: `railway mysql ha`, `railway postgres ha`, or `railway redis ha`.

Examples:

```
railway postgres ha status --service <service>
```

```
railway postgres ha convert --service <service> --replicas 2
```

```
railway mysql ha <subcommand> [options]
```

- why_it_matters: Manage high availability for a MySQL, PostgreSQL, or Redis database using the Railway CLI.
- before: Use `railway postgres` for HA management; MySQL and Redis HA commands were not available in the CLI.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.46.0>, <https://github.com/railwayapp/cli/pull/1143>, <https://docs.railway.com/databases/postgresql-ha>, <https://docs.railway.com/databases/mysql-ha>, <https://docs.railway.com/cli>
- gotchas: "Version: v5.46.0"; "--service <service>: Targets a service by name or ID. The PostgreSQL HA examples use this selector."; "--replicas <count>: Sets the number of replicas for PostgreSQL HA conversion; the documented example uses 2."; "Prerequisite: Install the Railway CLI and authenticate with a Railway account before using it."; "Prerequisite: For PostgreSQL HA conversion, use a supported official Railway PostgreSQL image, pin a supported major version (14–18), and have no custom start command."; "Prerequisite: For MySQL HA conversion, use the official MySQL image or supported Railway MySQL HA data-node image, a supported version (8 or 9) with a versioned tag, and no custom start command."; "MySQL and Redis expose `ha` only; MySQL `pitr` is planned for a next PR, and Redis does not expose `pitr`."; "PostgreSQL exposes `ha`, `pitr`, and `pgbouncer`. The CLI help lists only capabilities supported by each engine."

### railway ca imports committed .mcp.json servers into agents (2026-08-27)
- slug: railway-ca-imports-committed-mcp-json-servers-into-agents-775907538931
- score: 0.93

How to use it:

When launching a Railway cloud agent from a repository with a committed `.mcp.json`, run `railway ca` there. Its enabled servers are imported with `user-` prefixes, excluding disabled entries and the platform-owned names `railway`, `playwright`, and `railway-machine`.

Examples:

```
railway ca
```

- why_it_matters: When launching a Railway cloud agent from a repository with a committed `.mcp.json`, carry the repository's MCP server configuration to the agent.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.45.0>, <https://github.com/railwayapp/cli/pull/1132>, <https://docs.railway.com/cloud-agents/terminal>, <https://docs.railway.com/cloud-agents/quickstart>, <https://github.com/railwayapp/cli/blob/v5.45.0/src/commands/cloud_agent/mcp_sync.rs>
- gotchas: "Version: v5.45.0"; "Prerequisite: Cloud Agents must be enabled in Priority Boarding; install the Railway CLI and sign in."; "Prerequisite: The repository must have a committed `.mcp.json` for its MCP servers to be imported."; "Import applies when launching from a repo with a committed `.mcp.json`."; "Entries with `disabled: true` and platform-owned names `railway`, `playwright`, and `railway-machine` are excluded from import."; "The VM-side merge is described as add-only."

### railway config migrate translates CaC files to IaC (2026-08-21)
- slug: railway-config-migrate-translates-cac-files-to-iac-d79bda877953
- score: 0.92

How to use it:

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
```

- 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>
- 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."

### railway config plan, apply, and current evaluate IaC in the CLI (2026-08-21)
- slug: railway-config-plan-apply-and-current-evaluate-iac-in-the-cli-720172d2521b
- score: 0.96

How to use it:

If the repository has a Railway IaC file and is linked to the target project and environment, run `railway config plan` to preview changes, `railway config apply` to apply them after confirmation, or `railway config current` to inspect current configuration. The official documentation describes `plan` and `apply`, but I could not verify `config current` there.

Examples:

```
railway config plan
```

```
railway config apply
```

- why_it_matters: Plan, apply, or inspect the current IaC configuration in a repository using `.railway/railway.ts`, `.railway/railway.py`, or `.railway/railway.go`.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.42.0>, <https://github.com/railwayapp/cli/pull/1113>, <https://github.com/railwayapp/docs/blob/main/content/docs/infrastructure-as-code.md>
- gotchas: "Version: v5.42.0"; "Prerequisite: Install the Railway CLI, authenticate with `railway login`, and link the directory to the target project and environment with `railway link`."; "Prerequisite: For `plan` and `apply`, the CLI searches the current directory and parent directories for `.railway/railway.ts`, `.railway/railway.py`, or `.railway/railway.go`."; "The preserved runner behavior applies when `--runner`, `RAILWAY_IAC_TS_BIN`, or `RAILWAY_IAC_ENGINE=ts` is set."; "The release reports TypeScript and Python file evaluation coverage; it does not state Go evaluation coverage."

### railway agent setup defaults new installs to the remote CLI proxy (2026-08-13)
- slug: railway-agent-setup-defaults-new-installs-to-the-remote-cli-proxy-88fd8b9f2ff8
- score: 0.97

How to use it:

For a new Railway agent install, run `railway setup agent -y` to configure the remote MCP proxy using your CLI login. Use `--local` to select the local GraphQL-backed server, or `--oauth` for editor OAuth.

Examples:

```
railway setup agent -y
```

```
railway setup agent -y --local
```

```
railway mcp install --local --agent cursor
```

- why_it_matters: Configure Railway MCP for a coding agent during a new agent install.
- before: New agent installs defaulted to the local in-process `railway mcp` server.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.39.0>, <https://github.com/railwayapp/cli/pull/1094>, <https://github.com/railwayapp/cli/blob/v5.39.0/README.md>
- gotchas: "Version: v5.39.0"; "-y: Runs agent setup without interactive prompts."; "--local: Selects the local GraphQL-backed MCP server instead of the default remote proxy."; "--agent <agent>: Selects the target agent tool; `cursor` is shown in the documented example."; "--oauth: Not documented in the v5.39.0 README or source pages read."; "Prerequisite: Install the Railway CLI; the README's agent install command is `bash <(curl -fsSL railway.com/install.sh) --agents -y`."; "Prerequisite: Authenticate with a Railway account using `railway login` before using the CLI."; "This changes defaults for new agent installs and voluntary setup/install reruns; bare `railway mcp` remains local."; "`--remote` remains a compatibility alias for the new default."

### railway code launches cloud-agent sessions in the TUI (2026-08-13)
- slug: railway-code-launches-cloud-agent-sessions-in-the-tui-a74d2fad2fca
- score: 0.92

How to use it:

When launching repository work with a saved default harness, run `railway code`; to choose a harness, run `railway code --<harness>`. In v5.38.0, this opens the `railway ca` manage screen with the tree collapsed and the session starting in a full-width pane.

Examples:

```
railway code
```

```
railway code --<harness>
```

- why_it_matters: When launching a saved or selected harness for repository work, open the cloud-agent manage screen with the session running in its pane.
- before: `railway code` ssh-ed directly into the VM instead of opening the `railway ca` manage screen.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.38.0>, <https://github.com/railwayapp/cli/pull/1087>
- gotchas: "Version: v5.38.0"; "--<harness>: Overrides the saved default harness; the release note does not enumerate accepted harness names."; "⌥f: Restores the tree in the manage screen."; "⌥n: Starts another session."; "Target resolution remains flags, linked directory, default project, then inline `railway ca setup`."; "The direct non-TUI path remains for `--rm`, `-- <args>` passthrough, piped or non-terminal runs, and `railway ca start`."; "Launch arguments including `--name`, `--variable`, `--env-file`, and `--refresh-auth` survive the TUI flow."

### railway ca ssh auto-creates an agent when none exist (2026-08-11)
- slug: railway-ca-ssh-auto-creates-an-agent-when-none-exist-07aa5d988103
- score: 0.93

How to use it:

When the account has no cloud agents and a default project is configured, run `railway ca ssh` to create an agent and open a shell. Use `--environment <environment>` to scope the command; if no default project is configured, set one up with `ca create` or `ca setup`.

Examples:

```
railway ca ssh
```

```
railway ca ssh <agent>
```

```
railway ca setup
```

- why_it_matters: Start a cloud agent session with Railway CLI when the account has no agents and a default project is configured.
- before: The release note says `railway ca ssh` previously errored and told users to create an agent with `railway ca create`.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.37.0>, <https://github.com/railwayapp/cli/pull/1078>, <https://github.com/railwayapp/cli/blob/master/docs/cloud-agents.md>
- gotchas: "Version: v5.37.0"; "<agent>: Agent selector; names or IDs are accepted. The guide documents this selector for opening a shell."; "--environment <environment>: The release note says it scopes first-agent auto-creation. The CLI guide does not document this flag for `ca ssh`."; "Prerequisite: Cloud Agents access is required."; "Auto-creation applies only when the account has no agents; a mistyped agent name still fails."; "A default project must be configured unless `--environment` scopes the command."

### railway ca adds flat agent lifecycle commands (2026-08-09)
- slug: railway-ca-adds-flat-agent-lifecycle-commands-fa4004172941
- score: 0.96

How to use it:

When you need to manage a Railway cloud agent from the CLI, use `railway ca list`, `create`, `ssh`, `wake`, `sleep`, or `delete` for the matching operation. Select agents by name or ID; `create` provisions a VM without connecting, and `ssh` never creates one.

Examples:

```
railway ca list
railway ca list --json
```

```
railway ca create <agent-name> --project <project-id> --environment <environment-name>
railway ca ssh <agent-name> -- bash
```

```
railway ca wake <agent-name>
railway ca sleep <agent-name>
railway ca delete <agent-name>
```

- why_it_matters: From a repository directory, list, create, connect to, wake, sleep, or delete a cloud agent without relying on the interactive agent flow.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.35.0>, <https://github.com/railwayapp/cli/pull/1064>, <https://docs.railway.com/cloud-agents/manage>, <https://docs.railway.com/cloud-agents/configuration>, <https://docs.railway.com/cloud-agents/quickstart>
- gotchas: "Version: v5.35.0"; "<agent-name> or <agent-id>: Select an existing agent for lifecycle commands. Omit to use the directory’s agent or the only agent, when unambiguous."; "--project <project-id>: Select the project for creation. Otherwise Railway uses the linked project or saved default."; "--environment <environment-name>: Select the environment for creation. Otherwise Railway uses the linked environment or saved default."; "--json: Output the agent list in JSON format."; "-- bash: Run a plain shell over SSH."; "--session <name>: Select a terminal session to attach to."; "--variable <key=value>: Set creation-time variables; repeatable and overrides matching environment-file entries."; "--env-file <path>: Load creation-time variables from a file; repeatable."; "--no-wait: Not found in the official documentation checked."; "--keep-awake: Current docs say this remains accepted for compatibility and is no longer needed; current behavior differs from the release note’s description."; "--all: Sleep every running agent you own; current docs also describe narrowing the scope with an environment filter."; "-y: Skip the delete confirmation; not documented on the current page checked."; "ls, new, connect, rm: Aliases named in the release note; not documented on the current page checked."; "Prerequisite: Enable Cloud Agents in Priority Boarding."; "Prerequisite: Install the Railway CLI and sign in with `railway login`."; "`ca list` can narrow with `-e`; `--all` includes teammates’ agents; `--json` is available for scripts."; "`ca create` creates an agent VM without connecting to it; it accepts `--variable`, `--env-file`, `--no-wait`, and `--json`."; "`ca ssh` attaches to an agent’s durable session; `-- bash` requests a plain shell, `--session` selects a session, and `--keep-awake` skips sleep-on-disconnect."; "`ca wake` waits for RUNNING."; "`ca sleep` stops compute billing while keeping the disk; `--all` targets every running agent you own."; "`ca delete` destroys the agent and its disk, with confirmation unless `-y` is used."; "Docs conflict: Current docs say `--keep-awake` is retained for compatibility and is no longer needed; the release note says it skips sleep-on-disconnect. Current docs may describe behavior newer than v5.35.0."

### Railway Postgres PgBouncer management (2026-08-08)
- slug: railway-postgres-pgbouncer-management-ccc7f1956ca5
- score: 0.93

How to use it:

When managing PgBouncer for a Postgres service, use `railway postgres pgbouncer` with the relevant subcommand; selectors targeting a PgBouncer or HAProxy edge resolve to the database root. Configure requires at least one setting, and its warnings are advisory per the release note.

Examples:

```
railway postgres pgbouncer status --service <postgres-service>
```

```
railway postgres pgbouncer add --service <postgres-service> --pool-mode transaction
```

```
railway postgres pgbouncer configure --service <postgres-service> --max-client-conn 200
```

- why_it_matters: Inspect or change PgBouncer configuration, pool mode, regional replica count, or service presence for a Postgres deployment.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.33.0>, <https://github.com/railwayapp/cli/pull/1054>, <https://github.com/railwayapp/cli/blob/v5.33.0/src/commands/postgres/pgbouncer.rs>
- gotchas: "Version: v5.33.0"; "--service <service>: Select the service; edge-node selectors resolve to the database root. The documented examples use `--service postgres`."; "--pool-mode <transaction|session|statement>: Select the pooling mode; `add` defaults to `transaction`."; "--max-client-conn <integer>: Maximum client connections PgBouncer accepts; must be at least 1."; "--default-pool-size <integer>: Default pool size per user/database pair; must be at least 1."; "--max-prepared-statements <integer>: Maximum prepared statements per connection; 0 disables it, and it is ignored outside transaction mode."; "configure setting group (required): At least one of `--pool-mode`, `--max-client-conn`, `--default-pool-size`, or `--max-prepared-statements` is required; multiple may be supplied together."; "--replicas <integer> (required): Target replica count for `scale`; must be 0 or greater. Documented scaling selects one active region; zero or multiple active regions require direct `railway scale` instead."; "--yes, -y: Skip the confirmation prompt for add or remove."; "--no-deploy: Commit the config change without triggering deploys; it applies on the next deploy."; "Replica count is summed from deploy.multiRegionConfig because production does not write the legacy flat field."; "Configuration misconfiguration warnings are advisory and never blocking."

### Railway Postgres PITR management (2026-08-08)
- slug: railway-postgres-pitr-management-42e150d8b35a
- score: 0.95

How to use it:

When managing PITR for a Postgres service, use `railway postgres pitr` with the needed subcommand and `--service <service>`; for HA changes, follow progress until terminal and match the workflow ID.

Examples:

```
railway postgres pitr status --service <service>
railway postgres pitr enable --service <service>
railway postgres pitr disable --service <service> --yes
```

```
railway postgres pitr progress --service <service> --watch
railway postgres pitr cancel --service <service>
railway postgres pitr clear --service <service>
```

```
railway postgres pitr restore --service <service> --at <timestamp> --yes
railway postgres pitr backup list --service <service>
railway postgres pitr schedule set --service <service> --none
```

- why_it_matters: Inspect, enable, disable, restore, or manage point-in-time recovery for a Postgres environment or HA cluster.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.33.0>, <https://github.com/railwayapp/cli/pull/1052>, <https://github.com/railwayapp/cli/blob/v5.33.0/src/commands/postgres/pitr.rs>, <https://docs.railway.com/cli>, <https://docs.railway.com/volumes/point-in-time-recovery>
- gotchas: "Version: v5.33.0"; "--service <service>: Target service name or ID; defaults to the linked service."; "--at <timestamp> (required): PITR restore time: RFC3339, `YYYY-MM-DD HH:MM:SS` local time, or relative offset such as `30m`, `2h`, or `1d`."; "--new-service-name <name>: Name for the restored service; defaults to `<source>-restored-YYYYMMDD-HHMM`."; "--yes / -y: Skip confirmation prompt for disable, restore, backup delete, or backup restore."; "--no-deploy: Commit enable/disable config change without triggering deploy; standalone only, since HA changes apply live."; "--watch: Poll HA workflow progress until a terminal phase."; "backup create --name <label>: Optional label for an on-demand backup; defaults to `Manual`."; "backup delete <id> [<id> ...] (required): One or more backup IDs to delete."; "backup lock <id> (required): Backup ID; removes its expiration so it is kept indefinitely."; "backup restore <id> (required): Backup ID to restore from."; "schedule set --daily / --weekly / --monthly (required): Select one or more automatic backup frequencies; these options can be combined."; "schedule set --none (required): Remove all automatic backup schedules; existing backups remain. Conflicts with `--daily`, `--weekly`, and `--monthly`."; "Prerequisite: Install Railway CLI; authenticate and link/select the project, environment, and service before running commands."; "Prerequisite: PITR is documented for Postgres single-node services and HA clusters; progress, cancel, and clear apply to HA clusters."; "HA enable/disable follows a rolling workflow and progress record; matching by workflow id prevents a stale record from indicating completion."; "The HA workflow has a 30-minute deadline; FAILED surfaces the workflow’s own error."; "Volume-instance ids resolve through environment volumeInstances; the config’s volumeMounts key is the VOLUME id, which backup mutations reject."; "Every environment-config fetch is decrypted; the supplied span truncates before the remainder of this qualification."

### railway mcp proxy bridges stdio to the remote MCP server using CLI login (2026-07-27)
- slug: railway-mcp-proxy-bridges-stdio-to-the-remote-mcp-server-using-cli-login-cb6372c133b8
- score: 0.97

How to use it:

When the repository workflow already has a stored `railway login`, run `railway mcp proxy` to connect the editor over stdio to Railway’s remote MCP server using CLI authentication.

Examples:

```
railway mcp proxy
```

- why_it_matters: Connect an MCP-capable editor to Railway’s remote MCP server when the repository workflow already uses `railway login`.
- before: The editor connected directly to `mcp.railway.com` and used its OAuth flow.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.30.0>, <https://github.com/railwayapp/cli/pull/1026>, <https://docs.railway.com/cli/mcp>
- gotchas: "Version: v5.30.0"; "Prerequisite: Requires Railway CLI authentication from `railway login`."; "Requires an existing stored `railway login`."; "Token freshness uses `ensure_valid_token`, the same lockfile-serialized refresh used by the rest of the CLI."; "Docs conflict: Current Railway docs say `proxy` behaves like bare `railway mcp`; on CLI versions before 5.44.0, bare `railway mcp` starts the in-process server. This differs from the v5.30.0 proxy behavior described by the release note. https://docs.railway.com/cli/mcp"

### railway logs adds DNS query logs (2026-07-27)
- slug: railway-logs-adds-dns-query-logs-5ca80a6ce04c
- score: 0.98

How to use it:

When debugging a service’s network behavior, run `railway logs --dns` to stream DNS queries; add `--lines`, `--since`, or `--until` to fetch history, and use DNS filters to narrow results. [Railway CLI logs docs](https://docs.railway.com/cli/logs)

Examples:

```
railway logs --dns
```

```
railway logs --dns --status failed
```

```
railway logs --dns --qname <name> --lines 50
```

- why_it_matters: Inspect DNS query logs while debugging a deployment's network behavior.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.29.0>, <https://github.com/railwayapp/cli/pull/1025>, <https://docs.railway.com/cli/logs>
- gotchas: "Version: v5.29.0"; "--dns (required): Select DNS query logs. Log type flags are mutually exclusive."; "--lines <N>: Fetch this number of log lines; disables streaming."; "--since <TIME>: Show logs since a time; disables streaming."; "--until <TIME>: Show logs until a time; disables streaming."; "--filter <QUERY>: Filter logs with Railway query syntax; can be combined with DNS typed filters."; "--status <STATUS>: DNS filter requiring `--dns`; accepts `ok` or `failed`."; "--rcode <RCODE>: DNS filter requiring `--dns`; filters by response code, such as `NOERROR`, `NXDOMAIN`, `SERVFAIL`, `TIMEOUT`, or `ERROR`. Values are normalized to uppercase."; "--zone <ZONE>: DNS filter requiring `--dns`; accepts `internal` or `external`."; "--domain <DOMAIN>: DNS filter requiring `--dns`; matches a domain and its subdomains."; "--qtype <TYPE>: DNS filter requiring `--dns`; filters by record type, such as `A`, `AAAA`, `CNAME`, `PTR`, or `TXT`. Values are normalized to uppercase."; "--qname <NAME>: DNS filter requiring `--dns`; matches the exact queried name."; "--deployment, --build, --http, --network: Other log type selectors; mutually exclusive with `--dns`."; "Typed filter flags require `--dns`."; "DNS logs shipped in the dashboard this week; the dashboard path is deployment → Network tab → DNS."

### railway api adds Railway GraphQL schema discovery and operation execution (2026-07-22)
- slug: railway-api-adds-railway-graphql-schema-discovery-and-operation-execution-64e178482347
- score: 0.98

How to use it:

When exploring Railway’s public GraphQL API from the CLI, search and inspect the live schema, then run an authenticated operation with `railway api`.

Examples:

```
railway api search <term> --limit <N>
```

```
railway api describe <name>
```

```
railway api 'query { me { id name } }'
```

- why_it_matters: When exploring Railway's public GraphQL API from the CLI, discover its schema and execute an authenticated operation.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.28.0>, <https://github.com/railwayapp/cli/pull/1008>, <https://docs.railway.com/cli/api>
- gotchas: "Version: v5.28.0"; "<term> (required): Search term for matching GraphQL types and fields."; "--limit <N>: Maximum search results to print; defaults to 25."; "<name> (required): GraphQL type, root field, or field in Parent.field notation to describe."; "<QUERY> (required): GraphQL document to execute; may be passed inline, by file, or on stdin. Pass inline query or --file, not both."; "--file <PATH>: Read the GraphQL document from a file; `-` reads stdin."; "--variables <JSON|@PATH>: Provide a JSON variables object inline or from a file; `@-` reads stdin."; "Prerequisite: CLI version 5.28 or later; authenticate with `railway login` or set a token."; "Schema discovery uses live introspection fetched from the Railway API; nothing is bundled with the CLI."; "Schema fetches fail with a clear error when the API returns a non-2xx status or GraphQL errors."

### railway usage limit commands support agent and workspace targets (2026-07-08)
- slug: railway-usage-limit-commands-support-agent-and-workspace-targets-9e3dfa6bb504
- score: 0.92

How to use it:

To inspect usage limits, run `railway usage limit status` for both types or add `--target agent|workspace` for one. To change a limit, specify `--target`; agent limits require `--hard` and accept cents, while workspace limits use whole dollars.

Examples:

```
railway usage limit status
```

```
railway usage limit status --target <agent|workspace>
```

```
railway usage limit set --target agent --soft <DOLLARS> --hard <DOLLARS>
```

- why_it_matters: Inspect or change usage limits for an agent or workspace from a coding repository.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.26.0>, <https://github.com/railwayapp/cli/pull/1004>, <https://docs.railway.com/cli/usage>
- gotchas: "Version: v5.26.0"; "--target (required): Required for `set`; `agent` selects Railway Agent usage and `workspace` selects compute usage."; "--soft <DOLLARS>: Optional email alert. Agent accepts up to two decimal places; workspace accepts 0 or whole dollars from $5 to $500,000."; "--hard <DOLLARS> (required): Required for agent limits; agent accepts up to two decimal places and `0` blocks additional agent usage. Workspace accepts 0 or whole dollars from $10 to $500,000."; "Agent hard limit is required when setting agent limits."; "Agent `--hard 0` is allowed and blocks agent usage."; "Workspace limits preserve whole-dollar validation."

### railway usage adds workspace usage and limit commands (2026-07-08)
- slug: railway-usage-adds-workspace-usage-and-limit-commands-908890b8f83b
- score: 0.91

How to use it:

Inspect workspace or project usage for the linked or selected workspace and billing period. Manage compute limits with `railway usage limit` commands; current docs require `--target workspace` when setting limits.

Examples:

```
railway usage --workspace <workspace> --period <current|previous|YYYY-MM> --json
```

```
railway usage projects --project <project> --workspace <workspace> --period <current|previous|YYYY-MM> --json
```

```
railway usage limit set --target workspace --soft <dollars> --hard <dollars> --workspace <workspace> --json
```

- why_it_matters: Inspect usage and compute limits for a Railway workspace or project associated with the repository.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.25.0>, <https://github.com/railwayapp/cli/pull/1001>, <https://docs.railway.com/cli/usage>, <https://docs.railway.com/pricing/cost-control>
- gotchas: "Version: v5.25.0"; "--workspace <WORKSPACE>: Workspace name or ID; defaults to the linked project's workspace, or prompts/selects when unlinked."; "--period <PERIOD>: Usage period: `current`, `previous`, or `YYYY-MM`; defaults to `current`. Only applies to summaries and project breakdowns."; "--json: Output in JSON format."; "--project <PROJECT>: Show service-level usage for one project name or ID; cannot be combined with `--limit`."; "--limit <COUNT>: Maximum projects returned; cannot be combined with `--project`."; "--target workspace (required): Selects compute usage limits for `limit set`; current docs also document `workspace` and `agent` targets for status."; "--soft <DOLLARS>: Workspace compute email alert: `0` or a whole-dollar value from $5 to $500,000. When both thresholds are nonzero, hard must be at least soft."; "--hard <DOLLARS>: Workspace compute hard limit: `0` or a whole-dollar value from $10 to $500,000. When both thresholds are nonzero, hard must be at least soft."; "--yes: Confirms limit removal; required in non-interactive sessions."; "Prerequisite: A workspace admin is required to configure usage limits."; "The period may be current, previous, or YYYY-MM."; "Docs conflict: Current docs require `--target workspace` for `limit set`, but the v5.25.0 release-note syntax omits `--target`; current docs also describe agent targets and usage limits not mentioned in the release note. Verify the installed CLI version before relying on the newer syntax."

### railway flag adds feature flag management (2026-07-07)
- slug: railway-flag-adds-feature-flag-management-013cc5975415
- score: 0.98

How to use it:

When managing feature flags for a linked Railway project workspace, use `railway flag` to list flags, set defaults or targeting rules, re-type flags, delete flags, and remove rules.

Examples:

```
railway flag list --full
```

```
railway flag set <name> <value> --when '<CEL expression>'
```

```
railway flag set <name> <value> --type <bool|string|number|json> --force
```

- why_it_matters: Manage feature flags for a linked Railway project workspace from the CLI.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.24.0>, <https://github.com/railwayapp/cli/pull/997>, <https://github.com/railwayapp/cli/blob/v5.24.0/src/commands/flag.rs>
- gotchas: "Version: v5.24.0"; "name (required): Flag name."; "value (required): Default value, or rule value when `--when` is passed. Type is inferred when `--type` is omitted."; "--when <expression>: CEL expression subset for a targeting rule; raw JSON is also accepted."; "--rule-id <id>: Stable rule ID for `--when`; defaults to a hash of flag name and expression. Required by `unset` to identify the rule to remove."; "--type <type>: Flag type: `bool`, `string`, `number`, or `json`; inferred from value if omitted."; "--force: Allow replacing an existing flag's type; rules are cleared when the type changes."; "--full: For list output, show rule IDs and empty rule sections."; "--owner <owner>: Select flag scope, such as `workspace:<id>` or `project:<id>`; defaults to the linked project's workspace."; "Prerequisite: Link a Railway project with `railway link` to use its workspace as the default flag scope."; "Prerequisite: A targeting rule requires the named flag to exist; create it with `railway flag set <name> <value>` first."; "The `--when` CEL-style syntax supports a subset of predicates; raw JSON is also accepted as an escape hatch."; "Values are inferred from values such as `true`, `42`, `\"blue\"`, and JSON objects."; "Re-typing an existing flag with `--force --type` clears its rules when the type changes."

### railway status accepts explicit project and environment targeting (2026-06-24)
- slug: railway-status-accepts-explicit-project-and-environment-targeting-ad1399829522
- score: 0.95

How to use it:

When checking a specific Railway project without relying on the repository’s local link, pass both the project and environment. Add `--json` for JSON output scoped to that environment.

Examples:

```
railway status --project <project-id-or-name> --environment <environment>
```

```
railway status --project <project-id-or-name> --environment <environment> --json
```

- why_it_matters: Check a Railway project's status from a coding workflow without relying on the repository's local link state.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.23.0>, <https://github.com/railwayapp/cli/pull/988>, <https://github.com/railwayapp/cli/blob/v5.23.0/src/commands/status.rs>, <https://docs.railway.com/cli>
- gotchas: "Version: v5.23.0"; "--project, -p <PROJECT_ID>: Project ID or name to inspect; defaults to the linked project. Requires `--environment` when provided."; "--environment, -e <ENV> (required): Environment to inspect; required when `--project` is used."; "--json: Output in JSON format; with explicit project and environment, output is scoped to that environment."; "Prerequisite: Authenticate with a Railway account before using the CLI (`railway login`)."; "`--environment` is required whenever `--project` is used, including JSON output."

### railway outbound-network manages service outbound networking (2026-06-24)
- slug: railway-outbound-network-manages-service-outbound-networking-aedfb8aac1b6
- score: 0.97

How to use it:

When managing a Railway service’s outbound networking, use `railway outbound-network` with the relevant status or enable/disable subcommand and service selectors as needed. Redeploy after static IP changes; apply staged environment changes after IPv6 changes.

Examples:

```
railway outbound-network status --service <SERVICE> [--environment <ENVIRONMENT>] [--project <PROJECT_ID>] [--json]
```

```
railway outbound-network static-ip <status|enable|disable> --service <SERVICE> [--environment <ENVIRONMENT>] [--project <PROJECT_ID>] [--json]
```

```
railway outbound-network ipv6 <status|enable|disable> --service <SERVICE> [--environment <ENVIRONMENT>] [--project <PROJECT_ID>] [--json]
```

- why_it_matters: Manage a Railway service’s outbound networking from the CLI while maintaining or debugging its deployment configuration.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.21.0>, <https://github.com/railwayapp/cli/pull/984>, <https://github.com/railwayapp/docs/blob/main/content/docs/cli/outbound-network.md>, <https://raw.githubusercontent.com/railwayapp/cli/v5.21.0/src/commands/outbound_networking.rs>
- gotchas: "Version: v5.21.0"; "-s, --service <SERVICE>: Service name or ID; defaults to the linked service."; "-e, --environment <ENVIRONMENT>: Environment to use; defaults to the linked environment."; "-p, --project <PROJECT_ID>: Project ID to use; defaults to the linked project."; "--json: Output in JSON format."; "static-ip subcommand (required): Choose `status`, `enable`, or `disable` to inspect or change Static Outbound IPs."; "ipv6 subcommand (required): Choose `status`, `enable`, or `disable` to inspect or stage an Outbound IPv6 change."; "Static IP enable and disable report that a redeploy is required before outbound traffic changes."; "Static Outbound IP status reports whether enabled, whether the returned assignment is high availability, and assigned IPv4 addresses."; "The CLI contract does not expose a legacy/single-IP mode."; "Outbound IPv6 commands stage an environment config patch for `deploy.ipv6E"

### railway waf under-attack commands manage service WAF mode (2026-06-20)
- slug: railway-waf-under-attack-commands-manage-service-waf-mode-a0282fbb553f
- score: 0.98

How to use it:

When managing a service’s Under Attack Mode, check its state or enable or disable it. An applied public domain is required; use `--duration` when enabling timed mode.

Examples:

```
railway waf under-attack status --service <SERVICE> --json
```

```
railway waf under-attack enable --service <SERVICE> --duration 1h --json
```

```
railway waf under-attack disable --service <SERVICE> --json
```

- why_it_matters: When managing a service’s Under Attack Mode from the CLI, check its status or enable or disable the mode.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.20.0>, <https://github.com/railwayapp/cli/pull/983>, <https://github.com/railwayapp/railway-skills/blob/main/plugins/railway/skills/use-railway/references/configure.md>, <https://docs.railway.com/cli/global-options>
- gotchas: "Version: v5.20.0"; "--service, -s <SERVICE>: Targets a service by name or ID."; "--environment, -e <ENVIRONMENT>: Selects an environment by name or ID."; "--project, -p <PROJECT_ID>: Selects a project. The WAF-specific docs do not document this selector."; "--json: Outputs results in JSON format."; "--duration <DURATION>: Sets enable duration. WAF docs show `1h`; allowed values from the release note are `forever`, `1h`, `3h`, `12h`, `24h`."; "Prerequisite: An applied public domain is required; Under Attack Mode is service-scoped."; "A service must have an applied public domain before WAF settings can be managed. If no applied domain is available, status reports WAF as unavailable and explains that a public domain is required."; "Docs conflict: The opened Railway CLI documentation is on the current `main` branch and does not establish behavior specifically at v5.20.0. It shows the `1h` duration example but does not document the complete duration set in the release note."

### railway cdn manages service CDN caching (2026-06-20)
- slug: railway-cdn-manages-service-cdn-caching-b8239d1adb14
- score: 0.98

How to use it:

When managing CDN settings for a Railway service, use `railway cdn status`, `enable`, `disable`, `update`, or `purge`; choose the service with selectors as needed. Enabling caching requires an applied public domain.

Examples:

```
railway cdn status --service <SERVICE>
```

```
railway cdn update --html-caching force --default-ttl 4h --service <SERVICE>
```

```
railway cdn purge html --service <SERVICE> --json
```

- why_it_matters: Manage CDN caching for a selected Railway service while maintaining or reviewing its deployment configuration.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.19.0>, <https://github.com/railwayapp/cli/pull/982>, <https://github.com/railwayapp/cli/blob/v5.19.0/src/commands/cdn.rs>
- gotchas: "Version: v5.19.0"; "--service, -s <SERVICE>: Service name or ID; defaults to the linked service."; "--environment, -e <ENVIRONMENT>: Environment to use; defaults to the linked environment."; "--project, -p <PROJECT_ID>: Project ID to use; defaults to the linked project."; "--json: Output in JSON format."; "--html-caching <MODE>: Set HTML caching mode; documented enum values are not_found (source code page defines the enum, but values not retrieved). At least one update setting is required."; "--default-ttl <TTL>: Set default TTL; accepted values: 30m, 1h, 2h, 4h, 12h, 1d, or matching seconds. At least one update setting is required."; "--swr / --no-swr: Honor or ignore stale-while-revalidate Cache-Control directives; mutually exclusive. At least one update setting is required."; "--purge-on-deploy <POLICY>: Set cache purge policy after successful deploys; allowed values not retrieved. At least one update setting is required."; "<html|all> (required): Purge scope. Purges apply to the whole service; per-URL purge is unsupported."; "Prerequisite: CDN caching requires an applied public domain. The CLI docs say to add a domain with `railway domain` first."; "`railway cdn enable` requires an applied public domain."

### railway config plan supports --detailed-exit-code (2026-06-19)
- slug: railway-config-plan-supports-detailed-exit-code-bb1072a87c5d
- score: 0.93

How to use it:

When a script needs to distinguish a clean plan from pending changes, run `railway config plan --detailed-exit-code`. It exits 0 when nothing would change and 2 when changes are pending; errors remain non-zero.

Examples:

```
railway config plan --detailed-exit-code
```

- why_it_matters: Integrate a Railway config plan into a script that needs an exit code indicating whether changes are present.
- before: Without the opt-in flag, `railway config plan` retains its default exit behavior.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.18.0>, <https://docs.railway.com/infrastructure-as-code>, <https://docs.railway.com/cli>
- gotchas: "Version: v5.18.0"; "railway config plan (required): Previews configuration changes without applying them."; "--detailed-exit-code: Opt-in: exits 0 when nothing would change, 2 when changes are pending; errors remain non-zero."; "Prerequisite: Install the Railway CLI and authenticate with `railway login`, or set a token for CI/CD."

### railway private-network status and update commands (2026-06-19)
- slug: railway-private-network-status-and-update-commands-d68f36cd0ca5
- score: 0.95

How to use it:

When you need to inspect or rename a service’s private networking endpoint, run `railway private-network status` or `railway private-network update <name>`. Supply project, environment, service, or network selectors as needed; `<name>` is the short endpoint prefix without `.internal`.

Examples:

```
railway private-network status
```

```
railway private-network status --service <service> --network <name-or-id> --json
```

```
railway private-network update <name> --service <service>
```

- why_it_matters: Inspect or rename a service's private networking endpoint from the CLI.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.17.0>, <https://github.com/railwayapp/cli/pull/977>, <https://raw.githubusercontent.com/railwayapp/cli/v5.17.0/src/commands/private_network.rs>, <https://github.com/railwayapp/docs/blob/main/content/docs/cli.md>
- gotchas: "Version: v5.17.0"; "--service: Service name or ID; defaults to the linked service."; "--environment: Environment; defaults to the linked environment."; "--project: Project ID; defaults to the linked project."; "--network: Private network name, ID, or DNS name."; "--json: Output in JSON format."; "<name> (required): Endpoint name prefix, without the `.internal` suffix."; "Prerequisite: Authenticate with a Railway account using `railway login`; for CI, use `RAILWAY_TOKEN` for project-level actions."; "Prerequisite: Use an installed Railway CLI. The docs list Homebrew, npm, Scoop, binaries, and installer options; npm requires Node.js 16 or higher."; "The status command reports networking for the selected project, environment, and service."; "The update command takes the endpoint short name; full `.internal` hostnames are rejected, and only the short prefix is accepted."; "The update command validates malformed and reserved names and checks name availability before renaming."

### railway logs adds network flow log mode (2026-06-19)
- slug: railway-logs-adds-network-flow-log-mode-5ec3082e5411
- score: 0.98

How to use it:

When you need to inspect service-level network flows, run `railway logs --network`; add typed filters and `--filter` as needed, and use `--lines` for a finite snapshot or omit it to stream live.

Examples:

```
railway logs --network
```

```
railway logs --network --lines <N>
```

```
railway logs --network --protocol <PROTOCOL> --filter "<QUERY>"
```

- why_it_matters: Inspect network flow logs for a deployment using the Railway CLI.
- before: The release note describes --network as an added mode; before this change, the CLI command had no network-flow log mode.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.16.0>, <https://github.com/railwayapp/cli/pull/978>, <https://docs.railway.com/cli/logs>, <https://docs.railway.com/cli>
- gotchas: "Version: v5.16.0"; "--network (required): Select network flow logs; log type flags are mutually exclusive."; "--protocol <PROTOCOL>: Filter by tcp, udp, icmp, icmpv6, or unknown."; "--direction <DIRECTION>: Filter by ingress or egress."; "--peer <PEER>: Filter by peer service name or ID, internet, dns, or edge-proxy."; "--peer-kind <KIND>: Filter by service, internet, edge_proxy, local_dns, or unknown."; "--status <STATUS>: Filter by ok or dropped."; "--dropped <BOOL>: Filter by whether packets were dropped."; "--port <PORT>: Filter by source or destination port."; "--src <IP>: Filter by source IP."; "--dst <IP>: Filter by destination IP."; "--host <IP>: Filter by source or destination IP."; "--drop-cause <CAUSE>: Filter by drop cause."; "-f, --filter <QUERY>: Filter using Railway query syntax; network flow fields include @protocol, @direction, @peer, @peer_kind, @status, @drop_cause, @src, @dst, @host, @port, and @dropped."; "-n, --lines <N>: Fetch a finite number of log lines; disables streaming."; "--json: Output newline-delimited JSON; network rows include timestamp as an alias of captureEnd."; "-s, --service <SERVICE>: Select the service by name or ID; defaults to the linked service."; "-e, --environment <ENV>: Select the environment by name or ID; defaults to the linked environment."; "Prerequisite: Install the Railway CLI; the docs list Homebrew, npm, Scoop, and prebuilt binaries as installation methods."; "Prerequisite: Network flow logs are service-level; select the target service with --service or use the linked service."; "`--network` is a mutually exclusive log mode."; "NDJSON output aliases `timestamp` to `captureEnd`."

### railway tcp-proxy manages public TCP proxies (2026-06-16)
- slug: railway-tcp-proxy-manages-public-tcp-proxies-bbdc3c93af76
- score: 0.98

How to use it:

When managing a service’s public TCP proxies, use `railway tcp-proxy` with `list`, `create`, `status`, or `delete`; only one proxy is allowed per service instance. For create, specify the application port; if the proxy does not become active, redeploy the service and check its status.

Examples:

```
railway tcp-proxy list --service <service> --project <project> --environment <environment> --json
```

```
railway tcp-proxy create --port <application-port> --service <service>
```

```
railway tcp-proxy delete <proxy-id-or-domain-or-endpoint-or-port> --service <service> --yes
```

- why_it_matters: Manage public TCP proxies for a Railway service from the CLI or local CLI MCP server.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.15.0>, <https://github.com/railwayapp/cli/pull/969>, <https://github.com/railwayapp/docs/blob/main/content/docs/cli/tcp-proxy.md>, <https://github.com/railwayapp/docs/blob/main/content/docs/cli.md>
- gotchas: "Version: v5.15.0"; "--service <SERVICE>: Service name or ID."; "--environment <ENVIRONMENT>: Environment to use."; "--project <PROJECT_ID>: Project ID to use."; "--json: Output in JSON format."; "--port <PORT> (required): Application port to expose through the TCP proxy."; "<PROXY> (required): For status/delete: proxy ID, domain, endpoint, proxy port, or application port."; "--yes: For delete, skip confirmation."; "Prerequisite: Only one TCP proxy is allowed per service instance."; "Prerequisite: The CLI must be installed; docs list Homebrew, npm, Scoop, and pre-built binaries. npm installation requires Node.js 16 or higher."; "Railway enforces a one-TCP-proxy-per-service-instance constraint before mutation."; "Committed creates are verified through the TCP proxy query with a short retry loop to tolerate read-after-write lag."; "Docs conflict: The current official CLI docs list `status` and `delete` subcommands, not the card’s `get` and `remove` names; these docs are on main and may describe a newer version than v5.15.0."; "Docs conflict: Current official CLI docs do not document local MCP tools `list_tcp_proxies`, `create_tcp_proxy`, `get_tcp_proxy`, or `remove_tcp_proxy`."

### railway CLI domain management commands (2026-06-16)
- slug: railway-cli-domain-management-commands-b7bca8e8f138
- score: 0.98

How to use it:

When managing Railway service or custom domains from the CLI, use `railway domain` subcommands to list, inspect, update, retry certificates, or delete. Create a generated service domain or custom domain with `railway domain [DOMAIN]`, adding `--port` when needed; for custom-domain creation with CLI OAuth, use the documented create flow without a separate availability preflight.

Examples:

```
railway domain list --service <service> --json
```

```
railway domain status <domain-or-id> --service <service> --json
railway domain update <domain-or-id> --port <port> --service <service>
railway domain certificate retry <domain-or-id> --service <service>
railway domain delete <domain-or-id> --service <service> --yes
```

```
railway domain <domain> --port <port> --service <service> --environment <environment>
```

- why_it_matters: Manage Railway service or custom domains while maintaining a project from the CLI.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.14.0>, <https://github.com/railwayapp/cli/pull/968>, <https://github.com/railwayapp/cli/blob/v5.14.0/src/commands/domain.rs>
- gotchas: "Version: v5.14.0"; "DOMAIN / DOMAIN_OR_ID: Creation accepts an optional custom domain; status, update, certificate retry, and delete require a domain name, URL, or domain ID."; "--port: Port to connect to on creation; target port for domain update. Validated as a port value."; "--service: Service whose domains to manage; if omitted, uses the resolved linked service context."; "--environment: Environment to use; defaults to the linked environment."; "--project: Project ID to use; defaults to the linked project."; "--domain <DOMAIN>: On update, rename a Railway-provided service domain using a full service domain or host label; custom domains cannot be renamed."; "--yes / -y: Skip the delete confirmation dialog."; "--json: Output in JSON format."; "Service-domain target ports can be updated and service domains can be renamed."; "Custom-domain target ports can be updated."; "Legacy `railway domain --json` output shapes are preserved."; "The change adds local MCP parity for create, list, status, update, certificate retry, and delete domain workflows."

### railway deployment list accepts --project (2026-06-15)
- slug: railway-deployment-list-accepts-project-440ec1a84f79
- score: 0.96

How to use it:

When you need deployments for a particular Railway project, run `railway deployment list --project <PROJECT>`. The project value can be its ID or name; deployments default to the linked project when the flag is omitted.

Examples:

```
railway deployment list --project <PROJECT>
```

- why_it_matters: List deployments for a specific project in the Railway CLI.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.13.0>, <https://github.com/railwayapp/cli/blob/v5.13.0/src/commands/deployment.rs>
- gotchas: "Version: v5.13.0"; "--project <PROJECT>: Project ID or name to list deployments from; defaults to the linked project."; "Docs conflict: Current Railway CLI docs list deployment list options but omit --project; v5.13.0 source documents the flag and is the relevant version."

### railway sandbox checkpoint commands create and boot saved checkpoints (2026-06-11)
- slug: railway-sandbox-checkpoint-commands-create-and-boot-saved-checkpoints-b697c5dcceaf
- score: 0.95

How to use it:

When you need to preserve a sandbox’s disk, run `railway sandbox checkpoint create <name>` to capture the active sandbox, or add `--id <ID>` to select one. Then run `railway sandbox create --checkpoint <name>` to boot a fresh sandbox from that checkpoint.

Examples:

```
railway sandbox checkpoint create <name>
```

```
railway sandbox checkpoint create <name> --id <ID>
```

```
railway sandbox create --checkpoint <name>
```

- why_it_matters: When working with a Railway sandbox, save its disk state and start a fresh sandbox from that saved state.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.12.0>, <https://github.com/railwayapp/cli/pull/967>, <https://github.com/railwayapp/cli/blob/v5.12.0/src/commands/sandbox.rs>
- gotchas: "Version: v5.12.0"; "<name> (required): Checkpoint name; usable with `sandbox create --checkpoint`."; "--id <ID>: Select source sandbox ID; defaults to the active sandbox."; "--checkpoint <name>: Create from a named checkpoint; conflicts with `--template`."; "Prerequisite: The CLI documents that the `PROJECT_SANDBOXES` feature must be enabled."; "Checkpoint creation is synchronous and the checkpoint is ready when the command returns."; "Reusing a checkpoint name replaces the previous checkpoint."; "The checkpoint captures the active sandbox's disk; `--id` can be used to select a sandbox."

### railway connect tunnels to private databases over SSH (2026-06-11)
- slug: railway-connect-tunnels-to-private-databases-over-ssh-578afc570fd3
- score: 0.97

How to use it:

If the database service has no public proxy URL, run `railway connect <db>` to connect through an SSH tunnel. Use `--ssh` to force SSH, `--no-ssh` to require the public proxy, or `-P/--port <PORT>` to choose the local port.

Examples:

```
railway connect <db>
```

```
railway connect <db> --ssh
```

```
railway connect <db> --no-ssh -P <PORT>
```

- why_it_matters: Connect to a private Postgres, MySQL, Redis, or MongoDB service that has no public port.
- before: Before the change, `railway connect` required a public TCP proxy and errored for a private-only database service.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.11.0>, <https://github.com/railwayapp/cli/pull/955>, <https://docs.railway.com/cli/connect>, <https://docs.railway.com/cli/ssh>
- gotchas: "Version: v5.11.0"; "<db> / [SERVICE_NAME]: Database service name; if omitted, prompts for a service when multiple exist."; "--ssh: Use SSH instead of a public TCP proxy; automatic when no public proxy URL is available."; "--no-ssh: Force the public TCP proxy path; conflicts with `--ssh`."; "-P, --port <PORT>: Local port for the SSH tunnel; defaults to an ephemeral port."; "Prerequisite: Install the appropriate local database client: `psql` for PostgreSQL, `mysql` for MySQL, `redis-cli` for Redis, or `mongosh` for MongoDB. The client is not required when using `--tunnel-only`."; "Prerequisite: SSH connections require an SSH key registered with Railway; the CLI prompts to register a local key the first time you run `railway ssh`."; "Supported databases: Postgres, MySQL, Redis, and MongoDB."; "The local port is ephemeral by default unless pinned with `-P/--port`."; "The SSH tunnel lives as long as the client."

### railway config apply safety and config pull imports (2026-06-11)
- slug: railway-config-apply-safety-and-config-pull-imports-f0462c904cd9
- score: 0.91

How to use it:

When reviewing or importing Railway infrastructure configuration, run `railway config plan` to preview changes and pull with `--omit-preserved-variables` for a smaller import; unknown imported secrets otherwise render as `preserve()`. For destructive changes in a non-interactive or agent session, review the plan and use `railway config apply --confirm-destructive` only with explicit approval for that exact plan.

Examples:

```
railway config plan
```

```
railway config pull --omit-preserved-variables
```

```
railway config apply --confirm-destructive
```

- why_it_matters: When reviewing or importing this repository’s Railway infrastructure configuration, preview the plan, preserve imported secrets, and apply destructive changes only after reviewing the plan and obtaining approval.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.9.1>, <https://github.com/railwayapp/cli/pull/962>, <https://github.com/railwayapp/cli/blob/v5.9.1/assets/railway-config/README.md>
- gotchas: "Version: v5.9.1"; "--omit-preserved-variables: For `railway config pull`, omit imported preserved variable entries for a smaller import."; "--confirm-destructive: For `railway config apply`, required for destructive changes in non-interactive or agent sessions after reviewing the plan."; "--yes: For `railway config apply`, skip the confirmation prompt. The v5.9.1 README does not document its rejection by `railway config plan`."; "Destructive changes in non-interactive or agent sessions require `--confirm-destructive` after reviewing the plan."; "Never use `railway config apply --yes` or `railway config apply --confirm-destructive` from an agent session without explicit user approval for the exact plan."; "`railway config plan --yes` is rejected."; "Unknown imported variable values are rendered as `preserve()` by default."

### railway sandbox offers to link the selected directory (2026-06-05)
- slug: railway-sandbox-offers-to-link-the-selected-directory-27d831b2f286
- score: 0.95

How to use it:

When `railway sandbox create` in an unlinked directory reaches the interactive project and environment picker, accept the link prompt to save that selection for later Railway commands. Choose No or press Esc to continue without linking.

Examples:

```
railway sandbox create
```

- why_it_matters: Run a `railway sandbox` command from an unlinked directory without `--project` or `--environment`, then reuse the selected project and environment in later commands.
- before: The project and environment picker re-ran for each sandbox create, list, or template invocation in an unlinked directory.
- sources: <https://github.com/railwayapp/cli/releases/tag/v5.4.2>, <https://github.com/railwayapp/cli/pull/951>, <https://docs.railway.com/sandboxes/quickstart>
- gotchas: "Version: v5.4.2"; "--project: The release note says omitting this flag allows the sandbox command to reach the picker if there is no existing link; the sandbox command’s flag definition was not found in the official docs."; "--environment: The release note says omitting this flag allows the sandbox command to reach the picker if there is no existing link; the sandbox command’s flag definition was not found in the official docs."; "Link prompt (Yes/No/Esc): Yes saves the selected project and environment as the directory link; No or Esc continues without linking."; "Prerequisite: Install the Railway CLI and authenticate with a Railway account; the sandbox quickstart says an existing project and environment are needed."; "The offer appears when a `railway sandbox` command falls through to the interactive workspace → project → environment picker because there are no `--project` or `--environment` flags and no existing link."; "Choosing No or pressing Esc continues the sandbox operation without linking."

### railway config commands manage project infrastructure as code (2026-06-05)
- slug: railway-config-commands-manage-project-infrastructure-as-code-e6a42d3df4d1
- score: 0.97

How to use it:

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
```

- 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>
- 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"

### railway add --repo supports selecting a branch (2026-06-04)
- slug: railway-add-repo-supports-selecting-a-branch-141dffea4468
- score: 0.92

How to use it:

When creating a service from a GitHub repository, pass `--repo <REPO>` and `--branch <BRANCH>` to `railway add` to target the branch. The add command documentation does not list `--branch`, so the full invocation is not verified there.

- why_it_matters: Create a Railway service from a GitHub repository targeting a specific branch.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.67.0>, <https://github.com/railwayapp/cli/pull/934>, <https://docs.railway.com/cli/add>, <https://docs.railway.com/cli/service>
- gotchas: "Version: v4.67.0"; "--repo <REPO> (required): GitHub repository to create the service from; documented add syntax uses `owner/repo`."; "--branch <BRANCH> (required): Branch to target. Railway documents this option for `railway service source connect`, but not for `railway add`."; "Docs conflict: The official add page lists `-r, --repo <REPO>` but does not list `--branch`; the official service page documents `--branch` only for `railway service source connect`. The release note says `railway add --repo` supports it in v4.67.0."

### railway service source connect and disconnect existing service sources (2026-06-04)
- slug: railway-service-source-connect-and-disconnect-existing-service-sources-e09f519ce3da
- score: 0.98

How to use it:

When you need to change an existing service’s source, use `railway service source connect` with either a GitHub repo or Docker image, or use `railway service source disconnect` to remove its current source.

Examples:

```
railway service source connect --repo <owner>/<repo> --branch <branch> --service <service>
```

```
railway service source connect --image <image> --service <service>
```

```
railway service source disconnect --service <service>
```

- why_it_matters: Connect or disconnect an existing Railway service to a GitHub repository or Docker image from the CLI.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.67.0>, <https://github.com/railwayapp/cli/pull/934>, <https://docs.railway.com/cli/service>
- gotchas: "Version: v4.67.0"; "--service <SERVICE> / -s (required): Service name or ID."; "--repo <REPO> (required): GitHub repository in `owner/repo` format; pass this or `--image`, which are mutually exclusive."; "--image <IMAGE> (required): Docker image to connect; pass this or `--repo`, which are mutually exclusive."; "--branch <BRANCH>: Branch to deploy from when connecting a GitHub repository."; "--environment <ENVIRONMENT> / -e: Environment to use."; "--project <PROJECT_ID> / -p: Project ID to use."; "--json: Output in JSON format."; "The new Docker-image handling applies to the existing-service source connection path."

### railway templates list lists workspace-owned templates (2026-05-25)
- slug: railway-templates-list-lists-workspace-owned-templates-ae68cf7fb04b
- score: 0.93

How to use it:

When repository work needs templates owned by your Railway workspace, run `railway templates list`; add `--workspace <id-or-name>` to filter or `--json` for JSON output. The command lists draft and published templates.

Examples:

```
railway templates list
```

```
railway templates list --workspace <workspace-id-or-name> --json
```

- why_it_matters: List templates owned by your workspace, optionally filtering to one workspace, for repository work that uses a template.
- before: Use `railway templates search` to list templates; its `list` / `ls` aliases have been removed, and those aliases now invoke the new owned-template listing command.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.62.0>, <https://github.com/railwayapp/cli/pull/917>, <https://docs.railway.com/cli/templates>
- gotchas: "Version: v4.62.0"; "--workspace <WORKSPACE>: Workspace ID or name; defaults to every workspace you belong to."; "--json: Print results as JSON."

### railway ssh config generates OpenSSH client config blocks (2026-05-19)
- slug: railway-ssh-config-generates-openssh-client-config-blocks-c049a3607588
- score: 0.94

How to use it:

To configure an OpenSSH entry for a Railway service, run `railway ssh config --service <service>`; it adds or updates a Railway block in `~/.ssh/config`.

Examples:

```
railway ssh config --service <service>
```

```
railway ssh config --service <service> --dry-run
```

- why_it_matters: Configure an OpenSSH client entry for a Railway service.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.59.0>, <https://docs.railway.com/cli/ssh>, <https://docs.railway.com/cli>
- gotchas: "Version: v4.59.0"; "--service <SERVICE>: Selects the service; the docs do not state whether this option is required for `config`."; "--project <PROJECT>: Selects the project; requiredness is not stated."; "--environment <ENVIRONMENT>: Selects the environment; requiredness is not stated."; "--path <PATH>: SSH config file to update; defaults to `~/.ssh/config`."; "--alias <ALIAS>: Host alias to use in the generated OpenSSH config block."; "--identity-file <PATH>: Emits an `IdentityFile` directive for this private key path."; "--dry-run: Prints the generated block without writing the SSH config file."; "Prerequisite: Authenticate with a Railway account before using the CLI (`railway login`)."

### railway service commands accept --project (2026-05-11)
- slug: railway-service-commands-accept-project-bffe6a9fca98
- score: 0.96

How to use it:

When a service-scoped command targets a project without a linked working directory, include `--project <PROJECT_ID>` and `--environment <ENVIRONMENT>`; without `--project`, Railway uses linked project, environment, and service fallbacks. For `domain`, use `--project` without `-p`, which selects the port.

Examples:

```
railway logs --project <PROJECT_ID> --environment <ENVIRONMENT>
```

```
railway variable set <KEY>=<VALUE> --project <PROJECT_ID> --environment <ENVIRONMENT>
```

```
railway domain --project <PROJECT_ID> --environment <ENVIRONMENT>
```

- why_it_matters: Run a service-scoped Railway CLI command against a project without linking the working directory first.
- before: Use the linked project, environment, and service context; commands requiring project targeting could also be run after linking the working directory.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.57.4>, <https://github.com/railwayapp/cli/pull/893>, <https://docs.railway.com/cli/logs>, <https://docs.railway.com/cli/variable>, <https://docs.railway.com/cli/domain>, <https://docs.railway.com/cli/deploying>, <https://docs.railway.com/cli/global-options>
- gotchas: "Version: v4.57.4"; "--project <PROJECT_ID>: Project to use; defaults to the linked project when omitted. Pair with `--environment` when specifying a project."; "--environment <ENVIRONMENT> (required): Environment to use with `--project`; the CLI docs say this flag is required when targeting a specific project."; "-s, --service <SERVICE>: Service to target; defaults to the linked service. Service name or ID is accepted."; "-p, --port <PORT>: Port to connect to a domain when creating one; `domain` uses `--project` without a short flag."; "<KEY>=<VALUE> (required): Variable assignment for `railway variable set`; repeat assignments to set multiple variables."; "Commands that accept `--project` require `--environment` to avoid ambiguous cross-project environment resolution."; "`domain` uses `--project` without a short flag because `-p` is already used for `--port`."; "Single-service fallback behavior is preserved for commands that can infer the target service."

### railway environment edit accepts --project (2026-05-10)
- slug: railway-environment-edit-accepts-project-df5150976806
- score: 0.96

How to use it:

When editing service configuration in a project that is not linked locally, pass the project and environment explicitly. Use `--service-config` with the service, dot path, and value; add `--stage` to stage changes without committing.

Examples:

```
railway environment edit --project <project-id> --environment <environment-id> --service-config <service> <dot.path> <value>
```

```
railway environment edit --project <project-id> --environment <environment-id> --service-config <service> <dot.path> <value> --stage
```

- why_it_matters: Stage or apply service configuration changes for a project that is not linked to the local directory.
- before: Without `--project`, the command required a locally linked project; the linked project remained the default.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.57.2>, <https://github.com/railwayapp/cli/pull/892>, <https://docs.railway.com/cli/environment>
- gotchas: "Version: v4.57.2"; "--project, -p <PROJECT_ID>: Select the project; the release note says it resolves from this option when provided, otherwise from the linked project."; "--environment, -e <ENV>: Select the environment to edit. Required with `--project` when no linked context exists, per the release note."; "--service-config, -s <SERVICE> <PATH> <VALUE>: Configure a service using a dot path; provide the service, property path, and value."; "--stage: Stage changes without committing."; "When using `--project` without linked context, `--environment` is required."

### Railway shell installer uses a user-owned install directory (2026-05-08)
- slug: railway-shell-installer-uses-a-user-owned-install-directory-415001e08ee1
- score: 0.96

How to use it:

When elevated permissions are unavailable, install the Railway CLI with the shell installer; it targets `~/.railway/bin` by default or `$RAILWAY_HOME/bin` when `RAILWAY_HOME` is set. The installer also makes the user-owned binary eligible for its self-update behavior. [Official v4.57.0 installer](https://github.com/railwayapp/cli/blob/v4.57.0/install.sh)

Examples:

```
curl -fsSL https://railway.com/install.sh | sh
```

- why_it_matters: Install the Railway CLI in an agent environment where elevated permissions are unavailable.
- before: The `cli.new` flow installed to `/usr/local/bin`, which often required elevated permissions. The release note says shell installs could then fall back to notification-only update behavior.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.57.0>, <https://github.com/railwayapp/cli/pull/888>, <https://github.com/railwayapp/cli/blob/v4.57.0/install.sh>
- gotchas: "Version: v4.57.0"; "Requires Shell installer (`install.sh`)"; "RAILWAY_HOME: When set, the installer uses `$RAILWAY_HOME/bin` as its default binary directory; otherwise it defaults to `$HOME/.railway/bin`."; "When `RAILWAY_HOME` is set, the install path is `$RAILWAY_HOME/bin/railway`."; "The release span links a PR description that is truncated after `## What changed`; additional details are unavailable."

### railway scale supports region assignments (2026-05-07)
- slug: railway-scale-supports-region-assignments-22ebd06da2f8
- score: 0.92

How to use it:

When setting a service’s replica counts by region, run `railway scale` with at least one `REGION=REPLICAS` assignment. For example, `railway scale eu-west=2 us-east=1` sets two replicas in EU West and one in US East.

Examples:

```
railway scale eu-west=2 us-east=1
```

```
railway scale --service <SERVICE> --environment <ENV> eu-west=2 us-east=1
```

- why_it_matters: When changing a service’s region scaling in Railway, set its region counts from the CLI.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.53.0>, <https://github.com/railwayapp/cli/pull/881>, <https://docs.railway.com/cli/scale>
- gotchas: "Version: v4.53.0"; "REGION=REPLICAS (required): One or more positional assignments: a friendly region name or Railway region ID, followed by a non-negative integer replica count. Maximum 50 total replicas across regions."; "-s, --service <SERVICE>: Service to scale; defaults to the linked service."; "-e, --environment <ENV>: Environment for the service; defaults to the linked environment."; "--json: Output the result in JSON format."

### railway agent skills and MCP configuration support (2026-05-07)
- slug: railway-agent-skills-and-mcp-configuration-support-7a3ceed53894
- score: 0.94

How to use it:

When configuring a project for Codex, run `railway mcp install --remote` to install Railway’s remote MCP configuration. The v4.50.0 release also adds GitHub Copilot and Factory Droid as detected agent targets.

Examples:

```
railway mcp install --remote
```

- why_it_matters: Configure Railway skills or MCP for a supported coding agent in a project.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.50.0>, <https://github.com/railwayapp/cli/pull/877>, <https://github.com/railwayapp/cli>
- gotchas: "Version: v4.50.0"; "--remote: Selects the remote MCP configuration for the install command."; "Prerequisite: Authenticate with `railway login` before using the CLI."; "Docs conflict: Current Railway MCP documentation describes `--remote` as a compatibility alias for the default CLI connection to mcp.railway.com; it says the direct HTTP endpoint is selected with `--oauth`. This current documentation may describe behavior newer than v4.50.0."

### railway setup agent configures Railway agent tooling (2026-05-07)
- slug: railway-setup-agent-configures-railway-agent-tooling-81f1c52d64b1
- score: 0.96

How to use it:

When Railway agent tooling is not configured, run `railway setup agent -y` to configure detected tools and skip prompts. Use `--agent <name>` to target a tool or `--remote` for the CLI-authenticated hosted MCP setup; MCP can also be installed separately.

Examples:

```
railway setup agent -y
```

```
railway setup agent -y --remote
```

```
railway mcp install --agent <agent> --remote
```

- why_it_matters: Set up Railway agent tooling for a coding environment that has not been configured yet.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.48.0>, <https://github.com/railwayapp/cli/pull/872>, <https://docs.railway.com/cli/setup>, <https://github.com/railwayapp/cli>
- gotchas: "Version: v4.48.0"; "-y, --yes: Skip prompts and accept detected defaults; also used automatically when stdout is not a terminal."; "--agent <agent>: Select a coding tool to configure."; "--remote: Connect to `mcp.railway.com` through the CLI using the `railway login` session; documented as the default and a compatibility alias in current docs."; "Prerequisite: Install the Railway CLI before running setup."; "Prerequisite: Run `railway login` if not authenticated; setup skips the interactive login flow in non-interactive mode."; "`-y/--yes` performs detected-only, non-interactive setup."; "Non-interactive setup is auto-engaged when stdout is not a TTY."; "Codex is skipped under `--remote` because it is stdio-only."; "The interactive harness picker includes Claude Code, Cursor, OpenAI Codex, OpenCode, and the universal `.agents` fallback."; "Docs conflict: Current Railway setup documentation says `--remote` is the default compatibility alias; the v4.48.0 release note describes it as selecting remote MCP instead of local stdio. Current docs may describe newer behavior."

### railway templates search adds published-template search (2026-05-05)
- slug: railway-templates-search-adds-published-template-search-5a88806398b7
- score: 0.98

How to use it:

When evaluating a template-based starting point, search published Railway templates with `railway templates search`; use JSON for scripts, and add filters or a cursor as needed.

Examples:

```
railway templates search <QUERY> --json
```

```
railway templates search --category <CATEGORY> --verified true --limit 50 --json
```

```
railway templates search --limit 50 --after <CURSOR> --json
```

- why_it_matters: Search published Railway templates while evaluating a template-based starting point for a repository.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.47.0>, <https://github.com/railwayapp/cli/pull/871>, <https://docs.railway.com/cli/templates>
- gotchas: "Version: v4.47.0"; "QUERY: Search term; seeds the picker in TTY mode."; "--json: Print results as JSON; disables the interactive picker."; "--limit <LIMIT>: Number of results to request; defaults to 20, maximum 50."; "--after <CURSOR>: Fetch the next page using `pageInfo.endCursor` from a previous response."; "--category <CATEGORY>: Filter by template category."; "--verified <BOOL>: Filter by verification state; accepts `true` or `false`."; "Prerequisite: The command does not require authentication."; "Prerequisite: TTY mode opens an interactive picker; outside a terminal, or with `--json`, results print to stdout."; "Interactive picker is for TTY mode."; "Non-interactive usage supports plain output and `--json`."; "`--verified` accepts `true` or `false`."; "`--limit` defaults to 20."

### railway CLI adds metrics inspection command (2026-05-04)
- slug: railway-cli-adds-metrics-inspection-command-49e1f4303663
- score: 0.99

How to use it:

When reviewing a Railway deployment, inspect metrics for the linked service (last hour by default) or select a service and environment; use the documented filters, time range, or output mode for the needed detail.

Examples:

```
railway metrics --service <service> --environment <environment> --since 6h --json
```

```
railway metrics --http --method POST --path /api/users
```

```
railway metrics --raw --json --cpu
```

- why_it_matters: Inspect service or project resource and HTTP metrics while debugging or reviewing a Railway deployment.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.45.0>, <https://github.com/railwayapp/cli/pull/867>, <https://github.com/railwayapp/cli/blob/v4.45.0/src/commands/metrics.rs>, <https://docs.railway.com/cli>
- gotchas: "Version: v4.45.0"; "--service <service>: Select service by name or ID; defaults to linked service; conflicts with --all."; "--all: Show metrics for every service in the project; conflicts with --raw."; "--environment <environment>: Select environment by name or ID; defaults to linked environment."; "--since <time>: Window start; relative value (1h, 6h, 1d, 7d) or ISO 8601; defaults to 1h."; "--until <time>: Window end, using same formats as --since; defaults to now; conflicts with --watch."; "--cpu: Show CPU metrics only, unless combined with other metric group filters."; "--memory: Show memory metrics only, unless combined with other metric group filters."; "--network: Show public network traffic only, unless combined with other metric group filters."; "--volume: Show volume/disk metrics only, unless combined with other metric group filters."; "--http: Show HTTP metrics only, unless combined with other metric group filters."; "--method <method>: Filter HTTP metrics by request method; requires --http; method value is case-insensitive enum."; "--path <path>: Filter HTTP metrics by request path; requires --http."; "--json: Output in JSON format; conflicts with --watch."; "--raw: Output raw time-series data points instead of summaries; conflicts with --all and --watch."; "--watch: Continuously refresh metrics in a live TUI dashboard; conflicts with --json, --raw, and --until."; "Prerequisite: Install Railway CLI and authenticate with `railway login`; link a project/environment for the command context. Official CLI docs list installation and authentication steps."; "Prerequisite: HTTP filters `--method` and `--path` require `--http`; `--watch` supports only documented time ranges for `--since`."

### railway redeploy adds --from-source (2026-04-28)
- slug: railway-redeploy-adds-from-source-34d84b93953a
- score: 0.92

How to use it:

When redeploying from the latest commit or image, run `railway redeploy --from-source` (the v4.44.0 release says this flag pulls the latest commit or image).

Examples:

```
railway redeploy --from-source
```

- why_it_matters: Redeploy an application using its latest commit or image as the source.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.44.0>, <https://docs.railway.com/cli/redeploy>, <https://github.com/railwayapp/cli/blob/master/README.md?plain=1>
- gotchas: "Version: v4.44.0"; "--from-source: Pull the latest commit or image when redeploying; the release note does not document further behavior."; "-s, --service <SERVICE>: Select the service; defaults to the linked service."; "Prerequisite: Authenticate with a Railway account before using the CLI."; "Docs conflict: The current Railway redeploy documentation does not list `--from-source`; it documents `railway redeploy [OPTIONS]` and the `--service`, `--yes`, and `--json` options. The release note for v4.44.0 explicitly adds `--from-source`."

### railway service delete removes a service from an environment (2026-04-23)
- slug: railway-service-delete-removes-a-service-from-an-environment-48532e244b42
- score: 0.97

How to use it:

When removing a service from an environment, run `railway service delete`; pass `--service` and `--environment` to target them explicitly, and use `--yes` to skip confirmation. In non-interactive mode, add `--2fa-code <code>` if 2FA is enabled; add `--json` for JSON output.

Examples:

```
railway service delete --service <service-name-or-id> --environment <environment> --yes --json
```

```
railway service delete --service <service-name-or-id> --environment <environment> --yes --2fa-code <two-factor-code>
```

- why_it_matters: Remove a service from an environment using the Railway CLI.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.42.0>, <https://github.com/railwayapp/cli/pull/860>, <https://github.com/railwayapp/cli/blob/v4.42.0/src/commands/service.rs>
- gotchas: "Version: v4.42.0"; "--service <SERVICE>: Service name or ID to delete; defaults to the linked service."; "--environment <ENVIRONMENT>: Environment to delete the service from; defaults to the linked environment."; "--yes: Skip the confirmation dialog; non-interactive deletion requires this to skip prompting."; "--json: Output in JSON format."; "--2fa-code <TWO_FACTOR_CODE>: 2FA code for verification; required if 2FA is enabled in non-interactive mode."; "`--service` defaults to the linked service."; "`--environment` defaults to the linked environment."; "`--2fa-code` is required for verification if 2FA is enabled in non-interactive mode."

### railway skills command installs agent skills (2026-04-17)
- slug: railway-skills-command-installs-agent-skills-486c96a3704e
- score: 0.95

How to use it:

When installing Railway agent skills, run `railway skills install`; use `--agent` to target specific tools.

Examples:

```
railway skills install
```

```
railway skills install --agent <agent>
```

- why_it_matters: Install agent skills for a coding-agent workflow using the Railway CLI.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.39.0>, <https://docs.railway.com/cli/skills>
- gotchas: "Version: v4.39.0"; "install: Installs or updates Railway agent skills. Running `railway skills` with no subcommand is equivalent to `install`."; "--agent <AGENT>: Targets specific agent(s) instead of auto-detection; may be passed multiple times. Documented values include `universal`, `claude-code`, `cursor`, `codex`, `opencode`, `factory-droid`, and `copilot`."

### railway config targets project, environment, and service through environment variables (2026-03-25)
- slug: railway-config-targets-project-environment-and-service-through-environment-varia-966d4454dde5
- score: 0.94

How to use it:

When running a Railway CLI command without persisted link state, set both project and environment IDs; the CLI then builds the linked project from those IDs. Set the service ID optionally to target a service.

Examples:

```
RAILWAY_TOKEN=<project-token> RAILWAY_PROJECT_ID=<project-id> RAILWAY_ENVIRONMENT_ID=<environment-id> RAILWAY_SERVICE_ID=<service-id> railway status
```

- why_it_matters: Run Railway CLI commands in a CI or scripting workflow that cannot persist link state on disk.
- before: The CLI deployment guide instructs users to run `railway link` before `railway up` when the project is not already linked.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.35.0>, <https://github.com/railwayapp/cli/pull/823>, <https://github.com/railwayapp/cli/blob/v4.35.0/src/config.rs>, <https://docs.railway.com/cli/login>, <https://docs.railway.com/cli/deploying>
- gotchas: "Version: v4.35.0"; "RAILWAY_PROJECT_ID (required): Project ID; must be set together with RAILWAY_ENVIRONMENT_ID for env-var targeting."; "RAILWAY_ENVIRONMENT_ID (required): Environment ID; must be set together with RAILWAY_PROJECT_ID for env-var targeting."; "RAILWAY_SERVICE_ID: Service ID to use; if absent, the CLI may use a service from the locally linked project configuration."; "RAILWAY_TOKEN (required): Authentication token required for this env-var project targeting path; Railway documents project tokens for project-scoped CLI actions."; "Prerequisite: Authenticate with a Railway token; the v4.35.0 targeting code errors when no Railway auth token is available. Railway documents RAILWAY_TOKEN for project-scoped operations."; "The `LinkedProject` is constructed on the fly when both project ID and environment ID environment variables are set."

### railway adds native SSH and SSH key management (2026-03-18)
- slug: railway-adds-native-ssh-and-ssh-key-management-a95e5a92ebd0
- score: 0.98

How to use it:

When opening an interactive shell, connect with `ssh <service-instance-id>@ssh.railway.com`. To manage keys, use `railway ssh keys` to list, `add` to register a local key, `remove` to delete a key, or `github` to import keys from your linked GitHub account.

Examples:

```
ssh <service-instance-id>@ssh.railway.com
```

```
railway ssh keys add --key <public-key-path> --name <key-name>
```

```
railway ssh keys remove
```

- why_it_matters: Connect interactively to a Railway service instance or manage SSH keys for a repository’s development environment.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.33.0>, <https://github.com/railwayapp/cli/pull/809>, <https://docs.railway.com/cli/ssh>, <https://github.com/railwayapp/docs/blob/main/content/docs/cli/ssh.md>
- gotchas: "Version: v4.33.0"; "<service-instance-id> (required): Service instance ID used as the SSH username when the service has no public domain."; "keys list: Lists registered SSH keys; `list` is the default when no subcommand is given."; "keys add: Registers a local SSH key with Railway."; "--key <PATH>: Public key file path for `add`."; "--name <NAME>: Name for the key being registered with `add`."; "keys remove: Removes a registered SSH key."; "--2fa-code <CODE>: 2FA code for verification when removing a key."; "keys github: Imports SSH keys from the linked GitHub account."; "Prerequisite: Have an SSH key registered with Railway before connecting. On the first `railway ssh`, the CLI prompts to register a local key."; "Native SSH is for interactive shells."; "Command execution and tmux sessions still use WebSocket relay because SSH exec is not supported through the QUIC tunnel."; "The `--relay` flag is hidden."; "Removing a registered SSH key supports 2FA."

### railway logs adds HTTP request logs (2026-03-18)
- slug: railway-logs-adds-http-request-logs-0fd08b5f9b2b
- score: 0.99

How to use it:

When debugging a Railway service, use `railway logs --http` to stream edge request logs live in a terminal; add `--lines` for historical logs, `--filter` for query filters, or `--json` for newline-delimited JSON.

Examples:

```
railway logs --http --lines 50
```

```
railway logs --http --filter "@path:/api/users @httpStatus:200"
```

```
railway logs --http --json --filter "@requestId:<request-id>"
```

- why_it_matters: Inspect or stream HTTP request logs while debugging a Railway service.
- before: Use the existing CLI workflow for build and deploy logs, which did not include HTTP request logs.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.32.0>, <https://github.com/railwayapp/cli/pull/810>, <https://docs.railway.com/cli/logs>
- gotchas: "Version: v4.32.0"; "--http (required): Select HTTP request logs; log type flags are mutually exclusive."; "--lines <N>: Fetch N log lines; disables streaming."; "--filter <QUERY>: Filter with Railway query syntax, including `@path`, `@httpStatus`, and `@requestId`; supports AND, OR, negation, and numeric comparisons/ranges."; "--json: Output logs in JSON format; HTTP output is newline-delimited JSON."; "Live follow for HTTP logs is available from an interactive terminal."

### railway mcp adds an experimental local MCP server (2026-03-18)
- slug: railway-mcp-adds-an-experimental-local-mcp-server-c5f079468769
- score: 0.98

How to use it:

If the repository coding task requires managing Railway projects, start the experimental local MCP server with `railway mcp`; it serves MCP over stdio. Use the tools exposed by that server for supported Railway operations.

Examples:

```
railway mcp
```

```
{"mcpServers":{"railway":{"command":"railway","args":["mcp"]}}}
```

- why_it_matters: Determine whether the experimental Railway MCP server applies to a repository coding task that requires managing Railway projects.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.32.0>, <https://github.com/railwayapp/cli/pull/813>, <https://github.com/railwayapp/cli/blob/v4.32.0/src/commands/mcp/mod.rs>, <https://github.com/railwayapp/cli>
- gotchas: "Version: v4.32.0"; "Availability: Experimental and subject to change."; "Prerequisite: The command initializes Railway CLI configuration and an authorized GraphQL client; authenticate the CLI before starting the server. The v4.32.0 command has no command-line arguments."; "MCP server runs locally over stdio."; "Docs conflict: Current Railway CLI docs describe bare `railway mcp` as a hosted MCP proxy and use `railway mcp local` for the GraphQL-backed local server. That differs from v4.32.0, whose command starts a local stdio server; current behavior must not be substituted for the card's version."

### railway delete commands accept --2fa-code for non-interactive verification (2026-01-26)
- slug: railway-delete-commands-accept-2fa-code-for-non-interactive-verification-6986d9a6d39d
- score: 0.95

How to use it:

When 2FA is enabled and deletion runs non-interactively, provide a verification code with `--2fa-code`. Use the matching delete command and `--yes` to skip confirmation.

Examples:

```
railway delete --project <project-name-or-id> --yes --2fa-code <CODE>
```

```
railway environment delete <environment> --yes --2fa-code <CODE>
```

```
railway volume delete --volume <volume-name-or-id> --yes --2fa-code <CODE>
```

- why_it_matters: When deleting a project, environment, or volume in a Railway account with 2FA enabled, run the delete command non-interactively with a verification code.
- before: With 2FA enabled, non-interactive destructive commands failed with “2FA is enabled. This operation requires interactive mode.”
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.27.2>, <https://github.com/railwayapp/cli/pull/773>, <https://github.com/railwayapp/cli/blob/v4.27.2/src/commands/delete.rs>, <https://github.com/railwayapp/cli/blob/v4.27.2/src/commands/environment/delete.rs>, <https://github.com/railwayapp/cli/blob/v4.27.2/src/commands/volume.rs>, <https://docs.railway.com/cli/environment>, <https://docs.railway.com/cli>
- gotchas: "Version: v4.27.2"; "--2fa-code <CODE>: 2FA verification code; required when 2FA is enabled and running non-interactively."; "--yes: Skip the confirmation dialog; needed to avoid a confirmation prompt in non-interactive mode."; "--project <project-name-or-id>: Project ID or name to delete; required when project deletion runs without a terminal."; "<environment> (required): Environment name or ID to delete."; "--volume <volume-name-or-id>: Volume ID or name to delete; command uses the linked project and environment when not otherwise specified."; "Prerequisite: Authenticate the Railway CLI with a Railway account before use."; "Prerequisite: For volume deletion, the CLI requires a linked project and environment."; "Applies to destructive operations when 2FA is enabled on a Railway account."; "The flag supports deleting projects, environments, and volumes."

### Railway CLI adds object-action subcommands with backward compatibility (2026-01-14)
- slug: railway-cli-adds-object-action-subcommands-with-backward-compatibility-4dc12ae24d58
- score: 0.91

How to use it:

When scripting Railway project, service, environment, or variable tasks, use the matching object-action subcommand. Pass the target arguments and options shown below; the older root commands remain available.

Examples:

```
railway service logs --service <service> --lines <count>
railway service restart --service <service>
railway service scale --service <service> <region>=<replicas>
```

```
railway project list
railway project link <project>
railway project delete <project>
```

```
railway environment link <environment>
railway variable list --service <service> --environment <environment>
railway variable set KEY=VALUE --service <service> --environment <environment>
railway variable delete KEY --service <service> --environment <environment>
```

- why_it_matters: When scripting Railway project, service, environment, or variable operations, use the object-action subcommands for the corresponding task.
- before: The previous root commands remained supported, including `railway logs`, `railway list`, `railway delete`, and `railway variables` / `railway variables --set`.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.24.0>, <https://github.com/railwayapp/cli/pull/761>, <https://github.com/railwayapp/cli/blob/v4.24.0/src/commands/service.rs>, <https://github.com/railwayapp/cli/blob/v4.24.0/src/commands/project.rs>, <https://github.com/railwayapp/cli/blob/v4.24.0/src/commands/variable.rs>, <https://github.com/railwayapp/cli/blob/v4.24.0/src/commands/scale.rs>, <https://github.com/railwayapp/cli/blob/v4.24.0/src/commands/logs.rs>, <https://github.com/railwayapp/cli/blob/v4.24.0/src/commands/environment.rs>
- gotchas: "Version: v4.24.0"; "<service> / --service: Service name or ID; omitted service targets the linked service."; "<region>=<replicas> (required): Regional replica count assignment for service scale; multiple assignments are accepted."; "--lines <N>: Fetch this many log lines; disables streaming."; "<project>: Project to link or delete; command-specific prompt/default behavior applies when omitted."; "<environment>: Environment to link; omitted value permits interactive selection."; "--environment <ENV>: Environment to target for variable operations; defaults to linked environment."; "KEY=VALUE (required): Variable assignment; the set command accepts one or more assignments."; "KEY (required): Variable key to delete."; "Prerequisite: The CLI commands create an authorized Railway client and resolve the linked project context; authenticate and link a project before running them."

### railway CLI adds standalone railway restart command (2026-01-08)
- slug: railway-cli-adds-standalone-railway-restart-command-c80dbbbcfb2d
- score: 0.94

How to use it:

When you need to restart a Railway service, run `railway restart`; it restarts the most recent deployment without rebuilding it.

Examples:

```
railway restart
```

```
railway restart --service <SERVICE>
```

```
railway restart --yes
```

- why_it_matters: Restart the Railway resource or service you are working on from the CLI.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.22.0>, <https://docs.railway.com/cli/restart>, <https://docs.railway.com/cli>
- gotchas: "Version: v4.22.0"; "--service <SERVICE> (-s): Selects the service to restart; defaults to the linked service."; "--yes (-y): Skips the confirmation dialog."; "--json: Outputs in JSON format."; "Prerequisite: Install the Railway CLI and authenticate with `railway login` before using it."; "Prerequisite: The default target is the linked service; use `railway link` to link the project if needed."

### railway link adds a --json flag for CI (2026-01-08)
- slug: railway-link-adds-a-json-flag-for-ci-453609edb98a
- score: 0.94

How to use it:

When a CI job needs to link a Railway project with machine-readable output, run `railway link --project <project-id> --environment <environment-id> --json`. The command links the project to the current directory and emits JSON.

Examples:

```
railway link --project <project-id> --environment <environment-id> --json
```

- why_it_matters: Link a Railway project from a CI job that needs machine-readable output.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.20.0>, <https://docs.railway.com/cli/link>
- gotchas: "Version: v4.20.0"; "--project <ID|NAME> (required): Project to link to; CI example uses a project ID."; "--environment <ID|NAME> (required): Environment to link to; CI example uses an environment ID."; "--json: Output in JSON format."

### railway open adds a --print flag (2026-01-08)
- slug: railway-open-adds-a-print-flag-3e2d105214b1
- score: 0.94

How to use it:

When a repository workflow needs the linked project’s dashboard URL printed, run `railway open --print` to output it without opening a browser. [Railway `open` docs](https://docs.railway.com/cli/open)

Examples:

```
railway open --print
```

- why_it_matters: Use the Railway CLI's open command in a repository workflow that needs its output printed.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.20.0>, <https://docs.railway.com/cli/open>
- gotchas: "Version: v4.20.0"; "--print (-p) (required): For printing the URL, include this optional flag; it prints the URL instead of opening it."; "Prerequisite: Run from a directory linked to the Railway project whose dashboard URL you need."

### railway delete adds project deletion (2026-01-08)
- slug: railway-delete-adds-project-deletion-0444ee3452a9
- score: 0.93

How to use it:

When project removal is required, run `railway delete` to select a project and confirm deletion, or specify the project with `--project`.

Examples:

```
railway delete --project <ID|NAME>
```

```
railway delete --project <ID|NAME> --yes
```

- why_it_matters: Delete a Railway project from a coding workflow when project removal is required.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.19.0>, <https://docs.railway.com/cli/delete>, <https://docs.railway.com/cli>
- gotchas: "Version: v4.19.0"; "--project <ID|NAME>: Project to delete; omit to select interactively."; "--yes: Skip the confirmation dialog."; "--2fa-code <CODE>: Verification code when two-factor authentication is enabled."; "--json: Output in JSON format."; "Prerequisite: Authenticate with a Railway account before using the CLI (`railway login`)."; "Prerequisite: Install the Railway CLI."

### railway run accepts --project (2026-01-08)
- slug: railway-run-accepts-project-25efb4bddedc
- score: 0.95

How to use it:

When you need to run a repository command using a Railway project other than the linked project, pass `--project <ID>` to `railway run` and provide the command to execute.

Examples:

```
railway run --project <PROJECT_ID> <COMMAND> [ARGS...]
```

- why_it_matters: Run a repository command against a Railway project other than the one currently selected.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.19.0>, <https://docs.railway.com/cli/run>
- gotchas: "Version: v4.19.0"; "--project <ID>: Project ID to use; defaults to the linked project."; "<COMMAND> [ARGS...] (required): Command and arguments to execute."

### railway variable setting reads values from stdin (2026-01-08)
- slug: railway-variable-setting-reads-values-from-stdin-ec6191ab6025
- score: 0.92

How to use it:

When a repository workflow supplies a variable value on stdin, set it with `railway variable --set-from-stdin <KEY>`.

Examples:

```
printf '%s' '<value>' | railway variable --set-from-stdin <KEY>
```

- why_it_matters: Set a Railway variable from a value supplied by a repository workflow on stdin.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.19.0>, <https://docs.railway.com/cli/variable>
- gotchas: "Version: v4.19.0"; "--set-from-stdin <KEY> (required): Legacy flag that reads the variable value from stdin; provide the variable key. The docs say it is deprecated but still supported."; "-s, --service <SERVICE>: Select the service to set the variable for."; "-e, --environment <ENV>: Select the environment to set the variable in."; "Docs conflict: Current Railway CLI docs mark `--set-from-stdin KEY` deprecated but still supported; they recommend `railway variable set KEY --stdin` instead. https://docs.railway.com/cli/variable"

### Railway CLI volume list JSON output (2026-01-08)
- slug: railway-cli-volume-list-json-output-b6313088edd9
- score: 0.95

How to use it:

When a script needs to inspect Railway volumes, run `railway volume list --json` to print the listing as JSON.

Examples:

```
railway volume list --json
```

- why_it_matters: Read volume listings as JSON in a script that inspects Railway volumes.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.18.1>, <https://docs.railway.com/cli/volume>, <https://docs.railway.com/cli>
- gotchas: "Version: v4.18.1"; "--json: Output in JSON format."; "--service <SERVICE>: Select a service ID."; "--environment <ENV>: Select an environment ID."; "--project <PROJECT_ID>: Select a project ID."; "Prerequisite: Authenticate with a Railway account using `railway login`; for CI/CD, set `RAILWAY_TOKEN` or `RAILWAY_API_TOKEN` as appropriate."

### railway logs accepts --since and --until (2026-01-08)
- slug: railway-logs-accepts-since-and-until-2521e4a6a0a4
- score: 0.96

How to use it:

When debugging a repository deployment, run `railway logs` with `--since` and `--until` to fetch logs for a specific time range. Without a log type flag, it fetches deploy logs by default.

Examples:

```
railway logs --since <START_TIME> --until <END_TIME>
```

```
railway logs --service <SERVICE> --environment <ENVIRONMENT> --since <START_TIME> --until <END_TIME>
```

- why_it_matters: Retrieve Railway logs for a specific time range while debugging a repository deployment.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.18.0>, <https://docs.railway.com/cli/logs>, <https://docs.railway.com/cli>
- gotchas: "Version: v4.18.0"; "--since <TIME> (required): Show logs since a specific time; disables streaming. Accepts relative times or ISO 8601 timestamps."; "--until <TIME> (required): Show logs until a specific time; disables streaming. Accepts relative times or ISO 8601 timestamps."; "--service <SERVICE>: Select the service; defaults to the linked service."; "--environment <ENV>: Select the environment; defaults to the linked environment."; "Prerequisite: Install the Railway CLI and authenticate with a Railway account using `railway login`."

### railway logs adds --latest and railway status adds activeDeployments (2026-01-07)
- slug: railway-logs-adds-latest-and-railway-status-adds-activedeployments-51f4642b9f90
- score: 0.91

How to use it:

When debugging a Railway service, run `railway logs --latest` to view logs from its latest deployment, and `railway status --json` to inspect the status payload, including `activeDeployments` (added in v4.17.0).

Examples:

```
railway logs --latest
```

```
railway status --json
```

- why_it_matters: Retrieve the latest logs or inspect active deployments while debugging a Railway service.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.17.0>, <https://docs.railway.com/cli/logs>, <https://docs.railway.com/cli/status>, <https://docs.railway.com/cli>
- gotchas: "Version: v4.17.0"; "--latest: For deployment logs, select the latest deployment, even if it failed or is still building."; "--json: Output status in JSON format."; "activeDeployments: Added to `status` output in v4.17.0; current docs do not describe its structure or sub-keys."; "Prerequisite: Authenticate with `railway login` before using the CLI."; "Prerequisite: `railway status` describes the linked project, environment, and resources."

### railway up accepts --project (2026-01-07)
- slug: railway-up-accepts-project-63f1ce5a498a
- score: 0.97

How to use it:

When deploying to a selected Railway project, run `railway up` with `--project <project-id>` and `--environment <environment>`; current docs say the environment flag is required with `--project`.

Examples:

```
railway up --project <project-id> --environment <environment>
```

- why_it_matters: Deploy a repository from a selected Railway project.
- sources: <https://github.com/railwayapp/cli/releases/tag/v4.17.0>, <https://docs.railway.com/cli/deploying>, <https://docs.railway.com/cli/up>
- gotchas: "Version: v4.17.0"; "--project <ID> (required): Selects the project to deploy to; the current command reference says the default is the linked project."; "--environment <ENV> (required): Selects the deployment environment; current deploying docs require it when using `--project`."; "Prerequisite: The current docs require `--environment` when `--project` is used."; "Prerequisite: For automated deployments, Railway documents using a Project Token scoped to an environment."; "Docs conflict: The current docs require `--environment` alongside `--project`; the v4.17.0 release note only says the flag was added and does not state this requirement. The current command reference describes current behavior, which may differ from v4.17.0."
