Content Hub command line interface (CLI)

The Content Hub command line interface (CLI) is a versatile tool that allows you to efficiently manage content and media within a Sitecore Content Hub instance, directly from the command line. It leverages the Web Client SDK to communicate with your Content Hub instances via the REST API. With the CLI, you can:

  • Serialize and deserialize content, for a seamless transfer of data between different Content Hub instances.

  • Automate Content Hub processes.

  • Integrate with external platforms and systems.

The Content Hub CLI is compatible with various operating systems, including Linux, Windows, and macOS, meaning you can use it with confidence, regardless of your system.

Note

Content Hub provides scripts, triggers, APIs, SDKs, and connectors that you can use to integrate with external platforms, and a package import/export feature for migrating structural changes.

Configurations

All CLI-related configurations are stored in the .ch-cli subdirectory of the current user's directory at the path specified in the following table, depending on the operating system.

Operating system

Path

Windows

%USERPROFILE%\.ch-cli

Linux/macOS

$HOME/.ch-cli

Docker

<your volume>

After you've Installed the CLI, you can log into it using your client credentials.

Note

For the best developer experience, we recommend you use the Visual Studio Code editor.

Do you have some feedback for us?

If you have suggestions for improving this article,