# App command reference

> Legacy Shoplazza CLI app command reference: the full topic and command table for app development, plus details for each app and no-prefix command.

This reference lists the Shoplazza CLI commands for app development. For theme commands, refer to the [Theme command reference](/docs/theme/developer-tools/shoplazza-cli/theme-commands).

The commands in this group use the syntax `shoplazza [topic] [command]`.

## Command overview

| Topic | Command | Description |
| --- | --- | --- |
| [none](#login) | [login](#login) | Authenticates and logs you into the specified store with Shoplazza CLI. |
| [logout](#logout) | Logs you out of your Shoplazza account. |
| [switch](#switch) | Switches between stores without logging out and logging in again. |
| [store](#store) | Displays the store that you're currently connected to. |
| [version](#version) | Displays the version of Shoplazza CLI that you're running. |
| [help](#help) | Lists the available commands and describes what they do. |
| [app](#app-commands-details) | [init](#app-init) | Initialize a new application project. Create a new application project, or connect an existing application project. |
| [generate extension](#generate-extension) | Generate an extension template. Add new extensions to an existing application. |
| [dev](#dev) | Start a local development server. Local development and debugging. |
| [deploy](#deploy) | Deploy the application to the production environment. Publish the application to production. |
| [app config link](#config-link) | Link an application configuration file. Connect an existing application to a local project. |
| [config use](#config-use) | Switch between application configuration files. Switch between multiple application configurations. |
| [versions list](#versions-list) | View the list of application versions. Manage application version history. |

## App Commands Details

### app Init

Create a new application project, or connect an exist application project.

```shell
shoplazza app init
```

#### Init flags

| Flag | Description |
| --- | --- |
| `--path <path>` | Specify the project creation path (Default: Current directory) |
| `--client-id <client-id>` | Specify the client ID of the existing application to connect to |
| `--name <name>` | Specify the application name |

### generate extension

Generate a new extension template for an existing application, supporting various types of extensions.

```shell
shoplazza app generate extension
```

#### generate extension flags

| Flag | Description |
| --- | --- |
| `--path <path>` | Specify the project path (Default: Current directory) |

### dev

Start a local development server.

```shell
shoplazza app dev
```

#### dev flags

| Flag | Description |
| --- | --- |
| `--path <path>` | Specify the project path (Default: Current directory) |

### deploy

Deploy the application to the production environment.

```shell
shoplazza app deploy
```

#### deploy flags

| Flag | Description |
| --- | --- |
| `--path <path>` | Specify the project path (Default: Current directory) |

### config link

Link an existing Shoplazza application to a local project, creating a configuration file.

```shell
shoplazza app config link
```

#### config link flags

| Flag | Description |
| --- | --- |
| `--path <path>` | Specify the project path (Default: Current directory) |
| `--client-id <client-id>` | Specify the client ID of the application to link |

### config use

Switch between multiple application configuration files within a project, activating the specified configuration.

```shell
shoplazza app config use
```

#### config use flags

| Flag | Description |
| --- | --- |
| `--path <path>` | Specify the project path (Default: Current directory) |

### versions list

View all deployed versions of the application, supporting pagination and detailed information display.

```shell
shoplazza app versions list
```

#### versions list flags

| Flag | Description |
| --- | --- |
| `--path <path>` | Specify the project path (Default: Current directory) |
| `--page-size <number>` | Number of versions to display per page (Default: 10) |

## No-Prefix Commands Details

### login

Logs you in the Shoplazza account.

**Terminal**

```shell
shoplazza login
```

#### login flags

| Flag | Description |
| --- | --- |
| `--store <store>` | The development store that you want to use to preview your theme.<br>The `--store` flag accepts the following inputs:<br>*   The store prefix, e.g. `my-store.myshoplaza.com`<br>*   The Shoplazza URL, e.g. `https://my-store.myshoplaza.com` |

### logout

Logs you out of the Shoplazza account.

**Terminal**

```shell
shoplazza logout
```

### switch

Switches between stores without logging out and logging in again.

If you enter this command without a `--store` flag, then you're prompted to select a store associated with your account.

**Terminal**

```shell
shoplazza switch
```

#### switch flags

| Flag | Description |
| --- | --- |
| `--store <store>` | The development store that you want to use to switch your theme.<br>The `--store` flag accepts the following inputs:<br>*   The store prefix, e.g. `my-store.myshoplaza.com`<br>*   The Shoplazza URL, e.g. `https://my-store.myshoplaza.com` |

### store

Displays the store that you're currently connected to.

**Terminal**

```shell
shoplazza store
```

### version

Displays the version of Shoplazza CLI that you're running.

**Terminal**

```shell
shoplazza version
```

### help

Lists the available commands and describes what they do.

**Terminal**

```shell
shoplazza help
```

TerminalYou can also use the `help` command or options to get more detailed information about a specific command:

**Terminal**

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

OR,

**Terminal**

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

OR,

**Terminal**

```shell
shoplazza [command] -h
```
