Wix CLI Commands for Apps
This article documents the CLI commands for building apps on the Wix Platform.
For a detailed explanation of the process and how to initially create an app, see our Quick Start article.
Command overview
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 Wix Developers Center. | |
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. |
dev
1wix app dev
Starts a local development environment that serves your app. Follow the prompts to open the generated dashboard page 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.
dev flags
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. |
generate
1wix app generate
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.
build
1wix app build
Builds your app.
You must build your app before:
- Creating a version
- Previewing your app
- Serving your app
serve
1wix app serve
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.
preview
1wix app preview
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.
preview flags
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. |
create-version
1wix app create-version
Starts a process that guides you through creating a new app version in the Wix Developers Center.
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.
create-version flags
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. |
--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. |
login
1wix login
Logs in to your Wix account.
logout
1wix logout
Logs out of your Wix account.
Note: To switch to another Wix account:
- Run
wix logout
. - Run
wix login
, then click the link provided. - Click Log in with another account.
telemetry
1wix telemetry <state>
Opts in or out of sending anonymous usage information (telemetry) to Wix.
Accepted values for <state>
: on
, off
whoami
1wix whoami
Displays the email address of the logged-in Wix user.