What you'll learn
  • what is the Webiny CLI
  • what are the commonly used commands

Overview
anchor

Webiny CLI (command line interface) is the central tool that you’ll be using throughout the complete project development process, in your terminal of choice.

Out of the box, it offers a couple of commands that will let you perform essential tasks like deployments, development and production code builds, different scaffolding, and so on.

Additionally, the Webiny CLI is pluggable, meaning you can easily create your own custom commands, or even replace the existing ones. Please visit the Adding Custom Commands guide for more information.

For a full list of commands, in your terminal of choice, make sure to run:

Commands
anchor

In the following sections, we cover the most commonly used commands that the Webiny CLI provides.

Deployments
anchor

Here are the most commonly used deployments-related commands.

yarn webiny deploy --env ENV
anchor

Fully deploys your Webiny project. By default, dev will be used as the environment. You can specify a different environment using the --env argument.

yarn webiny deploy APP --env ENV
anchor

Deploys specified project application (instead of the whole project) into the specified environment. Note that when deploying a specific application, the --env argument is required.

yarn webiny destroy APP --env ENV
anchor

Destroys cloud infrastructure resources that were previously deployed as part of the specified project application, into a specified environment.

The --env argument is required.

For more hands-on information on the above listed commands, please visit the Deploy Your Project and Destroy Cloud Infrastructure guides.

yarn webiny pulumi APP --env ENV -- PULUMI_COMMAND
anchor

Provides a way to execute Pulumi specific commands directly via the Pulumi CLI.

For more information, please visit the Execute Pulumi Commands guide.

yarn webiny output APP --env ENV
anchor

Returns Pulumi stack output for the specified project application and environment.

Development
anchor

Here are the most commonly used development-related commands.

yarn webiny watch APP --env ENV
anchor

Starts local development session for the specified project application, in the specified environment.

For more information, please visit the Use Watch Command guide.

yarn webiny build APP --env ENV
anchor

Builds the specified project application, for the specified environment.

yarn webiny extension
anchor

Makes it easy to start developing new Webiny extensions. To learn more about extensions, please visit the Extensions article.

yarn webiny info --env ENV
anchor

Returns useful project information, like AWS region and useful URLs.

Command outputCommand output
(click to enlarge)

yarn webiny about
anchor

Prints out information helpful for debugging purposes.

Command outputCommand output
(click to enlarge)

Other
anchor

Here are some other commonly used commands.

yarn webiny disable-telemetry
anchor

Completely disables collection of anonymous usage information.

Telemetry

By default, Webiny collects anonymous usage information, which is exclusively used for improving the product and understanding usage patterns. Please take a look at our Telemetryexternal link page for more information on this subject.

FAQ
anchor

Do I Need to Install Webiny CLI Manually?
anchor

No, Webiny CLI comes set up automatically with every new Webiny project.

Do I Need to Invoke the Webiny CLI Withyarn?
anchor

For the highest chance that everything will work as expected, we recommend you do so. But do note that if you’re using some of the alternative terminals, like for example Zshexternal link, you might even get away without it.