> 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: Build and Deploy with the CLI

## Article: Build and Deploy a Headless Project with the Wix CLI

## Article Link: https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/development/build-and-deploy-with-the-cli.md

## Article Content:

# Build and Deploy with the CLI

After developing and testing your Wix CLI headless project locally, you can take it to production. This article guides you through that process. You can also use [Wix Skills](https://dev.wix.com/docs/api-reference/articles/ai-tools/about-wix-skills.md) to implement the build and deploy process.

For instructions on creating a project, 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).

> **Using another framework?** Wix doesn't build projects that aren't built with Astro, so there's no `wix build` step. 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) for other frameworks instead.

## Before you begin

Before getting started, make sure that you have [Node.js](https://nodejs.org/en/) (v24.22.1 or higher).

## Step 1 | Build the project

Run the [build](https://dev.wix.com/docs/wix-cli/cli-for-headless/command-reference/project-commands/build.md) command to build the assets for your project:

```bash
wix build
```

## Step 2 (Optional) | Create preview URLs

A preview URL is a link you can share with team members that allows them to preview and test your project. Each preview URL directs to a unique version of your project hosted on Wix's servers. Subsequent updates to your project won't affect any previously created versions.

To push your project to Wix's servers for hosting and create preview URLs, run the [preview](https://dev.wix.com/docs/wix-cli/cli-for-headless/command-reference/project-commands/preview.md) command:

```bash
wix preview
```

This returns unique URLs linking to preview versions of your site and dashboard that you can share with others.

<blockquote class="important">

__Important:__
The `preview` command uploads your code but doesn't register all extensions in your project's configuration. Some extensions won't be recognized by Wix until you run [`release`](https://dev.wix.com/docs/wix-cli/cli-for-headless/command-reference/project-commands/release.md).

</blockquote>

## Step 3 | Release your project

To push your project to Wix's servers for hosting and releasing a version, run the [release](https://dev.wix.com/docs/wix-cli/cli-for-headless/command-reference/project-commands/release.md) command and follow the prompts. This step also registers extensions in your project's configuration, so some extensions won't work until you've run `release`:

> **Note**: A release can include at most 5,000 static files.

```bash
wix release
```

Releasing pushes your project to Wix's servers and publishes your site. After releasing your project, the CLI provides the URL of your published site, and preview URLs for your project's site and dashboard.

## Next steps
You now have a fully working project.

Use the following resources to continue building your project:

+ [Add extensions to your project](https://dev.wix.com/docs/go-headless/wix-managed-headless/full-integration-astro/extensions/about-extensions.md).
+ [Learn more about how to develop your project](https://dev.wix.com/docs/wix-cli/cli-for-headless/about-the-wix-cli-for-headless.md).
+ [Learn about the project structure](https://dev.wix.com/docs/wix-cli/cli-for-headless/project-structure/about-the-headless-project-structure.md).