Back to blog

Introducing the Contentstack Command-line Interface (CLI) Beta

cli-beta-product-release.png

Published: Oct 15, 2020


At Contentstack, we are always looking for ways to make it simpler for developers to use our APIs. With that in mind, we recently introduced Contentstack command-line interface (CLI) Beta, a simple, seamless way to interact with Contentstack using the command line. With this release, developers can now perform common tasks and bulk actions with just a few keystrokes, without having to code.

Contentstack CLI - Supported Actions

In this Beta release, you can use the Contentstack CLI to perform the following operations, as long as you have the proper permissions:

  • Bulk publish and unpublish operations
  • Content migration operations

Bulk Publish and Unpublish Operations

Using the Contentstack CLI, you can perform bulk operations on entries and assets. By running a series of commands in the CLI, you can perform the following tasks:

  • Publish all entities and assets in bulk
  • Publish all draft entries in bulk
  • Publish entries and assets from one environment to another in bulk
  • Publish all entries of a content type in bulk after adding a new field
  • Publish entries in bulk after a non-localized field is updated
  • Restore or unpublish entries in bulk
  • Unpublish all published entries of a content type in bulk

It’s possible to achieve all of the above actions using our Bulk Publish utility. However, using the Contentstack CLI makes managing content changes and publishing in bulk easier and quicker.

Content Migration Operations

Along with bulk operations, the Contentstack CLI allows you to perform content migration operations from the console. By using specific commands, you can perform the following content migrations operations:

  • Export content: If you want to migrate content from one stack to another, you need to first export the content from the source stack. You can perform export operations using management and auth tokens.
  • Import content: After you export content from one stack, you can import the content into another. Again, you use management and auth tokens to perform these operations.

Setting Up the Contentstack CLI

Getting started with Contentstack CLI is easy. You need to first install the required npm module and run csdx help to get all commands. For installation information, read the CLI documentation.

Next, create a stack in your Contentstack account, or ask the admin to create one for you. Make sure you have either the Developer or Admin rights to the stack. You can use the stack’s management token or your auth token to authenticate.

Using the Contentstack CLI

Once authenticated, you can configure the CLI as per your requirements and start using the commands. Read the detailed instructions on using our CLI commands in our documentation.

Share on:

About Contentstack

The Contentstack team comprises highly skilled professionals specializing in product marketing, customer acquisition and retention, and digital marketing strategy. With extensive experience holding senior positions at renowned technology companies across Fortune 500, mid-size, and start-up sectors, our team offers impactful solutions based on diverse backgrounds and extensive industry knowledge.

Contentstack is on a mission to deliver the world’s best digital experiences through a fusion of cutting-edge content management, customer data, personalization, and AI technology. Iconic brands, such as AirFrance KLM, ASICS, Burberry, Mattel, Mitsubishi, and Walmart, depend on the platform to rise above the noise in today's crowded digital markets and gain their competitive edge.

In January 2025, Contentstack proudly secured its first-ever position as a Visionary in the 2025 Gartner® Magic Quadrant™ for Digital Experience Platforms (DXP). Further solidifying its prominent standing, Contentstack was recognized as a Leader in the Forrester Research, Inc. March 2025 report, “The Forrester Wave™: Content Management Systems (CMS), Q1 2025.” Contentstack was the only pure headless provider named as a Leader in the report, which evaluated 13 top CMS providers on 19 criteria for current offering and strategy.

Follow Contentstack on LinkedIn.

cli-beta-product-release.png

Published: Oct 15, 2020


Background.png