For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceChangelog
ReferenceChangelog
  • Webflow CLI
    • Authentication
    • Configuration
    • Command reference
LogoLogo
Resources
Get started
On this page
  • Installation
  • Authentication
  • Configuration
  • Commands

Introduction to the Webflow CLI

Get started developing and deploying code with the Webflow CLI
Was this page helpful?

Authenticate with Webflow

Learn about authentication options for the Webflow CLI.
Next
Built with

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 manage sites, CMS content, forms, and assets, 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:

Manage Sites

List, inspect, and publish Webflow sites without leaving the terminal.

Manage Assets

Upload, update, and organize site assets and folders from the command line.

Manage CMS Content

Create, read, update, and publish CMS collections, fields, and items via the API.

Manage Forms

List forms and export submissions to JSON or CSV from the command line.

Authenticate

Log in once and manage your session across all CLI commands with auth login, auth status, and auth logout.

Share Code Components

Create reusable React components and deploy them directly to the Webflow Designer.

Export components with DevLink

Export your Webflow Components as a self-contained local React bundle.

Deploy to Webflow Cloud

Host and manage full-stack applications with serverless functions, data storage, and dynamic routing.

Create Designer Extensions

Develop custom applications that run directly inside the Webflow Designer.


Installation

Install the Webflow CLI globally using npm:

$npm install -g @webflow/webflow-cli

Verify the installation:

$webflow --version

Authentication

Authentication connects your local environment to your Webflow account, enabling you to deploy and sync code with Webflow.

$webflow auth login

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.

1{
2 "cloud": {
3 "projectId": "<Your Project ID>",
4 "framework": "astro"
5 },
6 "devlink": {
7 "rootDir": "./devlink",
8 "cssModules": true,
9 "fileExtensions": {
10 "js": "jsx"
11 }
12 },
13 "extensions": {
14 "name": "<Your Extension Name>",
15 "apiVersion": "2",
16 "publicDir": "dist"
17 },
18 "library": {
19 "name": "<Your Library Name>",
20 "components": ["./src/**/*.webflow.@(js|jsx|mjs|ts|tsx)"],
21 "bundleConfig": "./webpack.webflow.js"
22 }
23}

Commands

The CLI is organized by command group:

CommandDescription
webflow authAuthenticate and manage your session
webflow sitesList, inspect, and publish sites
webflow formsList forms and export submissions
webflow assetsUpload and manage site assets
webflow cmsManage CMS collections, fields, and items
webflow libraryShare code components
webflow devlinkExport Webflow components as local React code
webflow cloudDeploy to Webflow Cloud
webflow extensionCreate Designer Extensions

Use --help with any command to see available options:

$webflow library --help

For more information on each command, see the command reference.