Railway CLI logo

Railway CLI

Command-line client for Railway projects: deploy with `railway up`, manage IaC config, configure AI agent tools via MCP, and launch cloud agent VMs.

install

The Railway CLI is a command-line client for interacting with Railway projects. It authenticates with railway login (or railway login --browserless for SSH sessions) and runs commands such as railway up. For CI/CD, it reads RAILWAY_TOKEN for project-level actions and RAILWAY_API_TOKEN for account or workspace-level actions instead of interactive login.

It includes infrastructure-as-code ownership commands: railway config partials list shows named partials and their owned resource addresses, release clears ownership, and transfer FROM TO moves it to another partial. These accept repeated --resource ADDRESS options and --dry-run, and only change ownership metadata. Update handling is built in: railway upgrade installs the CLI and syncs managed skills, railway autoupdate status and disable (or RAILWAY_NO_AUTO_UPDATE=1) control background updates, and railway skills update reviews or forces skill updates.

Agent support is a notable part of the tool. railway setup agent -y installs Railway skills and configures the remote Railway MCP server (mcp.railway.com via railway mcp proxy) for detected tools including Claude Code, Cursor, Codex, OpenCode, GitHub Copilot, Factory Droid, and Pi. Focused commands like railway mcp install --agent cursor and railway skills --agent claude-code handle single pieces, and --local selects a local GraphQL-backed MCP server.

The railway code command launches cloud agent VMs with --codex, --opencode, --claude, --grok, or --railway. railway code --railway opens a local TUI connected over WebSocket to the VM's agent daemon, and railway ca create supports --code-endpoint, --code-port, and --from-checkpoint. It targets developers deploying on Railway, and it runs on macOS, Linux, and Windows via WSL.

Installation

# via Install script
bash <(curl -fsSL railway.com/install.sh) -y
# via Install script with agent setup
bash <(curl -fsSL railway.com/install.sh) --agents -y

Alternatives & related tools

add a badge to your README

Maintain Railway CLI? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/railway-cli.svg)](https://www.trmn.sh/tools/railway-cli?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/railway-cli?utm_source=badge"><img src="https://www.trmn.sh/badge/railway-cli.svg" alt="Featured on trmn" height="20"></a>