> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - 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/full-integration-astro/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/full-integration-astro/get-started/create-a-project-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/full-integration-astro/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/full-integration-astro/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/full-integration-astro/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/cli-for-headless/project-structure/about-the-headless-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/full-integration-astro/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 a frontend built with another web framework, but the command set is smaller and you set up authentication yourself. For other frameworks, see [Build and Deploy with the CLI](https://dev.wix.com/docs/go-headless/wix-managed-headless/other-frameworks/build-and-deploy-with-the-cli.md).

### 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-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/cli-for-headless/project-structure/about-the-headless-project-structure.md):

```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/cli-for-headless/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 with the CLI](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/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
```

## See also

- [Wix CLI Command Reference](https://dev.wix.com/docs/wix-cli/cli-for-headless/command-reference/introduction.md)
- [Wix CLI Project Structure](https://dev.wix.com/docs/wix-cli/cli-for-headless/project-structure/about-the-headless-project-structure.md)
- [Quick Start with the Wix CLI](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/get-started/create-a-project-with-the-wix-cli.md)