About the Wix CLI for Headless

With the Wix CLI, you can create, develop, and release Wix-managed headless projects. This section documents what's specific to headless projects: their project structure and the commands that work in them.

Note: Commands that you use with headless projects but aren't specific to them, such as logging in, are global commands.

To let AI tools perform CLI tasks for you, add Wix skills to your project.

To create your first project, see Create a Headless Project with the Wix CLI for Headless.

Astro and other frameworks

When you create a headless project, the CLI generates the code for an Astro site, using the Wix Astro integration. Astro is a web framework for content-focused sites, and it lets you add components from frameworks such as React, Vue, or Svelte where you need them. If you already have an Astro project, you can link it to Wix instead.

In Astro projects, you can add extensions and backend HTTP endpoints. You can also call Wix APIs directly from your code. The CLI handles token management and authentication, so you don't need to set up a Wix client.

You can also use the CLI to deploy a frontend built with another web framework. In that case, you set up authentication yourself. A project you connect with npm create @wix/new init supports only the preview, release, and env project commands.

Project structure

A headless project you create with the CLI follows a standard project structure, based on Astro. You can organize your extensions in your own folders in the src/ folder.

Commands

The Wix CLI for Headless Command Reference documents the commands for headless projects:

  • Project creation commands run through npm create @wix/new, to create a Wix-managed headless project from a template or from code you already have.
  • Project commands run in the folder of a project that uses the headless project structure.
  • Standalone commands, such as wix account, don't need you to be in a project folder.

Develop, test, and release

The project's private app

When you create a headless project, the CLI sets up a private app for it. The app lets you add features to your project through extensions, and it acts as the OAuth app that handles authentication for your project's frontend. You can use the app only in your headless project.

Custom domains

You can connect a custom domain to your project's site. To find a domain and get a link to buy it from the terminal, use wix account.

Hosting and infrastructure

Wix hosts your project on serverless infrastructure, and handles scaling, resource allocation, and maintenance for you:

  • Static site hosting: A global CDN delivers your site's content fast and reliably.
  • Serverless architecture: Your full-stack project runs without servers to manage. Wix scales it and manages its resources automatically.
  • Automatic SSL certificates: Wix provisions and renews SSL certificates, so connections to your site are secure.
  • Session management middleware: A middleware manages session tokens and cookies for the current site visitor, so you can use stateful session APIs, such as eCommerce carts and site visitor authentication.

Last updated: 11 November 2026

Did this help?