主题命令
本参考文档列出 Shoplazza CLI 的主题开发命令。完整命令参考见 CLI 命令参考。
命令总览
| 命令 | 说明 |
|---|---|
| themes init | 基于 Nova 2023 创建新主题 |
| themes serve | 实时预览主题 |
| themes pull | 从店铺下载主题 |
| themes push | 上传主题到店铺 |
| themes share | 分享预览链接 |
| themes package | 打包主题为 ZIP |
| themes publish | 发布主题 |
| themes list | 列出店铺主题 |
| themes delete | 删除主题 |
| auth login | 登录 |
| auth logout | 注销 |
| auth store use | 切换店铺 |
| version | 显示版本 |
| help | 显示帮助 |
主题快捷命令
init
基于 Nova 2023 创建新主题脚手架。
shoplazza themes init --name <dir>
serve
上传主题到店铺并实时预览。返回预览链接和主题编辑器链接。
shoplazza themes serve
| 参数 | 说明 |
|---|---|
--theme-id, -t <THEME_ID> | 要预览的主题 ID,省略则使用开发主题 |
pull
从 Shoplazza 下载主题文件。
shoplazza themes pull --theme-id <THEME_ID>
push
上传本地主题文件到 Shoplazza,覆盖远端版本。
shoplazza themes push --theme-id <THEME_ID>
share
上传主题为未发布主题,返回可分享的预览链接。
shoplazza themes share
package
将主题文件打包为 theme_name-theme_version.zip。
shoplazza themes package
主题 API 命令
list
列出店铺所有主题及其 ID 和状态。
shoplazza themes list --format table
publish
发布主题到线上店铺。
shoplazza themes publish --id <THEME_ID>
delete
删除主题。
shoplazza themes delete --id <THEME_ID>
认证命令
login
通过 OAuth 2.0 登录:
shoplazza auth login --store-domain my-store.myshoplaza.com --domain themes
logout
注销并移除凭证:
shoplazza auth logout
store use
切换到其他店铺:
shoplazza auth store use --store-domain another-store.myshoplaza.com
工具命令
version
shoplazza version
help
shoplazza help
shoplazza help [命令]
shoplazza [命令] --help