The Wix CLI for Apps is a tool for building Wix apps using commands in the terminal and your local IDE. The Blocks-CLI integration offers a hybrid workflow that combines Wix Blocks' visual design capabilities with the Wix CLI development environment:
Each environment serves a specific purpose in the workflow:
In the CLI | In Blocks |
---|---|
|
|
The Blocks-CLI integration currently supports only site widget extensions.
The following capabilities are not available with this integration:
To begin, you must have an app project created using the Wix CLI. You can either open an existing project or create a new project.
You can then use the CLI commands to do the following:
For detailed instructions on integrating a CLI project with Blocks, see the CLI documentation.
When you've integrated your CLI project with Blocks, a CLI Active indication appears in the Blocks editor.
In the Blocks editor, you design your UI and configure your widgets' editor experience and installation settings:
Click Sync in Blocks to update the CLI environment with your latest UI changes. This does the following:
You can click Sync as often as needed, as long as the local development environment is running in the CLI.
Tip:
To define element IDs for selecting elements in your code, use the Layers panel, as the Properties and Events
panel isn't available in the Blocks-CLI integration.
When using the CLI, you write your code in TypeScript and work with the Wix JavaScript SDK. The CLI does not support Velo APIs, and its code structure differs from widget and panel code in the Blocks editor.
From the CLI, you can preview and test your app in both the editor and the live site. The local development environment supports hot code reloading, so changes appear instantly in the browser.
For detailed instructions on coding and previewing your app in the CLI, see the CLI documentation.
When your app is ready for production, you can release an app version in the CLI. This allows you to publish it to the Wix App Market or install it on a site using a direct install URL.