railway-projects

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Railway Project Management

Railway 项目管理

List, switch, and configure Railway projects.
列出、切换和配置Railway项目。

When to Use

使用场景

  • User asks "show me all my projects" or "what projects do I have"
  • User asks about projects across workspaces
  • User asks "what workspaces do I have"
  • User wants to switch to a different project
  • User asks to rename a project
  • User wants to enable/disable PR deploys
  • User wants to make a project public or private
  • User asks about project settings
  • 用户询问“展示我所有的项目”或“我有哪些项目”
  • 用户询问跨工作区的项目
  • 用户询问“我有哪些工作区”
  • 用户想要切换到其他项目
  • 用户询问如何重命名项目
  • 用户想要启用/禁用PR部署
  • 用户想要设置项目为公开或私有
  • 用户询问项目设置相关内容

List Projects

列出项目

The
railway list --json
output can be very large. Run in a subagent and return only essential fields:
  • Project:
    id
    ,
    name
  • Workspace:
    id
    ,
    name
  • Services:
    name
    (optional, if user needs service context)
bash
railway list --json
Extract and return a simplified summary, not the full JSON.
railway list --json
的输出可能非常大。在子Agent中运行并仅返回必要字段:
  • 项目:
    id
    name
  • 工作区:
    id
    name
  • 服务:
    name
    (可选,若用户需要服务上下文)
bash
railway list --json
提取并返回简化的摘要,而非完整的JSON。

List Workspaces

列出工作区

bash
railway whoami --json
Returns user info including all workspaces the user belongs to.
bash
railway whoami --json
返回用户信息,包括用户所属的所有工作区。

Switch Project

切换项目

Link a different project to the current directory:
bash
railway link -p <project-id-or-name>
Or interactively:
bash
railway link
After switching, use railway-status skill to see project details.
将其他项目链接到当前目录:
bash
railway link -p <project-id-or-name>
或交互式操作:
bash
railway link
切换完成后,使用railway-status技能查看项目详情。

Update Project

更新项目

Modify project settings via GraphQL API.
通过GraphQL API修改项目设置。

Get Project ID

获取项目ID

bash
railway status --json
Extract
project.id
from the response.
bash
railway status --json
从响应中提取
project.id

Update Mutation

更新变更操作

bash
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
  'mutation updateProject($id: String!, $input: ProjectUpdateInput!) {
    projectUpdate(id: $id, input: $input) { name prDeploys isPublic botPrEnvironments }
  }' \
  '{"id": "PROJECT_ID", "input": {"name": "new-name"}}'
SCRIPT
bash
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
  'mutation updateProject($id: String!, $input: ProjectUpdateInput!) {
    projectUpdate(id: $id, input: $input) { name prDeploys isPublic botPrEnvironments }
  }' \
  '{"id": "PROJECT_ID", "input": {"name": "new-name"}}'
SCRIPT

ProjectUpdateInput Fields

ProjectUpdateInput 字段

FieldTypeDescription
name
StringProject name
description
StringProject description
isPublic
BooleanMake project public/private
prDeploys
BooleanEnable/disable PR deploys
botPrEnvironments
BooleanEnable Dependabot/Renovate PR environments
字段类型描述
name
String项目名称
description
String项目描述
isPublic
Boolean设置项目公开/私有
prDeploys
Boolean启用/禁用PR部署
botPrEnvironments
Boolean启用Dependabot/Renovate PR环境

Examples

示例

Rename project:
bash
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"name": "new-name"}}'
Enable PR deploys:
bash
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"prDeploys": true}}'
Make project public:
bash
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"isPublic": true}}'
Multiple fields:
bash
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"name": "new-name", "prDeploys": true}}'
重命名项目:
bash
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"name": "new-name"}}'
启用PR部署:
bash
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"prDeploys": true}}'
设置项目公开:
bash
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"isPublic": true}}'
多字段修改:
bash
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh '<mutation>' '{"id": "uuid", "input": {"name": "new-name", "prDeploys": true}}'

Composability

可组合性

  • View project details: Use railway-status skill
  • Create new project: Use railway-new skill
  • Manage environments: Use railway-environment skill
  • 查看项目详情:使用railway-status技能
  • 创建新项目:使用railway-new技能
  • 管理环境:使用railway-environment技能

Error Handling

错误处理

Not Authenticated

未认证

Not authenticated. Run `railway login` first.
Not authenticated. Run `railway login` first.

No Projects

无项目

No projects found. Create one with `railway init`.
No projects found. Create one with `railway init`.

Permission Denied

权限不足

You don't have permission to modify this project. Check your Railway role.
You don't have permission to modify this project. Check your Railway role.

Project Not Found

项目未找到

Project "foo" not found. Run `railway list` to see available projects.
Project "foo" not found. Run `railway list` to see available projects.