* Add per-command telemetry via cliEventTrack mutation Sends command name, subcommand, duration, success/error, OS, arch, CLI version, and CI flag to the Railway API after each invocation. Silently skipped when unauthenticated, on network failure, or when the user opts out via DO_NOT_TRACK=1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Migrate telemetry to typed graphql_client mutation Pull updated schema with cliEventTrack mutation and replace the raw JSON POST with typed codegen via graphql_client, matching the rest of the codebase. Also adds DNS_RECORD_TYPE_TXT from the schema update. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add one-time telemetry notice on first run Shows a notice to stderr informing users about CLI usage data collection, with DO_NOT_TRACK=1 opt-out. Persisted to ~/.railway/notices.json so it only displays once. Suppressed in CI/non-TTY and when telemetry is already disabled. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Support RAILWAY_NO_TELEMETRY env var for opting out of telemetry Adds RAILWAY_NO_TELEMETRY=1 as a Railway-specific alternative to DO_NOT_TRACK=1 for disabling CLI telemetry. Updates the notice text to mention both variables. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix telemetry docs link to /cli/telemetry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix cargo fmt --all formatting in telemetry notice Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .cargo | ||
| .github | ||
| bin | ||
| npm-install | ||
| src | ||
| .dockerignore | ||
| .gitattributes | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CLAUDE.md | ||
| CONTRIBUTING.md | ||
| Dockerfile | ||
| flake.lock | ||
| flake.nix | ||
| install.sh | ||
| LICENSE | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
| release.toml | ||
| shell.nix | ||
| v2.sh | ||
Railway CLI
Overview
This is the command line interface for Railway. Use it to connect your code to Railway's infrastructure without needing to worry about environment variables or configuration.
The Railway command line interface (CLI) connects your code to your Railway project from the command line.
The Railway CLI allows you to:
- Create new Railway projects from the terminal
- Link to an existing Railway project
- Pull down environment variables for your project locally to run
- Create services and databases right from the comfort of your fingertips
And more.
Documentation
Quick start
Follow the CLI guide to install the CLI and run your first command.
Authentication
For non-interactive authentication details, see the CLI guide.
Installation
Package managers
Cargo
cargo install railwayapp --locked
Homebrew
brew install railway
NPM
npm install -g @railway/cli
Bash
# Install
bash <(curl -fsSL cli.new)
# Uninstall
bash <(curl -fsSL cli.new) -r
Scoop
scoop install railway
Arch Linux AUR
Install with Paru
paru -S railwayapp-cli
Install with Yay
yay -S railwayapp-cli
Docker
Install from the command line
docker pull ghcr.io/railwayapp/cli:latest
Use in GitHub Actions
For GitHub Actions setup, see the blog post at blog.railway.com/p/github-actions.
Use in GitLab CI/CD
For GitLab CI/CD setup, see the blog post at blog.railway.com/p/gitlab-ci-cd.
Contributing
See CONTRIBUTING.md for information on setting up this repository locally.
Feedback
We would love to hear your feedback or suggestions. The best way to reach us is on Central Station.
We also welcome pull requests into this repository. See CONTRIBUTING.md for information on setting up this repository locally.