> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: dev-site

## Article: dev-site

## Article Link: https://dev.wix.com/docs/wix-cli/command-reference/project-commands/app-only/dev-site.md

## Article Content:

# wix dev-site

Manages the development site that the current app uses.

Use this command when the interactive site selector in [`wix dev`](https://dev.wix.com/docs/wix-cli/command-reference/project-commands/dev.md) isn't available, such as in a CI job or an AI agent session. In those environments, `wix dev` fails if your app doesn't have a development site yet, so run `wix dev-site` first to list the sites in your account, check which site your app uses, select a different site, or create a new development site.

> **Note:** Only app projects support this command. Each headless project uses a single site that you set in `wix.config.json`, so headless projects don't have a development site to select.

## Usage

```bash
wix dev-site <subcommand> [flags]
```

## Subcommands

The following table lists the subcommands available for the `wix dev-site` command:

| Subcommand | Description |
| --- | --- |
| `list` | Lists the sites in your account. |
| `current` | Shows which development site your app uses, and where that setting comes from. |
| `select <site-id>` | Selects a development site for your app. |
| `create` | Creates a development site. |

### list

Lists all the sites in your account, not just development sites. The command returns up to 100 sites and doesn't paginate.

The following flag is available for the `list` subcommand:

| Flag | Description |
| --- | --- |
| `--search <query>` | Searches sites by name or domain. Wix's servers match the query against site names, display names, and domains. |

### current

Shows which development site your app uses. The output also tells you whether that setting comes from `WIX_SITE_ID` or from your saved selection.

### select

Selects a development site for your app. Pass the site's ID as an argument:

```bash
wix dev-site select <site-id>
```

If you haven't installed your app on the site yet, the CLI gives you an installation URL and waits up to 2 minutes for you to finish installing. The CLI saves your selection only after you install the app, so if the wait times out, your app keeps its previous site.

The CLI stores your selection in your project's `.wix/app.config.json` file. Git ignores this file, so each of your collaborators picks their own development site.

### create

Creates a development site. Your account can hold a limited number of development sites at a time. If you reach the limit, the command fails, and you need to delete an existing development site first.

The following flags are available for the `create` subcommand:

| Flag | Description |
| --- | --- |
| `--template <template>` | Optional. Template to create the site from. Supported values are `dev` and `harmony`. Defaults to `dev`. |
| `--select` | Optional. Selects the new site for your app, using the same installation flow as [`select`](#select). |

## Override the development site with `WIX_SITE_ID`

To run your app against a specific site without changing the site you selected, add `WIX_SITE_ID` to your project's `.env.local` file:

```bash
WIX_SITE_ID=<site-id>
```

This helps when a CI job or an AI agent needs a particular site for a single run. The CLI reads `WIX_SITE_ID` from `.env.local` only, so exporting it in your terminal or as a CI environment variable has no effect.

`WIX_SITE_ID` overrides the site you selected, and the CLI never changes it for you. While the variable has a value, `wix dev-site select` and `wix dev-site create --select` both fail. To switch sites with `select` again, remove `WIX_SITE_ID` from `.env.local`.

To check which site your app uses at any point, run `wix dev-site current`.

## Machine-readable output

When the CLI runs as an agent, or when its output isn't a terminal, `wix dev-site` outputs [JSON Lines](https://jsonlines.org/) instead of human-readable text. Piping or redirecting the output triggers this too. For example, `wix dev-site current` outputs a single line:

```json
{"event":"current","siteId":"1234abcd-12ab-34cd-56ef-1234567890ab","source":"env"}
```

The CLI writes this JSON to standard output and any human-readable messages to standard error. If a command fails, it outputs an object with an `error` field and exits with code `1`.