@webflow/webflow-cli
v2.1.0
Published
The Webflow CLI lets you manage Webflow sites, CMS content, forms, assets, and code components from the command line.
Downloads
427,573
Maintainers
Keywords
Readme
@webflow/webflow-cli
The Webflow CLI lets you manage Webflow sites, CMS content, forms, assets, and code components from the command line.
Installation
npm install -g @webflow/webflow-cliCommands
- Authentication
- Sites
- CMS
- Forms
- Assets
- DevLink Import (Code Components)
- DevLink Export
- Designer Extensions
- Global Options
Authentication
Authenticate with Webflow and save credentials locally.
webflow auth login # OAuth login — saves token to .env
webflow auth login --force # Re-authenticate even if credentials existSites
Manage Webflow sites from the CLI.
webflow sites list # List all sites in your workspace
webflow sites get <siteId> # Get details for a specific site
webflow sites domains --site <siteId> # List custom domains for a site
webflow sites publish --site <siteId> # Publish a sitesites list options
| Flag | Description |
| ------------------- | ---------------------------------------------------------------------------------------------------------------- |
| --fields <fields> | Comma-separated columns to display (id, displayName, shortName, timeZone, createdOn, lastUpdated, lastPublished) |
| --json | Output as JSON |
sites publish options
| Flag | Description |
| --------------------- | ---------------------------------------------------------- |
| --site <siteId> | Site ID to publish |
| --domain <domainId> | Publish to a specific custom domain (repeatable) |
| --page <pageId> | Publish a single page instead of the full site |
| --dry-run | Preview what would be published without triggering a build |
CMS
Manage CMS collections and items.
# Collections
webflow cms collections list --site <siteId>
webflow cms collections get --site <siteId> --collection <collectionId>
webflow cms collections create --site <siteId> --name "Blog Posts" --slug "blog-posts"
# Fields
webflow cms fields create --collection <collectionId> --name "Author" --type PlainText
# Items
webflow cms items list --site <siteId> --collection <collectionId>
webflow cms items get --site <siteId> --collection <collectionId> --item <itemId>
webflow cms items create --site <siteId> --collection <collectionId> --data '{"name":"Hello"}'
webflow cms items update --site <siteId> --collection <collectionId> --item <itemId> --data '{"name":"Updated"}'
webflow cms items delete --site <siteId> --collection <collectionId> --item <itemId>
webflow cms items publish --site <siteId> --collection <collectionId> --item <itemId>cms collections list options
| Flag | Description |
| ------------------- | ---------------------------------------------------------------------- |
| --sort-by <field> | Sort by: displayName, slug, lastUpdated (default: displayName) |
| --order <dir> | asc or desc (default: asc) |
| --json | Output as JSON |
Forms
List forms and export submissions from a Webflow site.
webflow forms list --site <siteId> # List all forms on a site
webflow forms submissions --site <siteId> --form <formId> # List submissions in the terminal
webflow forms submissions --site <siteId> --form <formId> --output out.csv # Export submissions to CSVNote: Forms commands require the
forms:readOAuth scope. If you authenticated before upgrading to v1.21.0, runwebflow auth login --forceto pick up the new scope.
forms list options
| Flag | Description |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| --site <siteId> | Site ID (required) |
| --fields <fields> | Comma-separated columns: id, displayName, name, slug, createdOn, lastUpdated (default: id,displayName,slug) |
| --json | Output as JSON |
forms submissions options
| Flag | Description |
| ----------------- | ---------------------------------------------------- |
| --site <siteId> | Site ID (required) |
| --form <formId> | Form ID (required) |
| --output <file> | Save all submissions as CSV to the specified file |
| --json | Output as JSON (ignored when --output is also set) |
Assets
Upload and manage site assets.
webflow assets list --site <siteId> # List assets
webflow assets upload <file> --site <siteId> # Upload a file
webflow assets update <assetId> --display-name "New name" # Update asset metadata
webflow assets folders --site <siteId> # List asset folders
webflow assets folders create --site <siteId> --name "Images"assets list options
| Flag | Description |
| --------------------- | --------------------------------------------------------------------------------------------------------- |
| --folder <folderId> | Filter by folder |
| --sort-by <field> | Sort by: displayName, originalFileName, contentType, size, lastUpdated (default: displayName) |
| --order <dir> | asc or desc (default: asc) |
| --fields <fields> | Comma-separated columns to display |
| --limit <n> | Max assets to return |
| --offset <n> | Skip N assets (for pagination) |
| --json | Output as JSON |
assets upload options
| Flag | Description |
| ---------------------- | ----------------------------------- |
| --name <displayName> | Display name (defaults to filename) |
| --folder <folderId> | Upload into a folder |
| --dry-run | Preview without uploading |
Supported file types: PNG, JPG, JPEG, GIF, SVG, WEBP, AVIF (≤ 4 MB); PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, TXT, CSV, ODT, ODS, ODP, JSON, Lottie (≤ 10 MB)
DevLink Import (Code Components)
Build and import React component libraries to your Webflow workspace.
webflow devlink import # Build and share your component library
webflow devlink bundle # Build locally without sharingAliases: webflow library share, webflow library bundle
Prerequisites
Create a webflow.json in your project root:
{
"library": {
"name": "My Component Library",
"description": "A collection of custom components",
"components": ["src/components/**/*.webflow.tsx"]
}
}devlink import options
| Flag | Description |
| --------------------- | --------------------------------------------------- |
| --api-token <token> | Workspace API token (overrides WEBFLOW_API_TOKEN) |
| --force | Compile even with warnings or type errors |
| --dev | Bundle in development mode |
devlink bundle options
| Flag | Description |
| ---------------------- | ----------------------------------------------------- |
| --public-path <path> | Set the public path for the bundle |
| --output-path <path> | Set the output path for the bundle (default ./dist) |
| --force | Compile even with warnings or type errors |
| --dev | Bundle in development mode |
DevLink Export
Export Webflow Components from your Webflow Site
webflow devlink export # Export Webflow Componentsdevlink export options
| Flag | Description |
| --------------------- | --------------------------------------------------- |
| --api-token <token> | Workspace API token (overrides WEBFLOW_API_TOKEN) |
| --site <siteId> | Site ID to export from |
Designer Extensions
Scaffold and serve Webflow Designer Extensions.
webflow extension init <name> # Create a new extension project
webflow extension serve [port] # Serve locally (default port: 1337)
webflow extension bundle # Build and package for upload (outputs bundle.zip)Global Options
Available on all commands:
| Flag | Description |
| --------------------- | -------------------------------------------------- |
| --no-input | Disable interactive prompts (for CI/CD) |
| --manifest <path> | Path to webflow.json (default: ./webflow.json) |
| --skip-update-check | Skip checking for package updates |
| --verbose | Show detailed output |
License
MIT
