zeabur-project-create

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Zeabur Project Create

Zeabur 项目创建

Always use
npx zeabur@latest
to invoke Zeabur CLI.
Never use
zeabur
directly or any other installation method. If
npx
is not available, install Node.js first.
请始终使用
npx zeabur@latest
来调用 Zeabur CLI。
切勿直接使用
zeabur
或其他任何安装方式。如果无法使用
npx
,请先安装 Node.js。

Choosing a Region

选择区域

Do NOT hardcode or guess region codes. Old region codes like
hnd1
,
tpe1
are deprecated. The region must always be derived from the user's server list.
Step 1 — List the user's servers:
bash
npx zeabur@latest server list -i=false --json
Step 2 — Ask the user which server to use:
Present the server list to the user (show name, provider, and region for each) and ask them to pick one. Do NOT choose a server on the user's behalf. Also offer the option to rent a new server if none of the existing ones are suitable.
  • If the user has no servers, use the
    zeabur-server-catalog
    skill to browse options, then the
    zeabur-server-rent
    skill to rent one.
Step 3 — Use the selected server ID with
server-
prefix as the region:
The region code format is
server-<server-id>
, where
<server-id>
comes from the server list output.
Some templates (e.g. with
REQUIRE_DEDICATED_SERVER
) can only be deployed on dedicated servers. If you get
Unsupported template (code: REQUIRE_DEDICATED_SERVER)
, rent a dedicated server and recreate the project with its region.
请勿硬编码或猜测区域代码。 旧的区域代码如
hnd1
tpe1
已被弃用。区域必须始终从用户的服务器列表中获取。
步骤 1 — 列出用户的服务器:
bash
npx zeabur@latest server list -i=false --json
步骤 2 — 询问用户要使用哪台服务器:
将服务器列表展示给用户(显示每台服务器的名称、提供商和区域),并请用户选择一台。切勿替用户选择服务器。如果现有服务器都不合适,也可提供租用新服务器的选项。
  • 如果用户没有服务器,请使用
    zeabur-server-catalog
    技能浏览选项,然后使用
    zeabur-server-rent
    技能租用一台。
步骤 3 — 使用带
server-
前缀的选定服务器 ID 作为区域:
区域代码格式为
server-<server-id>
,其中
<server-id>
来自服务器列表的输出。
某些模板(例如带有
REQUIRE_DEDICATED_SERVER
的模板)只能部署在专用服务器上。如果出现
Unsupported template (code: REQUIRE_DEDICATED_SERVER)
错误,请租用一台专用服务器,然后使用其区域重新创建项目。

Create Project

创建项目

bash
undefined
bash
undefined

Create project with name and region (region must be server-<server-id>)

使用名称和区域创建项目(区域必须为 server-<server-id> 格式)

npx zeabur@latest project create -n "<project-name>" -r "server-<server-id>" -i=false --json
undefined
npx zeabur@latest project create -n "<project-name>" -r "server-<server-id>" -i=false --json
undefined

Get Project ID

获取项目 ID

bash
undefined
bash
undefined

List projects as JSON and extract project ID by name

以 JSON 格式列出项目并按名称提取项目 ID

PROJECT_ID=$(npx zeabur@latest project list -i=false --json | jq -r '.[] | select(.name == "<project-name>") | ._id')
undefined
PROJECT_ID=$(npx zeabur@latest project list -i=false --json | jq -r '.[] | select(.name == "<project-name>") | ._id')
undefined

Deploy Template to Project

将模板部署到项目

bash
undefined
bash
undefined

Deploy template file to specific project (non-interactive)

将模板文件部署到指定项目(非交互式)

npx zeabur@latest template deploy -i=false --json
-f <template-file>
--project-id <project-id>
--var PUBLIC_DOMAIN=myapp
--var KEY=value
undefined
npx zeabur@latest template deploy -i=false --json
-f <template-file>
--project-id <project-id>
--var PUBLIC_DOMAIN=myapp
--var KEY=value
undefined

Workflow

工作流

bash
undefined
bash
undefined

1. Find server ID

1. 查找服务器 ID

npx zeabur@latest server list -i=false --json
npx zeabur@latest server list -i=false --json

2. Create project (use server-<id> from step 1)

2. 创建项目(使用步骤 1 中的 server-<id>

npx zeabur@latest project create -n "wrenai-prod" -r "server-<server-id>" -i=false --json
npx zeabur@latest project create -n "wrenai-prod" -r "server-<server-id>" -i=false --json

3. Get project ID

3. 获取项目 ID

PROJECT_ID=$(npx zeabur@latest project list -i=false --json | jq -r '.[] | select(.name == "wrenai-prod") | ._id') echo "Project ID: $PROJECT_ID" echo "Dashboard: https://zeabur.com/projects/$PROJECT_ID"
PROJECT_ID=$(npx zeabur@latest project list -i=false --json | jq -r '.[] | select(.name == "wrenai-prod") | ._id') echo "Project ID: $PROJECT_ID" echo "Dashboard: https://zeabur.com/projects/$PROJECT_ID"

4. Deploy template — use the
zeabur-template-deploy
skill for detailed flags and troubleshooting

4. 部署模板 — 如需详细参数和故障排除,请使用
zeabur-template-deploy
技能

npx zeabur@latest template deploy -i=false --json -f template.yml --project-id $PROJECT_ID --var PUBLIC_DOMAIN=myapp
undefined
npx zeabur@latest template deploy -i=false --json -f template.yml --project-id $PROJECT_ID --var PUBLIC_DOMAIN=myapp
undefined