railway-deploy by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill railway-deploy使用 railway up 将当前目录的代码部署到 Railway。
启动部署并立即返回。适用于大多数部署场景。
railway up --detach
流式传输构建日志直至完成。当用户希望观察构建过程或需要调试问题时使用。
railway up --ci
何时使用 CI 模式:
默认部署链接的服务。要部署到其他服务:
railway up --detach --service backend
无需先链接即可部署到项目:
railway up --project <project-id> --environment production --detach
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
需要同时使用 --project 和 --environment 标志。
| 标志 | 描述 |
|---|---|
-d, --detach | 不附加到日志(默认) |
-c, --ci | 流式传输构建日志,完成后退出 |
-s, --service <NAME> | 目标服务(默认为链接的服务) |
-e, --environment <NAME> | 目标环境(默认为链接的环境) |
-p, --project <ID> | 目标项目(需要 --environment) |
[PATH] | 部署路径(默认为当前目录) |
Railway CLI 会向上遍历目录树以查找链接的项目。如果您位于链接项目的子目录中,则无需重新链接。
对于子目录部署,建议通过 railway-environment 技能设置 rootDirectory,然后使用 railway up 正常部署。
Deploying to <service>...
使用 railway-deployment 技能检查构建状态(配合 --lines 标志)。
构建日志会内联流式传输。如果构建失败,错误信息将显示在输出中。
CI 模式后请勿运行 railway logs --build - 日志已流式传输完毕。如果需要更多上下文,请使用 railway-deployment 技能配合 --lines 标志(切勿流式传输)。
No Railway project linked. Run `railway link` first.
No service linked. Use --service flag or run `railway service` to select one.
构建日志已流式传输 - 直接从 railway up --ci 的输出中分析它们。CI 模式后请勿运行 railway logs(没有 --lines 标志时会无限流式传输)。
常见问题:
每周安装量
139
仓库
GitHub 星标
22.6K
首次出现
2026年1月21日
安全审计
安装于
claude-code115
opencode107
gemini-cli103
cursor99
antigravity90
codex90
Deploy code from the current directory to Railway using railway up.
Starts deploy and returns immediately. Use for most deploys.
railway up --detach
Streams build logs until complete. Use when user wants to watch the build or needs to debug issues.
railway up --ci
When to use CI mode:
Default is linked service. To deploy to a different service:
railway up --detach --service backend
Deploy to a project without linking first:
railway up --project <project-id> --environment production --detach
Requires both --project and --environment flags.
| Flag | Description |
|---|---|
-d, --detach | Don't attach to logs (default) |
-c, --ci | Stream build logs, exit when done |
-s, --service <NAME> | Target service (defaults to linked) |
-e, --environment <NAME> | Target environment (defaults to linked) |
-p, --project <ID> | Target project (requires --environment) |
[PATH] |
Railway CLI walks UP the directory tree to find a linked project. If you're in a subdirectory of a linked project, you don't need to relink.
For subdirectory deployments, prefer setting rootDirectory via the railway-environment skill, then deploy normally with railway up.
Deploying to <service>...
Use railway-deployment skill to check build status (with --lines flag).
Build logs stream inline. If build fails, the error will be in the output.
Do NOT runrailway logs --build after CI mode - the logs already streamed. If you need more context, use railway-deployment skill with --lines flag (never stream).
No Railway project linked. Run `railway link` first.
No service linked. Use --service flag or run `railway service` to select one.
The build logs already streamed - analyze them directly from the railway up --ci output. Do NOT run railway logs after CI mode (it streams forever without --lines).
Common issues:
Weekly Installs
139
Repository
GitHub Stars
22.6K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code115
opencode107
gemini-cli103
cursor99
antigravity90
codex90
| Path to deploy (defaults to current directory) |