zeabur-template-publish

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Zeabur Template Publish

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.
Publish a template YAML file to the Zeabur marketplace, or update an existing one.
请始终使用
npx zeabur@latest
调用Zeabur CLI。
切勿直接使用
zeabur
或其他任何安装方式。若未安装npx,请先安装Node.js。
将模板YAML文件发布至Zeabur市场,或更新已有的模板。

Create a New Template

创建新模板

bash
npx zeabur@latest template create -f <template-file>.yaml
This uploads the YAML and returns a template code (e.g.,
VTZ4FX
). Save this code — you'll need it for future updates.
bash
npx zeabur@latest template create -f <template-file>.yaml
此命令会上传YAML文件并返回一个模板编码(例如:
VTZ4FX
)。请保存该编码——后续更新时会用到。

Update an Existing Template

更新现有模板

bash
npx zeabur@latest template update -c <TEMPLATE_CODE> -f <template-file>.yaml
The template code is the identifier from the template URL:
https://zeabur.com/templates/<TEMPLATE_CODE>
bash
npx zeabur@latest template update -c <TEMPLATE_CODE> -f <template-file>.yaml
模板编码可从模板URL中获取:
https://zeabur.com/templates/<TEMPLATE_CODE>

Delete a Template

删除模板

bash
npx zeabur@latest template delete -c <TEMPLATE_CODE>
bash
npx zeabur@latest template delete -c <TEMPLATE_CODE>

Verify

验证

After publishing or updating, check the template page:
https://zeabur.com/templates/<TEMPLATE_CODE>
Or fetch the YAML to confirm:
bash
npx zeabur@latest template get -c <TEMPLATE_CODE> --raw
发布或更新完成后,请查看模板页面:
https://zeabur.com/templates/<TEMPLATE_CODE>
或获取YAML文件以确认:
bash
npx zeabur@latest template get -c <TEMPLATE_CODE> --raw

Flags

命令参数

template create

template create

FlagDescription
-f, --file
Template YAML file to publish
参数描述
-f, --file
要发布的模板YAML文件

template update

template update

FlagDescription
-c, --code
Template code to update
-f, --file
Template YAML file with changes
参数描述
-c, --code
要更新的模板编码
-f, --file
包含修改内容的模板YAML文件

template delete

template delete

FlagDescription
-c, --code
Template code to delete
参数描述
-c, --code
要删除的模板编码

Workflow

工作流示例

bash
undefined
bash
undefined

First time: create and note the returned code (use the
zeabur-template
skill to create the YAML first)

首次操作:创建模板并记录返回的编码(请先使用
zeabur-template
技能创建YAML文件)

npx zeabur@latest template create -f zeabur-template-myapp.yaml
npx zeabur@latest template create -f zeabur-template-myapp.yaml

→ Template created: VTZ4FX

→ 模板已创建:VTZ4FX

Later: update with changes

后续操作:更新模板内容

npx zeabur@latest template update -c VTZ4FX -f zeabur-template-myapp.yaml
npx zeabur@latest template update -c VTZ4FX -f zeabur-template-myapp.yaml

Verify

验证

npx zeabur@latest template get -c VTZ4FX --raw
undefined
npx zeabur@latest template get -c VTZ4FX --raw
undefined