Back to Skills

railway-cli

verified

Railway CLI expert for deployment. Use when users need to deploy apps, manage databases, configure Railway projects, or manage environments.

View on GitHub

Marketplace

topographic-plugins-official

leobrival/topographic-plugins-official

Plugin

dev

development

Repository

leobrival/topographic-plugins-official

plugins/dev/skills/railway-cli/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/leobrival/topographic-plugins-official/blob/main/plugins/dev/skills/railway-cli/SKILL.md -a claude-code --skill railway-cli

Installation paths:

Claude
.claude/skills/railway-cli/
Powered by add-skill CLI

Instructions

# Railway CLI Guide

Railway is a deployment platform that simplifies deploying and managing web applications, databases, and services. This guide provides essential workflows and quick references for common Railway operations.

## Quick Start

```bash
# Check Railway CLI installation
railway --version

# Authenticate with Railway
railway login

# Create and initialize new project
railway init my-app

# Add a database
railway add --database postgres

# Deploy application
railway up

# View logs in real-time
railway logs --follow
```

## Common Workflows

### Workflow 1: Deploy New Application

```bash
# Initialize project
railway init my-project

# Configure environment variables
railway variables set NODE_ENV=production
railway variables set PORT=3000

# Add database if needed
railway add --database postgres

# Deploy
railway up

# Verify deployment
railway logs --follow
railway status
```

### Workflow 2: Link Existing Project & Deploy

```bash
# Link to existing Railway project
railway link

# Review current status
railway status

# Update environment variables
railway variables set API_KEY=new-value

# Redeploy with changes
railway redeploy

# Follow logs
railway logs --follow
```

### Workflow 3: Multi-Environment Setup

```bash
# Create staging environment
railway environment new staging

# Switch to staging
railway environment use staging

# Configure staging-specific variables
railway variables set LOG_LEVEL=debug

# Deploy to staging
railway deploy

# Switch to production
railway environment use production

# Deploy to production
railway deploy
```

### Workflow 4: Database Management

```bash
# Add PostgreSQL
railway add --database postgres

# Connect to database
railway connect postgres

# Set database variables in application
railway variables set DATABASE_URL=$(railway variables get DATABASE_URL)

# Run migrations
railway run npm run migrate

# Verify connection
railway ssh --command "psql $DATABASE_URL -c 'SELECT 1'"
```

### Workflow 5: Debugging Depl

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
6410 chars