deployment by railwayapp/railway-skills
npx skills add https://github.com/railwayapp/railway-skills --skill deployment管理现有的 Railway 部署:列出、查看日志、重新部署或移除。
重要提示: "移除部署" (railway down) 会停止当前部署但保留服务。要完全删除一个服务,请使用 environment 技能并设置 isDeleted: true。
railway deployment list --limit 10 --json
显示部署 ID、状态和元数据。用于查找特定的部署 ID 以查看日志或调试。
railway deployment list --service backend --limit 10 --json
railway logs --lines 100 --json
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
在非交互模式下,流式传输会自动禁用,CLI 会获取日志然后退出。
railway logs --build --lines 100 --json
用于调试构建失败或查看构建输出。
默认情况下 railway logs 显示最后一次成功的部署。使用 --latest 查看当前部署:
railway logs --latest --lines 100 --json
# 仅错误
railway logs --lines 50 --filter "@level:error" --json
# 文本搜索
railway logs --lines 50 --filter "connection refused" --json
# 组合过滤
railway logs --lines 50 --filter "@level:error AND timeout" --json
# 过去一小时的日志
railway logs --since 1h --lines 100 --json
# 30分钟前到10分钟前的日志
railway logs --since 30m --until 10m --lines 100 --json
# 从特定时间戳开始的日志
railway logs --since 2024-01-15T10:00:00Z --lines 100 --json
格式:相对时间(30s、5m、2h、1d、1w)或 ISO 8601 时间戳。
部署日志:
railway logs <deployment-id> --lines 100 --json
构建日志:
railway logs --build <deployment-id> --lines 100 --json
从 railway deployment list 获取部署 ID。
注意: 部署 ID 是一个位置参数,不是 --deployment <id>。--deployment 标志是一个布尔值,用于选择部署日志(与 --build 选择构建日志相对)。
重新部署最近的部署:
railway redeploy --service <name> -y
-y 标志跳过确认。在以下情况下很有用:
重启但不重新构建(会获取外部资源变更):
railway restart --service <name> -y
当外部资源(S3 文件、配置映射)发生变化但代码未变时使用。
停止当前部署。服务仍然存在,但没有正在运行的部署。
# 移除链接服务的部署
railway down -y
# 移除特定服务的部署
railway down --service web -y
railway down --service api -y
当用户说"移除部署"、"停止"或"停止部署"时,指的就是这个操作。
注意: 这不会删除服务。要完全删除一个服务,请使用 environment 技能并设置 isDeleted: true。
| 标志 | 描述 |
|---|---|
-s, --service <NAME> | 服务名称或 ID |
-e, --environment <NAME> | 环境名称或 ID |
--limit <N> | 最大部署数(默认 20,最大 1000) |
--json | JSON 输出 |
| 标志 | 描述 |
|---|---|
-s, --service <NAME> | 服务名称或 ID |
-e, --environment <NAME> | 环境名称或 ID |
-d, --deployment | 显示部署日志(默认,布尔标志) |
-b, --build | 显示构建日志(布尔标志) |
-n, --lines <N> | 行数(必需) |
-f, --filter <QUERY> | 使用查询语法过滤 |
--since <TIME> | 开始时间(相对时间或 ISO 8601) |
--until <TIME> | 结束时间(相对时间或 ISO 8601) |
--latest | 最近的部署(即使失败) |
--json | JSON 输出 |
[DEPLOYMENT_ID] | 特定部署(可选) |
| 标志 | 描述 |
|---|---|
-s, --service <NAME> | 服务名称或 ID |
-y, --yes | 跳过确认 |
| 标志 | 描述 |
|---|---|
-s, --service <NAME> | 服务名称或 ID |
-y, --yes | 跳过确认 |
| 标志 | 描述 |
|---|---|
-s, --service <NAME> | 服务名称或 ID |
-e, --environment <NAME> | 环境名称或 ID |
-y, --yes | 跳过确认 |
展示日志时:
deploy 技能status 技能environment 技能new 技能No service linked. Run `railway service` to select one.
No deployments found. Deploy first with `railway up`.
部署可能太旧(日志保留限制)或者服务尚未产生输出。
每周安装数
1.0K
仓库
GitHub 星标数
213
首次出现
Jan 20, 2026
安全审计
安装于
opencode855
codex831
gemini-cli792
claude-code778
github-copilot750
amp623
Manage existing Railway deployments: list, view logs, redeploy, or remove.
Important: "Remove deployment" (railway down) stops the current deployment but keeps the service. To delete a service entirely, use the environment skill with isDeleted: true.
railway deployment list --limit 10 --json
Shows deployment IDs, statuses, and metadata. Use to find specific deployment IDs for logs or debugging.
railway deployment list --service backend --limit 10 --json
railway logs --lines 100 --json
In non-interactive mode, streaming is auto-disabled and CLI fetches logs then exits.
railway logs --build --lines 100 --json
For debugging build failures or viewing build output.
By default railway logs shows the last successful deployment. Use --latest for current:
railway logs --latest --lines 100 --json
# Errors only
railway logs --lines 50 --filter "@level:error" --json
# Text search
railway logs --lines 50 --filter "connection refused" --json
# Combined
railway logs --lines 50 --filter "@level:error AND timeout" --json
# Logs from last hour
railway logs --since 1h --lines 100 --json
# Logs between 30 and 10 minutes ago
railway logs --since 30m --until 10m --lines 100 --json
# Logs from specific timestamp
railway logs --since 2024-01-15T10:00:00Z --lines 100 --json
Formats: relative (30s, 5m, 2h, 1d, 1w) or ISO 8601 timestamps.
Deploy logs:
railway logs <deployment-id> --lines 100 --json
Build logs:
railway logs --build <deployment-id> --lines 100 --json
Get deployment ID from railway deployment list.
Note: The deployment ID is a positional argument, NOT --deployment <id>. The --deployment flag is a boolean that selects deploy logs (vs --build for build logs).
Redeploy the most recent deployment:
railway redeploy --service <name> -y
The -y flag skips confirmation. Useful when:
Restart without rebuilding (picks up external resource changes):
railway restart --service <name> -y
Use when external resources (S3 files, config maps) changed but code didn't.
Takes down the current deployment. The service remains but has no running deployment.
# Remove deployment for linked service
railway down -y
# Remove deployment for specific service
railway down --service web -y
railway down --service api -y
This is what users mean when they say "remove deploy", "take down", or "stop the deployment".
Note: This does NOT delete the service. To delete a service entirely, use the environment skill with isDeleted: true.
| Flag | Description |
|---|---|
-s, --service <NAME> | Service name or ID |
-e, --environment <NAME> | Environment name or ID |
--limit <N> | Max deployments (default 20, max 1000) |
--json | JSON output |
| Flag | Description |
|---|---|
-s, --service <NAME> | Service name or ID |
-e, --environment <NAME> | Environment name or ID |
-d, --deployment | Show deploy logs (default, boolean flag) |
-b, --build | Show build logs (boolean flag) |
-n, --lines <N> | Number of lines (required) |
-f, --filter <QUERY> |
| Flag | Description |
|---|---|
-s, --service <NAME> | Service name or ID |
-y, --yes | Skip confirmation |
| Flag | Description |
|---|---|
-s, --service <NAME> | Service name or ID |
-y, --yes | Skip confirmation |
| Flag | Description |
|---|---|
-s, --service <NAME> | Service name or ID |
-e, --environment <NAME> | Environment name or ID |
-y, --yes | Skip confirmation |
When showing logs:
deploy skillstatus skillenvironment skillnew skillNo service linked. Run `railway service` to select one.
No deployments found. Deploy first with `railway up`.
Deployment may be too old (log retention limits) or service hasn't produced output.
Weekly Installs
1.0K
Repository
GitHub Stars
213
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode855
codex831
gemini-cli792
claude-code778
github-copilot750
amp623
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
59,200 周安装
| Filter using query syntax |
--since <TIME> | Start time (relative or ISO 8601) |
--until <TIME> | End time (relative or ISO 8601) |
--latest | Most recent deployment (even if failed) |
--json | JSON output |
[DEPLOYMENT_ID] | Specific deployment (optional) |