Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s5no5t/contentful-clean-space
Delete all entries and content types from a contentful space
https://github.com/s5no5t/contentful-clean-space
contentful
Last synced: 4 months ago
JSON representation
Delete all entries and content types from a contentful space
- Host: GitHub
- URL: https://github.com/s5no5t/contentful-clean-space
- Owner: s5no5t
- License: mit
- Created: 2018-01-08T15:01:14.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-10T10:23:43.000Z (about 1 year ago)
- Last Synced: 2024-10-10T21:40:16.078Z (4 months ago)
- Topics: contentful
- Language: TypeScript
- Homepage:
- Size: 203 KB
- Stars: 55
- Watchers: 2
- Forks: 16
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# contentful-clean-space
Delete all entries from a contentful space.
[Contentful CLI](https://github.com/contentful/contentful-cli) doesn't have a command to delete all entries from a space without deleting the space itself. However, this can be very useful, e.g. for user contract testing.
## Installation
Using npm:
```
npm install -g contentful-clean-space
```## Usage
```
contentful-clean-space
Options:
--help Show help [boolean]
--space-id Contentful space id [string] [required]
--env Contentful environment [string] [required]
--accesstoken Contentful access token [string] [required]
--batch-size Number of parallel contentful requests
[number] [default: 5]
--content-types Delete content types as well [boolean] [default: false]
--assets Delete assets as well [boolean] [default: false]
-y, --yes Auto-confirm delete prompt [boolean] [default: false]
-v, --verbose [boolean] [default: false]
```All parameters can be provided from environment variables, too. To do that, just set an environment variable using UPPER_CASE casing.
## Example Usage
To delete all entries, content types, as well as assets in the "master" environment, and without the safety prompt, use `contentful-clean-space --space-id [space id] --accesstoken [personal access token] --content-types=true --assets=true --env master --yes=true`