About CLI App Extensions

Your app can add functionality to various parts of the Wix ecosystem, such as adding a page to a site’s dashboard or injecting custom code into a site's DOM. Each specific type of functionality that an app can provide is called an extension. For general information about Wix app extensions, read About Extensions.

Wix CLI for apps supports multiple app extension types. 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 CLI app project's files.

Why create extensions in the CLI app

You can create app extensions in the app dashboard, however, there are several advantages to doing so in the CLI.

  • Streamlined, structured creation. When you create extensions using the generate command, you are prompted for any required details, and then the extension files are generated for you.
  • Additional features and customization. See the documentation for supported extension types for details.
  • Local previews during development.
  • Your app and its extensions are hosted on Wix’s servers by default.

Adding extensions

You can add extensions to your CLI app using the generate command:

Copy

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

After selecting an extension, you’ll be prompted for the relevant configuration details. Your extension will then be generated in your app's local files.

Your extension's files are placed under the directory of its general extension type, such as site or dashboard. For example, /src/site/<your-extension-name> or /src/dashboard/<your-extension-name>.

Supported extension types

CLI apps currently support the following extensions:

Dashboard Extensions

Site Extensions

Backend Extensions

Extensions not currently supported

Any extensions not listed above are currently unavailable in the CLI. Your app can still use these extensions, but they must be managed in the app dashboard and are not represented in your app's local files.

For more information about adding extensions in the app dashboard, see About Extensions.

Did this help?