Wix CLI for Headless Command Reference

With the Wix CLI, you can develop, test, and deploy Wix headless projects from your terminal. This reference documents the commands for headless projects.

The sections of this article are organized by command type, and each section describes the syntax of its commands. Every command accepts -h and --help, which print the command's usage and flags.

The commands you can use depend on where you run them:

Project creation commands

These commands create a Wix-managed headless project, from a template or from code you already have. They're provided by the @wix/create-new package, so they run through npm create, not as wix commands.

CommandDescription
npm create @wix/new headlessCreates a new Wix headless project, including provisioning a Wix business and site, scaffolding from a template, and initializing local files.
npm create @wix/new headless linkLinks an existing Astro project to Wix, provisioning a Wix business and site for it.
npm create @wix/new initInitializes a Wix-managed headless project in the current folder, without prompts.

Command syntax

Project creation commands use this syntax:

Copy

Angle brackets mark a required part, and square brackets mark an optional part. Don't type the brackets.

The -- separator tells npm to forward everything after it to the @wix/create-new package, instead of treating the flags as options for npm create itself.

Project commands

These commands operate on a project that uses the headless project structure. Run them in the project's folder.

CommandDescription
devStarts a local development environment that serves your project.
buildBuilds your project.
generateGenerates an extension for your project.
schemaPrints a JSON schema of the available extension types and their required inputs.
previewCreates an online preview of your built project.
releaseReleases your project and publishes its site.
envManages your project's environment variables on Wix's servers.
translationManages your project's translations in the Multilingual dashboard.
skillsManages the Wix skills in your project.

Command syntax

Project commands follow this general form:

Copy

Angle brackets mark a required part, and square brackets mark an optional part. Don't type the brackets.

Where:

  • <command> is the primary action (for example, dev, build, release)
  • [subcommand] is a secondary action for commands that have subcommands (for example, set in wix env set)
  • [flags] are parameters that modify the command's behavior

When a command requires a subcommand, its Usage section shows <subcommand>. Running the command without a subcommand prints the command's help and exits with an error code.

Standalone commands

You don't need to be in a project folder to run standalone commands. Unlike the global commands, standalone commands are documented in the headless reference, although they run in any project or folder.

CommandDescription
accountManages your Wix account, including its domains.

Command syntax

Standalone commands follow the same general form as project commands:

Copy

Angle brackets mark a required part, and square brackets mark an optional part. Don't type the brackets.

Last updated: 10 November 2026

Did this help?