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

CategoryCommandDescription
CLI for AppsdevStarts a local development environment that serves your app.
generateGenerates an extension for your app
buildBuilds your app.
serveServes your built app.
previewCreates an online preview of your built app.
create-versionStarts a process that guides you through creating a new app version in the Wix Developers Center.
Global CLIloginLogs in to your Wix account.
logoutLogs out of your Wix account.
telemetryOpts in or out of sending anonymous usage information (telemetry) to Wix.
whoamiDisplays the email address of the logged-in Wix user.

dev

Copy
1
wix 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

FlagAliasDescription
--https-sStarts your local development server on HTTPS. Use this flag if your browser does not allow iframes that contain HTTP pages within HTTPS pages.

generate

Copy
1
wix 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

Copy
1
wix app build

Builds your app.

You must build your app before:

  • Creating a version
  • Previewing your app
  • Serving your app

serve

Copy
1
wix 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

Copy
1
wix 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

FlagAliasDescription
--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

Copy
1
wix 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

FlagAliasDescription
--version-type <type>-t <type>Specifies the type of version to create.

Accepted values for <type>: major, minor
--approve-preview-yAutomatically 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

Copy
1
wix login

Logs in to your Wix account.

logout

Copy
1
wix logout

Logs out of your Wix account.

Note: To switch to another Wix account:

  1. Run wix logout.
  2. Run wix login, then click the link provided.
  3. Click Log in with another account.

telemetry

Copy
1
wix telemetry <state>

Opts in or out of sending anonymous usage information (telemetry) to Wix.

Accepted values for <state>: on, off

whoami

Copy
1
wix whoami

Displays the email address of the logged-in Wix user.

Was this helpful?
Yes
No