projects
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProject 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 output can be very large. Run in a subagent and return only essential fields:
railway list --json- Project: ,
idname - Workspace: ,
idname - Services: (optional, if user needs service context)
name
bash
railway list --jsonExtract and return a simplified summary, not the full JSON.
railway list --json- 项目:、
idname - 工作区:、
idname - 服务:(可选,若用户需要服务上下文)
name
bash
railway list --json提取并返回简化的摘要,而非完整的JSON。
List Workspaces
列出工作区
bash
railway whoami --jsonReturns 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 linkAfter switching, use skill to see project details.
status将其他项目链接到当前目录:
bash
railway link -p <project-id-or-name>或交互式操作:
bash
railway link切换完成后,使用 Skill查看项目详情。
statusUpdate Project
更新项目
Modify project settings via GraphQL API.
通过GraphQL API修改项目设置。
Get Project ID
获取项目ID
bash
railway status --jsonExtract from the response.
project.idbash
railway status --json从响应中提取。
project.idUpdate 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"}}'
SCRIPTbash
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"}}'
SCRIPTProjectUpdateInput Fields
ProjectUpdateInput字段
| Field | Type | Description |
|---|---|---|
| String | Project name |
| String | Project description |
| Boolean | Make project public/private |
| Boolean | Enable/disable PR deploys |
| Boolean | Enable Dependabot/Renovate PR environments |
| 字段 | 类型 | 描述 |
|---|---|---|
| 字符串 | 项目名称 |
| 字符串 | 项目描述 |
| 布尔值 | 设置项目公开/私有 |
| 布尔值 | 启用/禁用PR部署 |
| 布尔值 | 启用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 skill
status - Create new project: Use skill
new - Manage environments: Use skill
environment
- 查看项目详情:使用Skill
status - 创建新项目:使用Skill
new - 管理环境:使用Skill
environment
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`查看可用项目。