home / http-apis / contentful-cli

Contentful CLI

Official · Contentful
352

Official Contentful CLI for spaces, environments, migrations, content imports and exports, and organization checks.

$npm install -g contentful-cli
Language
JavaScript
Stars
352
Category
HTTP & APIs
Agent
Ready
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis

Contentful CLI is Contentful's command line client for administering spaces and environments and for moving structured content between them. It also covers schema and migration work, organization-level exports and security checks, and a few onboarding or merge workflows.

What It Enables
  • Create, list, delete, and select spaces or environments, manage environment aliases and access tokens, and inspect content types from the shell.
  • Export space data to JSON, import exported content into another space, run migration scripts, seed templates, and generate migration files from existing spaces.
  • Export organization taxonomy data, run organization security checks, and compare two environments or export their diff as a migration.
Agent Fit
  • Useful as a direct CMS control surface for backup, migration, environment-management, and governance workflows because commands are explicit and scriptable once auth and context are set.
  • Machine-readable output exists for some high-value paths, but it is not consistent across the CLI: several inspect commands still render tables instead of offering a uniform --json mode.
  • Best in agent loops after bootstrap, since default login, init, and some space or environment selection flows open a browser or prompt interactively.
Caveats
  • Requires a Contentful Management API token, and the default login flow stores context in ~/.contentfulrc.json after browser-based authorization or token entry.
  • Coverage is not complete for every CMS admin task: export and import docs call out limits around memberships, roles, credentials, and some extension handling, and merge features depend on Contentful app actions.