railway config plan, apply, and pull accept --environment
Introduced 2026-10-08 · 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.
railway config plan --environment <ENV>railway config apply --environment <ENV>railway config pull --environment <ENV>WHY THIS HELPS
Target an environment when planning, applying, or pulling Railway configuration.
REQUIREMENTS AND LIMITATIONS
- 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.
FIRST-PARTY EVIDENCE
- 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
Check the installed version and the source before using it. Entry JSON