---
title: "Content Hub CLI"
slug: "content-hub-cli"
abstract: "An introduction to the command line interface (CLI) for Content Hub, including configuration information and links to related procedures."
---
# Content Hub 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](https://doc.sitecore.com/ch/en/developers/cloud-dev/web-client-sdk.html "Web Client SDK") to communicate with your Content Hub instances via the [REST API](https://doc.sitecore.com/ch/en/developers/cloud-dev/rest-apis.html "REST APIs"). 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. Content Hub provides [scripts](https://doc.sitecore.com/ch/en/developers/cloud-dev/scripts.html "Scripts"), triggers, APIs, SDKs, and connectors that you can use to integrate with external platforms.

> [!note]
> The Content Hub CLI is well-suited for deployment automation, package import and export, and serializing or deserializing configuration and content across environments. It can also be integrated into CI/CD pipelines to automate deployment, configuration management, and environment synchronization. See [Namespace Sitecore.CH.Cli.Plugin.System.Commands](https://doc.sitecore.com/ch/en/developers/api-reference/cli--sitecore.ch.cli.plugin.system.commands.html).

> [!important]
> We recommend you avoid using the CLI for for migrating structural changes. Pages and components must be created in a specific order, which is hard to manage via CLI, and some updates require elevated rights that CLI does not support. Use the [package import/export feature](https://doc.sitecore.com/ch/en/users/content-hub/en/importing-and-exporting-packages.html) instead.

## 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](https://doc.sitecore.com/ch/en/developers/cloud-dev/install-the-content-hub-cli.html "Install the Content Hub CLI"), you can [log into it](https://doc.sitecore.com/ch/en/developers/cloud-dev/log-in-with-the-content-hub-cli.html "Log in with the Content Hub CLI") using your client credentials and [use it for deployment automation](https://doc.sitecore.com/ch/en/developers/cloud-dev/use-ch-cli-for-deployments.html).

> [!note]
> For the best developer experience, we recommend you use the Visual Studio Code editor.