# contentful-cli

> Contentful CLI tool

Latest version **4.0.10** (published 2026-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install contentful-cli
pnpm add contentful-cli
yarn add contentful-cli
bun add contentful-cli
```

Provides the command `contentful`.

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 4.0.10 |
| Published | 2026-09-03 |
| First published | 2017-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=22 |
| Dependencies | 41 |
| Unpacked size | 830.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 361 |
| Author | Contentful |
| Maintainers | contentful-ecosystem, phbschmidt |

## Links

- npm: https://www.npmjs.com/package/contentful-cli
- Repository: https://github.com/contentful/contentful-cli
- Homepage: https://github.com/contentful/contentful-cli#readme
- Issues: https://github.com/contentful/contentful-cli/issues
- npm.io page: https://npm.io/package/contentful-cli

## Dependencies (41)

- [tar](https://npm.io/package/tar.md) ^7.4.3
- [open](https://npm.io/package/open.md) ^8.4.2
- [path](https://npm.io/package/path.md) ^0.12.7
- [rxjs](https://npm.io/package/rxjs.md) ^7.3.0
- [boxen](https://npm.io/package/boxen.md) ^5.1.2
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [execa](https://npm.io/package/execa.md) ^5.0.0
- [listr](https://npm.io/package/listr.md) ^0.14.1
- [yargs](https://npm.io/package/yargs.md) ~13.3.2
- [emojic](https://npm.io/package/emojic.md) ^1.1.11
- [figlet](https://npm.io/package/figlet.md) ^1.2.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [marked](https://npm.io/package/marked.md) ^7.0.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^3.0.0
- [recast](https://npm.io/package/recast.md) ^0.24.0
- [to-ast](https://npm.io/package/to-ast.md) ^1.0.0
- [find-up](https://npm.io/package/find-up.md) ^5.0.0
- [p-queue](https://npm.io/package/p-queue.md) ^6.6.2
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.0
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.7
- [prettier](https://npm.io/package/prettier.md) ^2.0.2
- [ast-types](https://npm.io/package/ast-types.md) ^0.16.0
- [camelcase](https://npm.io/package/camelcase.md) ^6.0.0
- [papaparse](https://npm.io/package/papaparse.md) ^5.4.1
- [tree-kill](https://npm.io/package/tree-kill.md) ^1.2.2
- [wrap-ansi](https://npm.io/package/wrap-ansi.md) ^7.0.0
- [cli-table3](https://npm.io/package/cli-table3.md) ^0.6.0
- [typescript](https://npm.io/package/typescript.md) ^5.0.2
- [shell-escape](https://npm.io/package/shell-escape.md) ^0.2.0
- [cli-highlight](https://npm.io/package/cli-highlight.md) ^2.1.11
- [command-exists](https://npm.io/package/command-exists.md) ^1.2.7
- [contentful-export](https://npm.io/package/contentful-export.md) ^8.2.0
- [contentful-import](https://npm.io/package/contentful-import.md) ^10.1.2
- [https-proxy-agent](https://npm.io/package/https-proxy-agent.md) ^7.0.0
- [contentful-migration](https://npm.io/package/contentful-migration.md) ^5.0.0
- [contentful-batch-libs](https://npm.io/package/contentful-batch-libs.md) ^11.0.0
- [contentful-collection](https://npm.io/package/contentful-collection.md) ^0.0.4
- [contentful-management](https://npm.io/package/contentful-management.md) ^12.13.0
- [inquirer-select-directory](https://npm.io/package/inquirer-select-directory.md) ^1.2.0
- [@contentful/app-action-utils](https://npm.io/package/@contentful/app-action-utils.md) ^1.2.3
- [inquirer-autocomplete-prompt](https://npm.io/package/inquirer-autocomplete-prompt.md) ^2.0.0

## Recent versions

- 4.0.10 (latest) — 2026-09-03
- 4.0.7-exo.1 (exo) — 2026-08-11
- 3.11.0-DX-535-gha-publishing.1 (dev) — 2025-11-12
- 2.1.0-beta.1 (beta) — 2023-02-13
- 1.6.3-experimental.3 (experimental) — 2022-03-03
- 0.40.0-alpha (next) — 2019-08-28
- 4.0.9 — 2026-08-24
- 4.0.8 — 2026-08-18
- 4.0.7 — 2026-08-18
- 4.0.6 — 2026-08-02
- 4.0.5 — 2026-07-23
- 4.0.4 — 2026-07-07
- 4.0.3 — 2026-07-07
- 4.0.2 — 2026-06-05
- 4.0.1 — 2026-04-28
- … 856 more at https://npm.io/package/contentful-cli/versions

## README

# Contentful CLI

> [Contentful's](https://www.contentful.com) command line interface tool. Use Contentful features straight from your CLI.

[![npm](https://img.shields.io/npm/v/contentful-cli.svg)](https://www.npmjs.com/package/contentful-cli)
[![Contentful](https://circleci.com/gh/contentful/contentful-cli.svg?style=shield)](https://circleci.com/gh/contentful/contentful-cli)

[Contentful](https://www.contentful.com) provides a content infrastructure for digital teams to power content in websites, apps, and devices. Unlike a CMS, Contentful was built to integrate with the modern software stack. It offers a central hub for structured content, powerful management and delivery APIs, and a customizable web app that enable developers and content creators to ship digital products faster.

## :rocket: Features

- Get started with Contentful with the `init` command.
- Manage spaces - list, create, delete,...
- Export your space to a JSON file.
- Import your space from a JSON file.
- Execute migration scripts written in the [Contentful Migration DSL](https://github.com/contentful/contentful-migration/blob/main/README.md#reference-documentation)
- Generate migration scripts for the [Contentful Migration DSL](https://github.com/contentful/contentful-migration/blob/main/README.md#reference-documentation) from existing spaces.
- Seed your space with example data.
- Manage installation of [extensions](https://github.com/contentful/extensions) in a space.
- Securely login and logout with our [OAuth service](https://www.contentful.com/developers/docs/references/authentication/).
- Run organization security & configuration checks (security contact, audit logging, access tokens, SSO, MFA) with `contentful organization sec-check`.
- Find all available commands in the [docs section](https://github.com/contentful/contentful-cli/tree/main/docs).

## :cloud: Installation

Make sure you have [Node LTS](https://nodejs.org/en/) installed

Then using [npm](https://npmjs.org) or [yarn](https://yarnpkg.com):

```sh
npm install -g contentful-cli
# Or
yarn global add contentful-cli
```

Please note that for the non standalone versions you need Node LTS to use the CLI.

## :hand: Usage

Use the `--help` parameter to display the help section for CLI tool or combined with a specific command to get the help section for that command.

```sh
contentful --help
# Or
contentful space --help
```

## :books: Documentation

More detailed documentation for every command can be found in the [docs section](https://github.com/contentful/contentful-cli/tree/main/docs).

## Using the CLI tool with a proxy

You can save the proxy configuration in your `.contentfulrc.json` via:

```sh
contentful config add --proxy user:auth@host:port
```

We also respect the `http(s)_proxy` environment variables:

```sh
https_proxy=user:auth@host:port contentful
```

When multiple proxy configurations exists, precedence is taken in this form:

1. `http_proxy` takes precedence over `.contentfulrc.json`
2. `https_proxy` takes precedence over `.contentfulrc.json`
3. `https_proxy` takes precedence over `http_proxy`

## Configuring the CLI for EU usage

You can override the host configuration in your `.contentfulrc.json` via:

```sh
contentful config add --host api.eu.contentful.com --host-delivery cdn.eu.contentful.com
```

Then any subsequent command will use the EU hosts. E.g. `contentful login` will log you in to your EU Contentful instance.

## :rescue_worker_helmet: Troubleshooting

- Unable to connect to Contentful through your Proxy? Try settings `rawProxy: true` in your `.contentfulrc.json` via:

```sh
contentful config add --raw-proxy
```

## :hammer_and_wrench: Development

1. Install dependencies
   ```sh
   npm i
   ```
2. To avoid development version colliding with your already installed Contentful CLI, change the command name in `package.json`
   ```diff
     "bin": {
   -     "contentful": "bin/contentful.js"
   +     "ctfl": "bin/contentful.js"
     }
   ```
3. Link your local version, and happy hacking :tada:
   ```sh
   npm link
   ```



## :question: Support

If you have a problem with this tool, please file an [issue](https://github.com/contentful/contentful-cli/issues/new) here on Github.

If you have other problems with Contentful not related to this library, you can contact [Customer Support](https://support.contentful.com).

## :writing_hand: Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)

## :scroll: License

MIT

---
_Source: https://npm.io/package/contentful-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
