Introduction to the Webflow CLI
The Webflow CLI brings Webflow development into your local environment, allowing you to use your own tools, workflows, and version control. Use the CLI to build and share code components, manage Webflow Cloud deployments, and sync code with your Webflow sites directly from the command line.
With the CLI, you can:
Create reusable React components and deploy them directly to the Webflow Designer.
Export your Webflow Components as React components.
Host and manage full-stack applications with serverless functions, data storage, and dynamic routing.
Develop custom applications that run directly inside the Webflow Designer.
Installation
Install the Webflow CLI globally using npm:
Verify the installation:
Authentication
Authentication connects your local environment to your Webflow account, enabling you to deploy and sync code with Webflow.
This opens your browser to complete authentication for a single workspace, site, or multiple sites within a workspace. Once successful, your credentials are stored locally for future commands. For more information, see the authentication documentation.
Configuration
The webflow.json file is used to configure the CLI and should always be in the root of your project. Here you’ll define your project type, and the configuration for each product you’re using.
Below is an example of a webflow.json file for a project that uses Code Components, DevLink, and Webflow Cloud. To see more on configuration, see the configuration documentation.
Product-specific commands
The CLI is organized by product:
Each command namespace includes additional commands specific to that product. Use --help with any command to see available options:
For more information on each command, see the command reference.