Webflow API CLI
A command-line interface tool for interacting with the Webflow API, making it easy to manage sites, collections, and CMS items from your terminal.
What is WFAPI?
WFAPI is a CLI tool designed to streamline your Webflow development workflow by providing direct access to Webflow’s Data API v2 from the command line. Whether you’re managing multiple sites, working with CMS content, or automating deployment workflows, wfapi makes it simple and efficient.
How it Supports Your Development Workflow
Find Site ID’s, Collection ID’s, and Item ID’s quickly:
wfapi sites
wfapi cms
wfapi itemsFilter quickly by name, slug, or recent items:
wfapi sites <partial-name-or-slug>
wfapi cms <partial-name-or-slug>
wfapi items <partial-name-or-slug> --recentSet context for your site and collection to avoid repetitive ID lookups:
wfapi use site <slug-or-id>
wfapi use collection <slug-or-id>See raw JSON output for easy parsing in scripts:
wfapi items <partial-name-or-slug> --rawHow to Use WFAPI
- Directly from the command line
- In unit-test and integration-test scripts
- In scripts and automation workflows
- Integrated into CI/CD pipelines
Key Features
- Multi-Environment Support. Switch seamlessly between development, staging, and production environments with visual environment badges.
- Context-Aware Operations Set and maintain site and collection context to avoid repetitive ID lookups.
- Flexible Authentication Multiple configuration options including global tokens, environment variables, and project-local config files.
- Filtering and Search Built-in filtering for sites and items, with options for recent content and raw JSON output.
- Modern CLI Experience Intuitive command structure with helpful error messages and color-coded output.
Quick Start
Install globally:
npm install -g @sygnal/wfapiConfigure your API token:
wfapi config set your_api_token_hereList your sites:
wfapi sitesThat’s it! You’re ready to start managing your Webflow sites from the command line.
Common Use Cases
Development Teams
- Manage multiple environments (dev, staging, prod)
- Share project-specific configurations via local
.wfapifiles - Quick context switching between sites and collections
Content Managers
- List and filter CMS items
- View recent content changes
- Export data in JSON format for processing
Automation Scripts
- Integrate with CI/CD pipelines
- Automate content audits
- Generate reports from CMS data
API Reference
This CLI uses the Webflow Data API v2 .
Next Steps
Ready to get started? Check out the Installation guide to set up wfapi, then explore the Configuration options to tailor it to your workflow.
Project Structure
webflow-api-cli/
├─ bin/
│ └─ wfapi.js # CLI entry point
├─ src/
│ ├─ commands/
│ │ ├─ sites.js # Sites command
│ │ ├─ cms.js # Collections listing
│ │ ├─ items.js # Items listing
│ │ ├─ use.js # Context commands
│ │ ├─ config.js # Config management
│ │ ├─ auth.js # OAuth authentication
│ │ └─ env.js # Environment switching
│ ├─ utils/
│ │ └─ env-display.js # Environment badge display
│ ├─ config.js # Config reader/writer
│ ├─ token-store.js # OAuth token storage
│ ├─ oauth.js # OAuth login flow
│ └─ webflow-client.js # Webflow API client
├─ .wfapi.example # Example config file
├─ package.json
└─ README.mdLicense
ISC