This article documents the CLI commands for building Wix Apps.
For a detailed explanation of the process and how to initially create an app, see our Quick Start article.
Category | Command | Description |
---|---|---|
CLI for Apps | dev | Starts a local development environment that serves your app. |
generate | Generates an extension for your app. | |
build | Builds your app. | |
serve | Serves your built app. | |
preview | Creates an online preview of your built app. | |
create-version | Starts a process that guides you through creating a new app version in the app dashboard. | |
logs | Shows backend logs from your app. | |
Global CLI | login | Logs in to your Wix account. |
logout | Logs out of your Wix account. | |
telemetry | Opts in or out of sending anonymous usage information (telemetry) to Wix. | |
whoami | Displays the email address of the logged-in Wix user. |
Starts a local development environment that serves your app. Follow the prompts to open the different parts of your app on your development site in your browser.
The development environment is set up for hot reloading, so any changes you make to your code are immediately reflected in the browser.
Flag | Alias | Description |
---|---|---|
--https | -s | Starts your local development server on HTTPS. Use this flag if your browser does not allow iframes that contain HTTP pages within HTTPS pages. |
Starts a process that guides you through adding an extension to your app.
After selecting an extension you will be prompted for relevant configuration details, then your extension will be generated in your app's local files.
Builds your app.
You must build your app before:
Serves your app.
Serving creates a local preview of your built app. This preview is accessible only locally and can’t be shared with others.
Creates an online preview of your built app and provides an inline link to an app preview URL in the console.
An app preview URL is a URL you can share with team members who are collaborators on your development site. It directs to a dashboard page where they can preview and test your app.
By default, the code for your app preview is hosted on Wix's servers.
Flag | Alias | Description |
---|---|---|
--site <site-id> | -s <site-id> | Allows you to set the site used for application preview URLs. If this flag is not provided, the site-id defaults to the currently-selected development site.You can get the ID of a site from the site URL in your browser. For example, the site ID appears after the /dashboard/ part of this URL: |
--base-url <url> | Sets the base URL for uploading your static files to an external CDN. If this flag is not provided, the code for your preview will be hosted on Wix's servers. |
Starts a process that guides you through creating a new app version. You can view your app versions in the app dashboard.
Once the app version is created, you can submit it for review and publish it to the Wix App Market.
To learn more about app versions, see App Versions and Deployment.
Flag | Alias | Description |
---|---|---|
--version-type <type> | -t <type> | Specifies the type of version to create. Accepted values for <type> : major , minor |
--approve-preview | -y | Automatically approves continuing with the publishing process after the preview is provided. Without this flag, you will be asked for approval. |
--base-url <url> | Sets the base URL for uploading your static files to an external CDN. If this flag is not provided, the code for your app will be hosted on Wix's servers. |
Shows backend logs of a selected version of your app.
Flag | Alias | Description |
---|---|---|
--version <version> | Required. The version of the app to show logs for. For example, --version 1.0.0 |
Logs in to your Wix account.
Logs out of your Wix account.
Note: To switch to another Wix account:
wix logout
.wix login
, then click the link provided.Opts in or out of sending anonymous usage information (telemetry) to Wix.
Accepted values for <state>
: on
, off
Displays the email address of the logged-in Wix user.