{"id":19554023,"url":"https://github.com/felixjung/contentful-utils","last_synced_at":"2025-07-16T11:08:53.640Z","repository":{"id":69345830,"uuid":"75976703","full_name":"felixjung/contentful-utils","owner":"felixjung","description":"A CLI tool helping you manage content types on Contentful.","archived":false,"fork":false,"pushed_at":"2017-05-14T16:24:31.000Z","size":86,"stargazers_count":10,"open_issues_count":12,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-04T18:03:34.222Z","etag":null,"topics":["cli","content-management","contentful","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felixjung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-08T21:30:18.000Z","updated_at":"2025-02-06T04:47:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d44acc1-316b-4be9-a2b8-c311c926408e","html_url":"https://github.com/felixjung/contentful-utils","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixjung%2Fcontentful-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixjung%2Fcontentful-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixjung%2Fcontentful-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felixjung%2Fcontentful-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felixjung","download_url":"https://codeload.github.com/felixjung/contentful-utils/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251057378,"owners_count":21529638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","content-management","contentful","nodejs"],"created_at":"2024-11-11T04:25:37.327Z","updated_at":"2025-04-26T21:31:31.253Z","avatar_url":"https://github.com/felixjung.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n\n\u003e  Command line tool to help you manage your Contentful spaces more efficiently.\n\n### Examples\n\n#### Copying fields\n\nOften times when working on your content model, you might want to create a field on one content type that should be configured exactly like on another content type. It should have the same required, localization, and validation configuration. Unfortunately, Contentful currently does not support copying fields between content types. Wouldn't it be super useful to have a *master* content type that contains pre-configured fields that you can just copy over to a new content type you're working on? Now you can.\n\n```bash\n\u003e contentful-utils copy-fields slug title \\\n  --source blogPost \\\n  --target page \\\n  --config ~/Desktop/contentful-config.json\n```\n\nThis will copy the fields `slug` and `title` from your content type `blogPost` to the content type `page`, using access credentials and other parameters stored inside `~/Desktop/contentful-config.json`.\n\n#### Deleting fields\n\nDeleting fields from a content type can be a bit tedious on Contentful. When doing this from the frontend, you have to first disable the field in the editor and in responses, save the content type, delete the field and save, again. This takes precious time, when during an exploratory phase you might not need to be this cautious. Now you can delete a field with just one command.\n\n```bash\n\u003e contentful-utils delete-fields slug \\\n  --target page \\\n  --config ~/Desktop/contentful-config.json\n```\n\nThis will copy the field `slug` from your content type `blogPost` to the content type `page`, using access credentials and other parameters stored inside `~/Desktop/contentful-config.json`.\n\n### Requirements\n\ncontentful-utils tracks NodeJS stable to benefit for the latest language features. Currently at v7.9.x\n\n### Installation\n\nInstall globally using npm.\n\n```npm install -g contentful-utils```\n\n### Options\n\ncontentful-utils have a bunch of global options, for example the `space`, as well as command specific options. All configuration flags can also be provided in a `config.json` passed to contentful-utils using the `—config` flag.\n\n#### Global options\n\n```bash\nUsage: contentful-utils \u003ccommand\u003e [options]\n\nCommands:\n  copy-fields \u003cfields..\u003e    Copies \u003cfields\u003e from --source Content\n                            Type to --target Content Type(s).\n  delete-fields \u003cfields..\u003e  Deletes \u003cfields\u003e from --target Content\n                            Type(s).\n\nOptions:\n  --version            Show version number                 [boolean]\n  --config             Configuration file with required values\n  --space              ID of the Space to operate on.\n                                                 [string] [required]\n  --management-token   Management API token for the space.\n                                                 [string] [required]\n  --pre-publish-delay  Delay in milliseconds to account for delay\n                       after creating entities, due to internal\n                       database indexing    [number] [default: 5000]\n  --host               Host for the Management API.         [string]\n  --port               Port for the Management API.         [string]\n  --insecure           If the Management API should use http instead\n                       of the default https.\n                                          [boolean] [default: false]\n  --proxy-host         hostname of the proxy server         [string]\n  --proxy-port         port of the proxy server             [string]\n```\n\n\n\n#### copy-fields options\n\n```bash\ncontentful-utils copy-fields \u003cfields..\u003e\n\nOptions:\n  --publish  Publish the Content Type(s) after adding fields.\n                                                           [boolean]\n```\n\n\n\n#### delete-fields options\n\n```bash\ncontentful-utils delete-fields \u003cfields..\u003e\n\nOptions:\n  --force    Force deletion of non-omitted fields.\n                                          [boolean] [default: false]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixjung%2Fcontentful-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelixjung%2Fcontentful-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelixjung%2Fcontentful-utils/lists"}