{"repo":"contentful-userland/cf-content-types-generator","free":true,"listed":false,"github":"https://github.com/contentful-userland/cf-content-types-generator","clone":"git clone https://github.com/contentful-userland/cf-content-types-generator.git","description":"Generate TS declarations for content types","language":"TypeScript","stars":142,"topics":["type-tool","typescript","contentful","cli","builder","generator"],"license":"MIT","category":"cli-tools","readme_excerpt":"cf-content-types-generator Generate TypeScript types from your Contentful content model, either from a local contentful space export JSON file or by fetching the model directly from Contentful. Use the generated types with contentful.js v10+ for safer queries, autocomplete, and less schema drift between Contentful and your app. As of v3.x, pre-v10 output is removed. If you are upgrading from 2.x , modern contentful.js typing is now the default and only output model. Install Quickstart In 60 Seconds You can generate types in two ways: - from a local export JSON file in the exact Input shape, usually created with contentful space export - by providing Contentful credentials and letting the CLI fetch the same model data on the fly Path A: Generate From A Local Export JSON File Export your space model: Generate types: Use the generated type: Path B: Generate By Fetching From Contentful If your network requires a proxy, you can also add --rawProxy to pass the proxy config straight to Axios. What It’s For - turn a Contentful content model into generated TypeScript types - use those generated types in apps built with contentful.js v10+ - optionally add JSDoc, type guards, and response aliases When To Use It - you keep Contentful schema in source control and want generated app types - you use contentful.js in TypeScript and want typed entries based on your real model - you want type generation in CI from either exports or live space data Further reading: if you want broader context o","default_branch":null,"files":null,"tree":[],"storefront":"/r/contentful-userland","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/contentful-userland/cf-content-types-generator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}