TELUS Contentful CLI
Generate Management API Token
- Go to https://www.contentful.com/developers/docs/references/authentication/#the-content-management-api
- Login to retrieve token
To install
$> npm i @telusdigital/contentful-cli -g
Available Commands
Usage:
List available spaces
contentful-cli list-spaces --access-token XXXXXXXXXXXXXXXX
Create contentful space
contentful-cli create-space --space-name "Name of the space" --access-token XXXXXXXXXXXXXXXX
Delete space
contentful-cli delete-space --space-id ID_OF_SPACE --access-token XXXXXXXXXXXXXXXX
List locales
contentful-cli list-locales --space-id ID_OF_SPACE --access-token XXXXXXXXXXXXXXXX
Add locales
contentful-cli add-locales --space-id ID_OF_SPACE --access-token XXXXXXXXXXXXXXXX
Delete locale
contentful-cli delete-locale --space-id ID_OF_SPACE --access-token XXXXXXXXXXXXXXXX --locale-id ID_OF_LOCALE
Register legal UI extension
contentful-cli register-legal-extension --space-id ID_OF_SPACE --access-token XXXXXXXXXXXXXXXX
Register product UI extension
contentful-cli register-product-extension --space-id ID_OF_SPACE --access-token XXXXXXXXXXXXXXXX
List content types
contentful-cli list-content-types --space-id ID_OF_SPACE --access-token XXXXXXXXXXXXXXXX
Clone content type
contentful-cli clone-content-type --from-space-id FROM_SPACE_ID --to-space-id TO_SPACE_ID --access-token XXXXXXXXXXXXXXXX --content-type-id ID_OF_CONTENT_TYPE_TO_CLONE
Sync content types
contentful-cli sync-content-types --from-space-id FROM_SPACE_ID --to-space-id TO_SPACE_ID --access-token XXXXXXXXXXXXXXXX
Sync content
contentful-cli sync-content --from-space-id FROM_SPACE_ID --to-space-id TO_SPACE_ID --access-token XXXXXXXXXXXXXXXX