Railway CLI adds object-action subcommands with backward compatibility
Introduced 2026-01-14 · 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.
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 THIS HELPS
When scripting Railway project, service, environment, or variable operations, use the object-action subcommands for the corresponding task.
BEFORE THIS CHANGE
The previous root commands remained supported, including `railway logs`, `railway list`, `railway delete`, and `railway variables` / `railway variables --set`.
REQUIREMENTS AND LIMITATIONS
- 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.
FIRST-PARTY EVIDENCE
- 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
Check the installed version and the source before using it. Entry JSON