# theme-extension

> Shoplazza CLI theme-extension commands, aliased te, to create, serve, build, deploy, connect, and release a Shoplazza theme extension.

Build, test, and deploy theme extensions. Alias: `te`.

## create

Scaffold a new theme extension.

```shell
shoplazza theme-extension create [flags]
```

### Flags

| Flag | Type | Description |
|------|------|-------------|
| `--name <name>` | string | Project name / target directory (required) |
| `--type <type>` | string | Template type: `basic` or `embed` (required) |

## serve

Register, push, and start incremental sync with file watching.

```shell
shoplazza theme-extension serve [flags]
```

### Flags

| Flag | Type | Description |
|------|------|-------------|
| `--theme-id, -t <THEME_ID>` | string | Theme ID (required) |
| `--project-root <path>` | string | Project root directory |

## build

Build a new theme-extension version (zip, upload, and create the version on the server).

```shell
shoplazza theme-extension build [flags]
```

### Flags

| Flag | Type | Description |
|------|------|-------------|
| `--version <version>` | string | New semver version, e.g. `1.0.0` (required) |
| `--description <text>` | string | Version description (required) |
| `--store-domain, -s <domain>` | string | Target store (defaults to current store) |
| `--path <path>` | string | Project path (default: current directory) |

## deploy

Enable a version in the current store.

```shell
shoplazza theme-extension deploy [flags]
```

### Flags

| Flag | Type | Description |
|------|------|-------------|
| `--version <version>` | string | Version to enable, e.g. `1.0.0` (defaults to the version recorded by `te build`) |
| `--path <path>` | string | Project path (default: current directory) |
| `--debug` | bool | Print the raw publish request/response for troubleshooting |

## connect

Link this theme extension to an app.

```shell
shoplazza theme-extension connect [flags]
```

### Flags

| Flag | Type | Description |
|------|------|-------------|
| `--client-id <id>` | string | App client_id to link (required) |
| `--partner <id>` | string | Partner id (auto-selected if you have only one) |
| `--path <path>` | string | Project path (default: current directory) |

## release

Publish a version in the bound app.

```shell
shoplazza theme-extension release [flags]
```

### Flags

| Flag | Type | Description |
|------|------|-------------|
| `--version <version>` | string | Version to publish, e.g. `1.0.0` (defaults to the version recorded by `te build`) |
| `--path <path>` | string | Project path (default: current directory) |
| `--debug` | bool | Print the resolved publish request for troubleshooting |

## list

List the store's theme extensions.

```shell
shoplazza theme-extension list [flags]
```

### Flags

| Flag | Type | Description |
|------|------|-------------|
| `--store-domain, -s <domain>` | string | Target store (defaults to current store) |

## versions

List a theme extension's versions.

```shell
shoplazza theme-extension versions [flags]
```

### Flags

| Flag | Type | Description |
|------|------|-------------|
| `--path <path>` | string | Project path (default: current directory) |
