Space management with the Contentful CLI
These commands will help you manage spaces in Contentful.
Requirements
- A (free) Contentful account
- Locally installed
contentful-cli - Authenticated with
contentful-cli
List available commands and their description
Create a space
To create a new space, supply the name. The --organization option is available for power users.
The output should look similar to this:
Get a list of all available spaces
You can list all of the spaces you have access to. The current active space selected via the
contentful space use command is highlighted.
The output should look similar to this:
Set a space-id to use it in all subsequent commands
Many commands have a --space-id option since they manipulate something related to a space. Since it is unintuitive to pass the space ID every time, you can use the space use command to lock your CLI to a specific Space. Until you use another space or pass a different --space-id to a subsequent command, this space will be your default.
The output should look similar to this:
Delete a space in your current account
Delete a space.
The output should look similar to this: