跳到主要内容

主题命令

本参考文档列出 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