186 stable releases
Uses new Rust 2024
| new 4.58.0 | May 12, 2026 |
|---|---|
| 4.44.0 | Apr 28, 2026 |
| 4.36.0 | Mar 31, 2026 |
| 4.16.1 | Dec 20, 2025 |
| 0.0.16 | Mar 3, 2023 |
#72 in Artificial intelligence
1.5MB
41K
SLoC
Railway CLI
The Railway CLI lets you interact with your Railway projects from the command line. Read the CLI documentation.
Installation
Install the Railway CLI with agent support configured in one step (macOS, Linux, Windows via WSL):
bash <(curl -fsSL railway.com/install.sh) --agents -y
This installs the CLI to ~/.railway/bin and runs railway setup agent to configure detected agent tools.
To install the CLI without agent configuration:
bash <(curl -fsSL railway.com/install.sh) -y
Uninstall the CLI:
bash <(curl -fsSL cli.new) -r
Other installation methods are available in the CLI documentation: Homebrew, npm, Scoop, pre-built binaries, and source builds.
Authentication
Before using the CLI, authenticate with your Railway account:
railway login
For environments without a browser, such as SSH sessions, use browserless login:
railway login --browserless
Tokens
For CI/CD pipelines, set environment variables instead of using interactive login:
- Project token: Set
RAILWAY_TOKENfor project-level actions. - Account or workspace token: Set
RAILWAY_API_TOKENfor account-level or workspace-level actions.
RAILWAY_TOKEN=xxx railway up
See Tokens for more information.
Agent Setup
Configure Railway agent support for AI coding tools:
railway setup agent -y
This installs Railway skills and configures the Railway MCP server for detected tools such as Claude Code, Cursor, Codex, OpenCode, GitHub Copilot, and Factory Droid.
Use the focused commands when you only need one part of the setup:
railway mcp install --agent cursor
railway skills --agent claude-code
Contributing
See CONTRIBUTING.md for information on setting up this repository locally.
Feedback
Share feedback and suggestions on Central Station.
Dependencies
~40–65MB
~1M SLoC