publish 和 unpublish 命令用于控制 Sandbox Template 的可见性。**发布(publish)**会将 Template 公开给团队以外的所有人;**取消发布(unpublish)**则将其恢复为团队私有。二者底层都是通过设置 Template 的 public 标志实现的。
前提条件
在环境变量中设置你的 API Key:用法
[template] 参数是可选的。有三种方式可以选择要操作的 Template:
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
publish 和 unpublish 命令用于控制 Sandbox Template 的可见性。**发布(publish)**会将 Template 公开给团队以外的所有人;**取消发布(unpublish)**则将其恢复为团队私有。二者底层都是通过设置 Template 的 public 标志实现的。
-y / --yes 可跳过该确认提示。export PPIO_API_KEY=<your API key>
# 发布(别名:tpl pb)
ppio template publish [template]
# 取消发布(别名:tpl upb)
ppio template unpublish [template]
[template] 参数是可选的。有三种方式可以选择要操作的 Template:
| 选择方式 | 行为 |
|---|---|
传入 [template] | 对指定 Template ID 对应的 Template 执行操作 |
省略 [template] | 使用根目录下 ppio.toml 中定义的 Template |
-s / --select | 从交互式列表中选择(仅显示符合该操作条件的 Template) |
| 选项 | 说明 |
|---|---|
-p, --path <path> | 更改命令运行的根目录 |
--config <ppio-toml> | Sandbox 配置 toml 文件的路径(默认为 ./ppio.toml) |
-s, --select | 从交互式列表中选择 Template |
-t, --team <team-id> | 操作关联的团队 ID(与 --select 配合使用) |
-y, --yes | 跳过手动确认提示 |
ppio template publish <templateID>
ppio template publish -y
ppio template unpublish --select --team <teamID>
- Publishing sandbox template <template>
Published as: <name>