railway-cli
Skill2 starsChanged 7 months agoMITView on GitHub
Manage Railway cloud deployments via the Railway CLI. Use when the user wants to deploy, manage services, set variables, view logs, link projects, add databases, configure domains, manage volumes, or perform any Railway platform operation from the terminal.
- Reads credentials
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Xipher-Labs/walter-ostheir own version, first seen May 21, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Xipher-Labs/walter-os★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- astroSkill
- autumnSkill
- bootstrap-ts-ossSkill
- bunSkill
- calculatorSkill
- code-reviewSkill
- drizzleSkill
- fumadocsSkill
- hetzner-cloudSkill
- isolated-vmSkill
- legal-tos-privacySkill
- loopsSkill
- mintlifySkill
- openclawSkill
- partitioned-review-fix-loopSkill
- posthogSkill
- qa-testingSkill
- quickjs-sandboxSkill
- review-fix-loopSkill
- saas-ai-imagerySkill
- saas-email-marketingSkill
- saas-website-copySkill
- sprites-devSkill
- supabaseSkill
- tanstack-querySkill
- vercel-platformsSkill
- vercel-sandboxSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
After install, verify with railway --version, then resume the original task.
- Very specific: line 38
Always prefer --help output over memorized flags when composing complex commands.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Railway CLI
Operate the Railway platform from the command line. Covers the full lifecycle: authentication, project setup, deployment, services, variables, environments, logs, domains, volumes, functions, and local development.
Source of truth: Railway CLI Docs
Handling Missing Installation
Assume railway is installed. If a command fails with "command not found" or similar, install it before retrying:
# macOS (preferred)
brew install railway
# Any OS with Node.js >= 16
npm i -g @railway/cli
# Shell script (macOS / Linux / WSL)
bash <(curl -fsSL cli.new)After install, verify with railway --version, then resume the original task.
Self-Discovery
The Railway CLI evolves across versions. When you encounter an unfamiliar subcommand or need to check current flags:
railway --help # Top-level commands
railway <command> --help # Subcommand flags and usageAlways prefer --help output over memorized flags when composing complex commands. This keeps behavior correct even as the CLI updates.
Authentication
railway login # Browser-based login
railway login --browserless # Token-based login (CI, SSH sessions)
railway logout
railway whoami # Verify current identityCI/CD token auth (no interactive login):
RAILWAY_TOKEN— project-scoped actionsRAILWAY_API_TOKEN— account/workspace-scoped actions
RAILWAY_TOKEN=<token> railway upProject Lifecycle
Create or link
railway init # Create new project (interactive)
railway link # Link cwd to existing project
railway unlink # Unlink cwdInspect
railway status # Current project/service/environment info
railway list # All projects in workspace
railway open # Open project in browserDeployment
railway up # Deploy cwd
railway up --detach # Deploy without tailing logs
railway deploy --template postgres # Deploy from a template
railway redeploy # Redeploy latest deployment
railway restart # Restart service (no new build)
railway down # Remove latest deploymentServices
railway add # Add service (interactive)
railway add --database postgres # Add a database (postgres, mysql, redis, mongo)
railway add --repo user/repo # Add service from GitHub repo
railway service # Switch linked service (interactive)
railway scale # Scale service replicas
railway delete # Delete the projectVariables
railway variable list # List all variables
railway variable set KEY=value # Set a variable
railway variable set K1=v1 K2=v2 # Set multiple at once
railway variable delete KEY # Remove a variableEnvironments
railway environment # Switch environment (interactive)
railway environment new <name> # Create environment
railway environment delete <name> # Delete environmentLocal Development
railway run <cmd> # Run command with Railway env vars injected
railway shell # Open shell with Railway env vars
railway dev # Run services locally with Dockerrailway run is useful for running migrations, seeds, or scripts that need production/staging credentials without .env files.
Logs & Debugging
railway logs # Stream live deployment logs
railway logs --build # View build logs
railway logs -n 100 # Last N lines
railway ssh # SSH into running service container
railway connect # Connect to database shell (psql, mysql, redis-cli, mongosh)Networking
railway domain # Generate a Railway subdomain
railway domain example.com # Attach a custom domainVolumes
railway volume list
railway volume add
railway volume deleteFunctions
railway functions list
railway functions new
railway functions pushUtilities
railway completion bash # Generate shell completions (bash/zsh/fish)
railway docs # Open docs in browser
railway upgrade # Upgrade CLI to latest versionGlobal Flags
These flags work across most commands:
| Flag | Description |
-s, --service <name-or-id> | Target a specific service |
-e, --environment <name-or-id> | Target a specific environment |
--json | Output as JSON (useful for scripting) |
-y, --yes | Skip confirmation prompts |
-h, --help | Show help |
-V, --version | Show CLI version |
Common Workflows
First-time project setup
railway login
railway init # or: railway link
railway up
railway domain # get a public URL
railway logs # verify deploymentAdd a database to an existing project
railway add --database postgres
railway connect # verify connectivity
railway variable list # check injected DATABASE_URLDeploy with environment targeting
railway environment new staging
railway up -e staging
railway logs -e stagingRun a one-off command with prod vars
railway run -e production npx prisma migrate deployAdditional Resources
For the full and most current reference, see reference.md or consult:
- Railway CLI Docs
railway --help/railway <command> --help- Railway CLI GitHub
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

