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.
You can create app extensions in the app dashboard, however, there are several advantages to doing so in the CLI.
You can add extensions to your CLI app using the generate command:
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>
.
CLI apps currently support the following extensions:
Dashboard Extensions
Site Extensions
Backend Extensions
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.