projects

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Project Management

项目管理

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
status
skill to see project details.
将其他项目链接到当前目录:
bash
railway link -p <project-id-or-name>
或交互式操作:
bash
railway link
切换完成后,使用
status
Skill查看项目详情。

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

更新突变(Mutation)

bash
bash <<'SCRIPT'
scripts/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'
scripts/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
字符串项目名称
description
字符串项目描述
isPublic
布尔值设置项目公开/私有
prDeploys
布尔值启用/禁用PR部署
botPrEnvironments
布尔值启用Dependabot/Renovate PR环境

Examples

示例

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

Composability

组合性

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

Error Handling

错误处理

Not Authenticated

未认证

Not authenticated. Run `railway login` first.
未认证。请先运行`railway login`。

No Projects

无项目

No projects found. Create one with `railway init`.
未找到项目。使用`railway init`创建一个。

Permission Denied

权限不足

You don't have permission to modify this project. Check your Railway role.
您没有权限修改此项目。请检查您的Railway角色。

Project Not Found

项目未找到

Project "foo" not found. Run `railway list` to see available projects.
未找到项目“foo”。运行`railway list`查看可用项目。