The Wix CLI is the command-line tool for creating, developing, and deploying both Wix apps and Wix-managed headless projects. For Wix site development, see Git Integration & Wix CLI for Sites instead.
The CLI generates a complete project structure and handles initial setup and configuration. It also provides commands to generate extensions and manage your project throughout development. New CLI projects include Wix skills, so AI tools can perform CLI tasks for you. This lets you focus on building the unique features of your project.
To get started:
For a walkthrough of building an app with the CLI, watch the video tutorial:
Note: Headless projects created with the CLI are Wix-managed headless projects. This is the recommended path for new headless projects.
The CLI uses a standardized project structure based on the Astro web framework. Astro is a JavaScript-based web framework designed for building fast, content-focused websites. The CLI also supports backend development with HTTP endpoints.
The Wix CLI is built on Astro because it offers several key advantages for modern web development:
The CLI allows you to:
The CLI also provides full TypeScript support with IntelliSense, offering autocomplete suggestions and validation as you code.
New CLI projects include Wix skills by default. Wix skills enhance your AI workflow by providing instructions and context that supported AI tools use to develop, deploy, and validate a CLI project.
The CLI generates the complete project structure needed for Wix app development. You can add extensions built with TypeScript, React components, and the Wix Design System, providing a native Wix look and feel.
When developing apps, you can test your functionality using development sites. These are premium Wix sites that you can use for app testing. You can maintain up to 5 development sites simultaneously for testing different aspects of your app.
The CLI streamlines Wix Headless project development, so you can work directly with Wix's business solutions and dashboard, and build a custom frontend using any technology supported by Astro.
When you create a headless project, the CLI generates the code for an Astro site so you can begin developing immediately. You can also open and develop projects you started with Wix Vibe, the AI-driven UI for Wix-managed Headless, locally with the CLI.
If you have an existing Astro project, you can link it to Wix instead of creating a new one.
When you create a headless project, the CLI sets up a private app that allows you to add features to your project through extensions. The app also acts as the OAuth app that handles authentication for your project's frontend. This private app can't be shared with others, it's only for use in your headless project.
You can use a custom domain for headless frontends to provide a branded experience for users.
The CLI uses a standardized project structure based on Astro, while giving you the flexibility to organize your extensions into custom folders within the src/ directory. This allows you to structure your code in a way that works best for your project.
The CLI provides built-in support for environment variables, allowing you to store configuration values and secrets outside of your code. You can define type-safe environment variables with different security levels, which makes your applications more secure and portable.
After developing and testing your Wix CLI project locally, you can build it, create shareable previews, and take it to production. For more information, see Build and Deploy a Project with the Wix CLI.
The Wix CLI can be integrated into any CI/CD pipeline, allowing you to automate tasks such as testing your CLI projects.
For example, you can create a GitHub Actions workflow that runs on every pull request and performs unit tests for your CLI project. For more information about unit testing, see Write Unit Tests for a Wix CLI Project.
We're actively working on improving the CLI and adding features, which means we will be releasing new versions. It's important to keep your CLI up to date to benefit from the latest improvements and features. You can check the changelog for updates to the CLI.
You can check which version of the CLI you have using the following command:
You can upgrade to the latest version of the CLI using the following command:
Note: If the latest version of the CLI includes a new command, you'll need to add the new command to your package.json file.
The CLI provides a serverless hosting solution where scaling, resource allocation, and maintenance are fully managed, so you don't have to worry about infrastructure.
The main features include:
Wix developer documentation is available in machine-readable formats for use with AI coding assistants and LLMs:
.md to any documentation page URL to retrieve a Markdown version of that page.The Wix CLI replaces the Legacy Wix CLI for Apps, and also supports creating Wix-managed headless projects.
The Legacy Wix CLI for Apps no longer receives updates or feature additions. Use the legacy reference only if you're maintaining an existing app.