Overview
Shoplazza CLI is a command-line interface tool that helps you build Shoplazza themes and apps. This document explains how to use Shoplazza CLI for theme development.
For the full CLI documentation (app development, API commands, shortcuts, and more), refer to the Shoplazza CLI documentation.
Features
Shoplazza CLI accelerates your theme development process with the following features:
- Safely preview, test, and share changes to themes using development themes
- Hot reload CSS and section changes, or automatically refresh a page on file change, when previewing a theme
- Initialize a new theme using Nova 2023 as a starting point
- Push and publish themes from the command line
Development themes
Development themes are temporary, hidden themes that are connected to the Shoplazza store that you're using for development. When you connect your theme to a store as a development theme, you can use that store's data for local testing.
You can create a development theme using the shoplazza themes serve command.
Your development theme is deleted when you run shoplazza auth logout. If you want a preview link for the theme that can be accessed after you log out, then you should push your development theme to an unpublished theme on your store.
Your development theme can be used to perform the following tasks:
- View changes in real-time to a theme that you're developing locally
- Customize and interact with the theme using the Shoplazza admin theme editor
- Share a password-protected preview of the theme with other developers
Installation
To learn how to install Shoplazza CLI on Windows, macOS, or Linux, refer to Install Shoplazza CLI.
Getting started
Start building a theme
Customize an existing theme
Command reference
Refer to the Theme commands to explore the theme commands available in Shoplazza CLI.
For the full command reference (all topics), see the CLI command reference.
Authentication
Shoplazza CLI v2 uses OAuth 2.0. To authenticate:
shoplazza auth login --store-domain my-store.myshoplaza.com --domain themes
For full authentication details, see Authentication.
Switching between stores
shoplazza auth store use --store-domain another-store.myshoplaza.com
Logging out
shoplazza auth logout
Directory structure
You can run certain theme commands, such as shoplazza themes serve, only if the directory you're using matches the default Shoplazza theme directory structure.
└── project
├── assets
├── config
├── layout
├── locales
├── sections
├── snippets
└── templates
└── customers
Upgrade
npm update -g shoplazza-cli
To check your CLI version:
shoplazza version