> 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: About the Wix CLI

## Article: About the Wix CLI

## Article Link: https://dev.wix.com/docs/go-headless/wix-managed-headless/project-development/about-the-wix-cli.md

## Article Content:

# About the Wix CLI

The Wix CLI is the command-line tool for creating, developing, and deploying [Wix-managed headless projects](https://dev.wix.com/docs/go-headless/wix-managed-headless/about-wix-managed-headless.md). It generates a complete project structure, handles initial setup and configuration, and provides commands to manage your project throughout development.

New CLI projects include [Wix skills](https://dev.wix.com/docs/api-reference/articles/ai-tools/about-wix-skills.md), so AI tools can perform CLI tasks for you. This lets you focus on building the unique features of your project.

To get started, see [Quick Start with the Wix CLI](https://dev.wix.com/docs/go-headless/wix-managed-headless/get-started/quick-start-with-the-wix-cli.md).

> **Note:** Headless projects created with the CLI are [Wix-managed headless](https://dev.wix.com/docs/go-headless/wix-managed-headless/about-wix-managed-headless.md) projects. This is the recommended path for new headless projects.

This article covers the CLI as a tool and the project it generates. For what Wix-managed headless is, what you get, and how to choose it, see [About Wix-Managed Headless](https://dev.wix.com/docs/go-headless/wix-managed-headless/about-wix-managed-headless.md).

## What you can build

The CLI streamlines headless project development, so you can work directly with Wix's business solutions and build a custom frontend using any technology supported by Astro. You can:

- Generate [extensions](https://dev.wix.com/docs/go-headless/wix-managed-headless/extensions/about-extensions-in-the-wix-cli.md) like custom dashboard pages, event handlers, and backend APIs.
- Call [Wix JavaScript SDK](https://dev.wix.com/docs/sdk.md) methods directly. [Wix's Astro integration](https://dev.wix.com/docs/go-headless/wix-managed-headless/about-the-astro-integration.md) handles token management and authentication for you, with no client setup. If building with a framework other than Astro, you need to handle authentication yourself.
- Use a [custom domain](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Fadd-domain) for your headless frontend to provide a branded experience.

## Project structure and Astro

The CLI uses a standardized project structure based on the [Astro](https://astro.build/) web framework. Astro offers a performance-focused architecture, partial hydration, and a flexible component model that lets you mix vanilla HTML/CSS/JS with React, Vue, or Svelte components as needed.

The CLI also supports backend development with [HTTP endpoints](https://dev.wix.com/docs/go-headless/wix-managed-headless/extensions/backend/http-endpoints/about-http-endpoints.md).

For a per-folder breakdown of the generated project, see [Wix CLI Project Structure](https://dev.wix.com/docs/wix-cli/guides/project-structure/project-structure.md).

If you have an existing Astro project, you can [connect it to Wix](https://dev.wix.com/docs/go-headless/wix-managed-headless/get-started/connect-an-existing-astro-project.md) instead of creating a new one.

> **Note:** The Astro structure, extensions, and automatic authentication apply only to Astro projects (generated or connected with the CLI). You can still use the CLI to deploy and manage [your own existing frontend](https://dev.wix.com/docs/go-headless/get-started/quick-starts/wix-managed-headless/quick-start-from-your-own-frontend.md), but you set up authentication yourself.

### Dashboard redirect

The CLI adds a built-in `/admin` route to your project. When someone visits `"https://your-site.com/admin"`, the browser redirects them to your project's dashboard. Only approved [collaborators](https://dev.wix.com/docs/go-headless/project-guides/project-management/invite-collaborators.md) can access the dashboard.

The redirect is enabled by default. To disable it, set `adminRedirect` to `false` in the `wix()` integration in [`astro.config.mjs`](https://dev.wix.com/docs/wix-cli/guides/project-structure/project-structure.md#astroconfigmjs):

```js
wix({
  adminRedirect: false,
})
```

## Develop and test projects

As you work locally with the CLI, you can open the local version of your project's site or dashboard in your browser by running the [`dev`](https://dev.wix.com/docs/wix-cli/command-reference/project-commands/dev.md) command. The development environment supports hot reloading, so any changes you make to your code are immediately reflected in the browser.

## Build, preview, and release projects

After developing and testing your project locally, you can build it, create shareable previews, and release it to production. For more information, see [Build and Deploy a Project with the Wix CLI](https://dev.wix.com/docs/go-headless/wix-managed-headless/project-development/build-and-deploy-with-the-cli.md).

## Keep the CLI up to date

Check which version of the CLI you have:

```bash
npm list @wix/cli
```

Upgrade to the latest:

```bash
npm i --save-dev @wix/cli@latest
```

> **Note:** If the latest version of the CLI includes a new command, you'll need to [add the new command to your `package.json` file](https://dev.wix.com/docs/wix-cli/guides/about-the-wix-cli.md).

## See also

- [Wix CLI Command Reference](https://dev.wix.com/docs/wix-cli/command-reference/introduction.md)
- [Wix CLI Project Structure](https://dev.wix.com/docs/wix-cli/guides/project-structure/project-structure.md)
- [Quick Start with the Wix CLI](https://dev.wix.com/docs/go-headless/wix-managed-headless/get-started/quick-start-with-the-wix-cli.md)