This guide explains the bare minimum steps required to get a basic CLI app up and running using the Wix CLI for Apps. For fully functioning CLI app templates, visit our templates page.
The following diagram shows the overall flow for creating a CLI app. The steps in the red rectangle are covered in this article.
Follow these instructions to quickly create and test a CLI App.
Before getting started, make sure that:
Run the following command to create a new app project:
1
When asked what you would like to create, choose A new Wix App.
Note: You can also integrate an existing Wix app. For more information see Integrate Exiting Apps.
In the creation process, you will be asked for a Wix app name and a package name for your project.
During the setup process, you will also be asked to choose or create a development site for your app.
Development sites are premium sites provided by Wix where you can test your app during development. These sites offer more functionality than standard Wix sites and more flexibility for testing your app's functionality. You can have up to five development sites at a time. Development sites are owned by Wix and intended solely for app testing.
As you work locally with the CLI, you can use the CLI to open the different parts of your app on the development site in your browser.
Once the CLI has created your app, you will have all the files for your app in a local directory with the package name you chose.
The created app is a basic template with a dashboard page. The dashboard page contains some basic text and a button that triggers a toast message.
Your app is registered in the Dev Center and is installed (but inactive) on your development site.
For more information about the app structure, read CLI App Structure.
Your app won't be active on your development site at this stage. However, you can preview and test it in a local development environment.
To set up a local development environment, use the following command:
1
The CLI displays a menu. Type D
to open a browser window with a preview of the app's dashboard page.
The development environment is set up for hot reloading, so any changes you make to your code are immediately reflected in the browser.
After completing the above steps, you have a simple Wix app that you can experiment with and test locally.
You can now: