Creates a new Wix-managed Headless project. This is the recommended path for new headless projects, where Wix handles hosting, OAuth, environment variables, and infrastructure. Run this command in the parent directory where you want the project folder. The command provisions a business and site for the project, scaffolds the chosen site template into a new local folder, installs dependencies, and initializes a Git repository.
If you don't include flags, it runs in interactive mode, prompting you for a business name, project name, and site template. To run non-interactively, use the headless command together with the flags below.
For a step-by-step walkthrough, see Quick Start a Headless Project.
Note: This command is provided by the @wix/create-new package, which is invoked through npm create. It's a separate package from @wix/cli and doesn't require an existing project.
The -- separator tells npm to forward everything after it to the @wix/create-new package, instead of consuming the flags itself.
The following flags are available for the headless command:
| Flag | Description |
|---|---|
--project-name <project-name> | Optional. The name of your project, used as the local folder name and the project identifier. Must be 3 to 20 characters long and contain only lowercase letters and numbers. Don't use hyphens, underscores, uppercase letters, or other characters. If omitted, the CLI prompts you for a project name in interactive mode. To run non-interactively, pass this flag together with --site-template-id. |
--business-name <business-name> | Optional. The name of your business as it will appear in the Wix dashboard. If omitted, the CLI prompts you in interactive mode. |
--site-template-id <site-template-id> | Optional. The ID of the site template to scaffold from. If omitted, the CLI prompts you to pick a template in interactive mode. Required whenever you pass --project-name to run non-interactively. For valid IDs, see Site template IDs. |
--skip-install | Skip automatic dependency installation. If you set this flag, run npm install manually before starting the project. |
--skip-git | Skip initializing a Git repository during setup. |
--no-publish | Don't publish your site after creating the project. To publish later, run npm run release. |
-v, --version | Output the version number of @wix/create-new. |
-h, --help | Display help for the command. |
The following Astro-based site templates are supported. Pass the ID via --site-template-id to scaffold against the corresponding template non-interactively. For descriptions of each template's features and links to the source repositories, see Wix CLI for Headless Templates.
| Template | ID | Description |
|---|---|---|
| Commerce (Wix Stores) | e5da13f4-c01e-4b61-a9c7-55dacd961d54 | Product catalog, checkout, and more. |
| Scheduler (Wix Bookings) | 72ade0e3-1871-4c04-ac54-419ca874d9d3 | Appointment booking and calendar. |
| Registration (Wix Forms) | e5d63bf1-cd06-48eb-ad77-0da9235adcf1 | Inputs, dropdowns, and field validations. |
| Blank | 212b41cb-0da6-4401-9c72-7c579e6477a2 | Basic Astro project with no business solution preconfigured. |
Scaffold an ecommerce project built on Astro non-interactively, without auto-publishing:
Scaffold a blank Astro project and skip dependency installation, with auto-publishing:
The command creates a new folder named after --project-name. The folder follows the standard project structure for Wix CLI projects.
In addition to scaffolding the standard layout, this command:
wix.config.json with the appId and siteId provisioned for the new project.--skip-git.To start a local development environment, run wix dev.