Initializes a new Wix-managed headless project in the current folder.
Run this command at the root of the folder you want to connect. The command signs you in, creates the project, and saves the generated configuration locally so you can start developing. It runs without prompts: the business name is derived from the current folder's name, and the project is created from the blank template.
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 operates on the project in the current working directory.
You need to have a folder that already contains your project code.
This command takes no flags other than -h, --help to display help for the command.
The command operates on the current folder in place — it doesn't create a new project folder or modify your existing files. It:
wix.config.json file containing the site's siteId and the appId of its private app.After the command runs, your folder contains a wix.config.json similar to the following:
To start a local development environment, run wix dev.
The command fails if the current folder already contains a wix.config.json file.
create headless vs. initBoth commands provision the same Wix headless project and write a local wix.config.json file that connects it to your code. A Wix headless project consists of:
siteId in wix.config.json. It's the same entity as your business, which is the workspace in your Wix account with a dashboard, billing, and business solutions, listed on the Sites page.appId in wix.config.json.create headless scaffolds a complete, opinionated Astro project for you. It generates project files from a site template, installs dependencies, initializes a Git repository, and publishes your site. Use it when you want Wix to set up the project structure and frontend for you.init connects project code you already have. It only provisions the Wix headless project and writes wix.config.json, leaving the rest of your folder untouched. It doesn't generate a template, install dependencies, initialize Git, or publish your site. Use it when you just want to connect existing code to Wix.