TELUS Contentful CLI
A command line tool designed to help with common content operations in TELUS Contentful spaces.
It is a shell of three useful contentful packages:
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
Export content
contentful-cli export-content --from-space-id FROM_SPACE_ID --access-token XXXXXXXXXXXXXXXX
Import content
contentful-cli import-content --to-space-id TO_SPACE_ID --access-token XXXXXXXXXXXXXXXX --content-file ./content-12345.json --skip-content-publishing true
Note: By default, skip-content-publishing is set to false
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 --skip-content-publishing true
Note: By default, skip-content-publishing is set to false
Publish content
contentful-cli publish-content --space-id YOUR_SPACE_ID --entry-id ENTRY_ID --access-token XXXXXXXXXXXXXXXX