# Shoplazza CLI overview

> What Shoplazza CLI v2 brings: a three-layer command system, OAuth 2.0 authentication, and structured output for building Shoplazza apps, themes, and extensions.

Shoplazza CLI is a command-line tool for building Shoplazza apps, themes, and extensions. It covers the full development lifecycle — from project scaffolding and local development to deployment and version management.

## What's new in v2

Shoplazza CLI v2 is a ground-up rewrite that introduces a **three-layer command system**, OAuth 2.0 authentication, and structured output designed for both human developers and AI agents.

### Three-layer command system

| Layer | Prefix | Purpose | Example |
|-------|--------|---------|---------|
| **Shortcuts** | `+` | High-frequency operations with smart defaults | `shoplazza products +search --keyword "shirt"` |
| **API commands** | — | 1:1 mapping to platform API endpoints | `shoplazza products list --format table` |
| **Raw API** | `api rest` | Escape hatch for any endpoint | `shoplazza api rest GET /openapi/2026-01/products` |

For details, see [Three-layer command system](./guides/command-layers).

### Key capabilities

* **App lifecycle** — Initialize, develop, and deploy apps with `app init`, `app dev`, `app deploy`
* **Theme development** — Scaffold, preview, push, and publish themes
* **Extensions** — Build checkout extensions and theme extensions with bundled toolchains
* **Store data** — Manage products, orders, customers, discounts, and more via shortcuts and API commands
* **Billing & Webhooks** — Create subscriptions and register event hooks
* **Schema introspection** — Explore all available APIs with `shoplazza schema`

### Domain coverage

| Domain | Shortcuts | API Commands |
|--------|-----------|--------------|
| Products | `+search`, `+create`, `+set-price`, `+stock`, `+publish`, `+unpublish`, `+count` | 78 commands |
| Orders | `+search`, `+count`, `+ship`, `+refund`, `+update-tracking` | 36 commands |
| Discounts | `+search`, `+rebate`, `+flashsale`, `+mn-discount`, `+percent-code`, `+amount-code`, `+bxgy-code`, `+free-shipping-code` | 15 commands |
| Customers | `+search`, `+create` | 11 commands |
| Shop | `+upload-file` | 64 commands |
| Themes | `init`, `serve`, `pull`, `push`, `package`, `share` | 15 commands |
| Billing | — | 14 commands |
| Webhook | — | 6 commands |

## Installation

To install Shoplazza CLI, refer to [Install Shoplazza CLI](./install).

## Getting started

## Command reference

Refer to the [command reference](./commands/) to explore all available commands, organized by topic.

## Authentication

Shoplazza CLI v2 uses OAuth 2.0 with PKCE for secure authentication. You can authenticate interactively via browser or non-interactively with a User Access Token (UAT) for CI/CD pipelines.

For details, see [Authentication](./authentication).

## Output formats

All commands support structured output via the global `--format` flag:

| Format | Description |
|--------|-------------|
| `json` | Structured JSON (default) — ideal for scripting and AI agents |
| `pretty` | Human-readable key-value display |
| `table` | Tab-separated table with headers |

You can also filter JSON output with `--jq` expressions and preview requests with `--dry-run`.

For details, see [Output formats](./guides/output-formats).

## Upgrade

To upgrade Shoplazza CLI to the latest version:

```shell
npm update -g shoplazza-cli
```

To check your current version:

```shell
shoplazza version
```

## Theme development

For theme-specific CLI usage, refer to the [Theme CLI guide](/docs/theme/developer-tools/shoplazza-cli/).
