Loading...
Loading...
Compare original and translation side by side
railway status --jsonproject.idenvironment.idrailway status --jsonproject.idenvironment.idmutation serviceCreate($input: ServiceCreateInput!) {
serviceCreate(input: $input) {
id
name
}
}mutation serviceCreate($input: ServiceCreateInput!) {
serviceCreate(input: $input) {
id
name
}
}| Field | Type | Description |
|---|---|---|
| String! | Project ID (required) |
| String | Service name (auto-generated if omitted) |
| String | Docker image (e.g., |
| String | GitHub repo (e.g., |
| String | Git branch for repo source |
| String | If set and is a fork, only creates in that env |
| Field | Type | 说明 |
|---|---|---|
| String! | 项目ID(必填) |
| String | 服务名称(若省略则自动生成) |
| String | Docker镜像(例如: |
| String | GitHub仓库(例如: |
| String | 仓库源的Git分支 |
| String | 若设置且为分支环境,仅在该环境中创建服务 |
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'mutation createService($input: ServiceCreateInput!) {
serviceCreate(input: $input) { id name }
}' \
'{"input": {"projectId": "PROJECT_ID"}}'
SCRIPTbash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'mutation createService($input: ServiceCreateInput!) {
serviceCreate(input: $input) { id name }
}' \
'{"input": {"projectId": "PROJECT_ID"}}'
SCRIPTbash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'mutation createService($input: ServiceCreateInput!) {
serviceCreate(input: $input) { id name }
}' \
'{"input": {"projectId": "PROJECT_ID", "name": "my-service", "source": {"image": "nginx:latest"}}}'
SCRIPTbash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'mutation createService($input: ServiceCreateInput!) {
serviceCreate(input: $input) { id name }
}' \
'{"input": {"projectId": "PROJECT_ID", "name": "my-service", "source": {"image": "nginx:latest"}}}'
SCRIPTserviceCreate(input: {projectId: "...", name: "my-service"})serviceCreate(input: {projectId: "...", name: "my-service"}){
"services": {
"<serviceId>": {
"isCreated": true,
"source": { "image": "nginx:latest" },
"variables": {
"PORT": { "value": "8080" }
}
}
}
}isCreated: true{
"services": {
"<serviceId>": {
"isCreated": true,
"source": { "image": "nginx:latest" },
"variables": {
"PORT": { "value": "8080" }
}
}
}
}isCreated: truerailway service status --jsonrailway service status --jsonrailway deployment list --json --limit 5railway deployment list --json --limit 5| Status | Meaning |
|---|---|
| SUCCESS | Deployed and running |
| FAILED | Build or deploy failed |
| DEPLOYING | Currently deploying |
| BUILDING | Build in progress |
| CRASHED | Runtime crash |
| REMOVED | Deployment removed |
| Status | 含义 |
|---|---|
| SUCCESS | 已部署且运行中 |
| FAILED | 构建或部署失败 |
| DEPLOYING | 正在部署中 |
| BUILDING | 构建进行中 |
| CRASHED | 运行时崩溃 |
| REMOVED | 部署已移除 |
railway status --jsonservice.idrailway status --jsonservice.idbash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'mutation updateService($id: String!, $input: ServiceUpdateInput!) {
serviceUpdate(id: $id, input: $input) { id name }
}' \
'{"id": "SERVICE_ID", "input": {"name": "new-name"}}'
SCRIPTbash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'mutation updateService($id: String!, $input: ServiceUpdateInput!) {
serviceUpdate(id: $id, input: $input) { id name }
}' \
'{"id": "SERVICE_ID", "input": {"name": "new-name"}}'
SCRIPT| Type | Example |
|---|---|
| Image URL | |
| Animated GIF | |
| Devicons | |
https://devicons.railway.app/{query}githubpostgresredisnodejsbash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'mutation updateService($id: String!, $input: ServiceUpdateInput!) {
serviceUpdate(id: $id, input: $input) { id icon }
}' \
'{"id": "SERVICE_ID", "input": {"icon": "https://devicons.railway.app/github"}}'
SCRIPT| 类型 | 示例 |
|---|---|
| 图片URL | |
| 动画GIF | |
| Devicons | |
https://devicons.railway.app/{query}githubpostgresredisnodejsbash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'mutation updateService($id: String!, $input: ServiceUpdateInput!) {
serviceUpdate(id: $id, input: $input) { id icon }
}' \
'{"id": "SERVICE_ID", "input": {"icon": "https://devicons.railway.app/github"}}'
SCRIPT| Field | Type | Description |
|---|---|---|
| String | Service name |
| String | Emoji or image URL (including animated GIFs) |
| Field | Type | 说明 |
|---|---|---|
| String | 服务名称 |
| String | 表情符号或图片URL(包括动画GIF) |
railway service linkrailway service link <service-name>railway service linkrailway service link <service-name>isDeleted: trueisDeleted: trueNo service linked. Run `railway service link` to link a service.未关联服务。请运行`railway service link`关联一个服务。Service exists but has no deployments yet. Deploy with `railway up`.服务已存在,但尚未进行任何部署。请使用`railway up`进行部署。Service "foo" not found. Check available services with `railway status`.未找到服务"foo"。请使用`railway status`查看可用服务。railway statusrailway status