Was this page helpful?

Installing the Contentful CLI

This lists the various ways you can install the contentful-cli.

Local installation

Using homebrew:

brew install contentful-cli

Using npm:

npm install -g contentful-cli

Using yarn:

yarn global add contentful-cli

Please note that for the non-standalone versions you need node => v8 to use the CLI.

Use of cached version

Using npx:

npx contentful-cli <cmd>

Show help output using npx:

npx contentful-cli --help

Alternative installation methods

Standalone installation on MacOS and Linux:

  • Download the latest version of the executable for Mac OS/Linux from Github.
  • Add the download directory to path export PATH=$PATH:~/downloaddirectory.
  • You now have the Contentful CLI tool installed.

Standalone installation on Windows:

  • Download the latest version of the .exe for Windows from Github.
  • Add the executable to your Path:
    • Open the start menu and type "Edit environment variables"
    • Click "Edit environment variables for your account"
    • In the User variables box select the Path variable
    • Click "Edit..."
    • In the new dialog, click "New"
    • Add the location where you downloaded the .exe and click OK
    • Restart the system
  • The Contentful CLI tool is installed

Next steps

Not what you’re looking for? Try our FAQ.