> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Configuration of the Contentful CLI

> These commands will help you manage your local CLI configurations | List | Add | Remove | Next steps to managing your Contentful CLI

## Requirements

* A (free) [Contentful account](https://www.contentful.com/sign-up/)
* Locally [installed](/tutorials/cli/installation) `contentful-cli`

## General

Your added config parameters are stored in a `.contentfulrc.json` file in your home directory (`~/.contentfulrc.json`). The values in this map are used for every command.

The CLI will try to find other `.contentfulrc.json` files upstream. You can create a `.contentfulrc.json` file in your current directory to use other stored values for your projects.

## Config list

Display a table with all currently used values.

```bash
contentful config list
```

*The output should look similar to this:*

```bash
┌───────────────────────────────────────────┐
│ ⚙  activeEnvironmentId: master           │
│ ⚙  host: api.contentful.com              │
└───────────────────────────────────────────┘
```

## Config add

Add a value to the config file.

```bash
contentful config add --management-token <management-token>
```

*The output should look similar to this:*

```bash
✨  config added successfully
```

Display a list of all flags/values you can add to the config file.

```bash
contentful config add --help
```

*The output should look similar to this:*

```bash
Usage: contentful config add [options]

Options:
  -h, --help                     Show help                             [boolean]
  --management-token, --mt       Contentful management API token
  --active-space-id, --as        active space id
  --active-environment-id, --ae  active environment id
  --host, --ho                   management host
  --proxy, -p                    Proxy configuration in HTTP auth format:
                                 host:port or user:password@host:port   [string]
  --raw-proxy, --rp              Pass proxy config as raw config instead of
                                 creating a httpsAgent                 [boolean]
  --config                       set all the config options at once
```

## Config remove

Remove a value from the config map.

```bash
contentful config remove --management-token
```

*The output should look similar to this:*

```bash
✨  config removed successfully
```

## Next steps

* [Manage spaces with the Contentful CLI](/tutorials/cli/space-management)
* [Manage environments with the Contentful CLI](/tutorials/cli/environment-management/)
* [Manage extensions with the Contentful CLI](/tutorials/cli/extension-management)
* [Check out the documentation in the GitHub repository](https://github.com/contentful/contentful-cli/tree/master/docs/)