About Extensions in the Wix CLI

The Wix CLI is in Developer Preview and is subject to change.

CLI Documentation Notice

You're viewing documentation for the new Wix CLI, which we recommend for all new projects. Determine which CLI your project uses.

Previous CLI documentation:

The Wix CLI allows you to easily extend your project's functionality with extensions. For example, with extensions you can add custom dashboard pages or implement backend logic to handle events.

The Wix CLI supports multiple extension types depending on the type of project you create. The creation and setup process for extensions in the CLI takes place in the terminal. Then, to edit your extensions, you write code directly in your project's local files.

Note: When you add an extension to a headless project, the CLI adds it to your project's private Wix app.

Adding extensions

You can add extensions to your project using the generate command.

This command starts a process that guides you through adding an extension to your project.

After selecting an extension, you'll be prompted for the relevant configuration details. Your extension will then be generated in your project's local files under src/extensions/. If you want to move your extension files in your project, make sure the new path is specified in the extension.ts file. Learn more about the extension.ts file.

Note: You must run release before your extensions are visible in the app dashboard.

Supported extension types

The Wix CLI currently supports the following extensions:

Dashboard extensions

Backend extensions

Backend endpoints

Wix CLI projects are based on the Astro web framework, so they support backend development with features like Astro endpoints.

Notes:

Site extensions

Note: Site extensions in the CLI are only relevant for app projects.

Note: Site plugin extensions are currently under development and will be available soon.

Data collection extension

The data collections extension allows your app to automatically create CMS data collections when it's installed on a site. Use the data collections extension whenever your app needs to store or manage structured data on a site, such as app settings, content, analytics, or user-generated content.

You can't add data collection extensions to your app using the CLI. Instead, you can add them in the app dashboard. For detailed instructions, see Add a Data Collections Extension in the App Dashboard.

See also

Did this help?