Type Crafter

•
3
•

Generates programming language types from a YAML schema specification.

Type Crafter is a powerful CLI tool designed to generate types for any programming language from a single, flexible YAML specification. Heavily inspired by OpenAPI Generator, it provides a more adaptable approach to type generation. It also includes an MCP (Model Context Protocol) server to integrate with AI assistants, guiding them in writing accurate YAML specifications through session-based workflows, educational error messages, and common mistake detection, thereby streamlining the development process.

Key Features

012 GitHub stars
02Generate types for any language from a YAML specification
03Command-Line Interface (CLI) for easy integration into workflows
04Supports TypeScript and TypeScript with Decoders (runtime validation)
05Includes an MCP Server for AI assistant integration with validation and guidance tools
06Extensible architecture allows adding support for new languages via Handlebars templates

Use Cases

01Automating the creation of consistent type definitions across multiple programming languages from a central YAML source.
02Streamlining API contract development by generating types from a shared schema.
03Assisting AI models in authoring and validating complex YAML type specifications.