Skip to Content

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 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
  • From LLM’s like Claude Code, Codex, Copilot and Gemini

How it Supports Your Development Workflow

WFAPI has two distinct user interfaces;

  1. Interactive CLI - This is the primary interface for most users. You interactively “drill down” into the data you want using the CLI and setting context as you go with the use command.

  2. Programmatic CLI - This is the secondary interface for more advanced users. It provides a context-free way to interact with the Webflow API from the command line, by specifying every aspect of the request.

Interactive CLI

The interactive CLI depends on context to keep track of what objects you’re working with and to support your requests. For example, to see the most recent blog articles in your site, you might perform a sequence of commands like this;

wfapi sites # List all sites wfapi use site my-site # Set site context to my-site wfapi cms # List all collections for my-site wfapi use cms blog # Set cms context to blog wfapi items --recent # List all items for my-collection

At any point, you can determine what the current context is by typing wfapi or wfapi use.

WFAPI currently works with three Webflow object types: sites, collections and items. In each, you can list all items by specifying the object type.

wfapi sites wfapi cms wfapi items

In each, you can list items by entering a partial name or slug.

wfapi sites <partial-name-or-slug> wfapi cms <partial-name-or-slug> wfapi items <partial-name-or-slug>

e.g. wfapi sites sygnal would show all sites in your workspace which have “sygnal” in the name or shortname.

Set context for your site and collection by specifying the exact slug or ID:

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> --raw

Programmatic CLI

This is more oriented towards scripts, unit tests, and LLM’s; it provides a more programmatic way to interact with the Webflow API from the command line. It works by skipping context and specifying everything on the command line via options.

wfapi items --sites my-site --cms my-collection

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/wfapi

Configure your API token:

wfapi config set your_api_token_here

List your sites:

wfapi sites

That’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 .wfapi files
  • 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.

License

ISC

Last updated on