# Theme commands

> Reference for the Shoplazza CLI themes commands - init, serve, pull, push, share, package, publish, and list - with their flags and behavior.

This reference lists the Shoplazza CLI commands for theme development. For the full command reference (all topics), see the [CLI command reference](/docs/app/developer-tools/shoplazza-cli/commands/).

## Command overview

| Command | Description |
|---------|-------------|
| [themes init](#init) | Scaffold a new theme based on Nova 2023 |
| [themes serve](#serve) | Preview theme with live reload |
| [themes pull](#pull) | Download theme from store |
| [themes push](#push) | Upload theme to store |
| [themes share](#share) | Share a preview link |
| [themes package](#package) | Package theme as ZIP |
| [themes publish](#publish) | Publish a theme |
| [themes list](#list) | List store themes |
| [themes delete](#delete) | Delete a theme |
| [auth login](#login) | Log in to Shoplazza |
| [auth logout](#logout) | Log out |
| [auth store use](#store-use) | Switch store |
| [version](#version) | Show CLI version |
| [help](#help) | Show help |

## Theme shortcuts

### init

Scaffold a new theme based on [Nova 2023](/docs/theme/developer-tools/nova-2023).

```shell
shoplazza themes init --name <dir>
```

### serve

Upload the current theme to a store and preview it with live reload.

```shell
shoplazza themes serve
```

This command returns:

* A preview link that you can share with other developers
* A link to the [theme editor](/docs/theme/developer-tools/theme-editor) in the Shoplazza admin

#### serve flags

| Flag | Description |
|------|-------------|
| `--theme-id, -t <THEME_ID>` | Theme ID to preview. If omitted, uses a development theme. |

### pull

Download theme files from Shoplazza.

```shell
shoplazza themes pull --theme-id <THEME_ID>
```

#### pull flags

| Flag | Description |
|------|-------------|
| `--theme-id, -t <THEME_ID>` | Theme ID to pull (required). Run `shoplazza themes list` to discover. |

### push

Upload local theme files to Shoplazza, overwriting the remote version.

```shell
shoplazza themes push --theme-id <THEME_ID>
```

#### push flags

| Flag | Description |
|------|-------------|
| `--theme-id, -t <THEME_ID>` | Theme ID to overwrite (required). Run `shoplazza themes list` to discover. |

### share

Upload your theme as a new, unpublished theme and return a shareable preview link.

```shell
shoplazza themes share
```

### package

Package local theme files into a ZIP file named `theme_name-theme_version.zip`.

```shell
shoplazza themes package
```

## Theme API commands

### list

List all themes in your store with their IDs and statuses.

```shell
shoplazza themes list --format table
```

### publish

Publish a theme to the live store.

```shell
shoplazza themes publish --id <THEME_ID>
```

### delete

Delete a theme from your store.

```shell
shoplazza themes delete --id <THEME_ID>
```

## Authentication commands

### login

Log in via OAuth 2.0:

```shell
shoplazza auth login --store-domain my-store.myshoplaza.com --domain themes
```

#### login flags

| Flag | Description |
|------|-------------|
| `--store-domain <domain>` | Store domain to connect to |
| `--domain <domains>` | Business domains for scope expansion |

### logout

Log out and remove stored credentials:

```shell
shoplazza auth logout
```

### store use

Switch to a different store:

```shell
shoplazza auth store use --store-domain another-store.myshoplaza.com
```

## Utility commands

### version

Display the CLI version:

```shell
shoplazza version
```

### help

List available commands:

```shell
shoplazza help
shoplazza help [command]
shoplazza [command] --help
```
