Automatically generates TypeScript interfaces from REST API responses with Storybook-style documentation UI.
- Type Extraction: Recursively parses API responses to extract object structures, array types, unions, primitives, and nested hierarchies
- Code Generation: Produces well-formatted, linted TypeScript interfaces with proper typing, readonly modifiers, and index signatures where appropriate
- Storybook UI: Generates interactive documentation that visualizes type structures, shows examples, and provides searchable exploration
- CLI Interface: Command-line tool for direct usage, scripting, and agent integration
- Error-Free Output: Validates generated code syntax and ensures TypeScript compiler compatibility
- Template System: Customizable templates for interfaces and Storybook components
- Multi-Endpoint Support: Process multiple API responses and merge or separate interfaces as needed
typescript: TypeScript compiler API for validationcommanderoryargs: CLI frameworkprettier: Code formattingjson-schema-to-typescript(optional): For schema-based generationreact&@storybook/react: Storybook UI componentsjsonschemaorfast-xml-parser: XML support
The skill respects configuration files:
.apitotsrc.json: Project-level settings (output paths, template variants)types.jsonin project root: Custom type overrides
Common options:
{
"output": "src/types/",
"mergeInterfaces": true,
"storybook": true,
"format": "prettier",
"template": "default"
}Source code: github.com/NeoSkillFactory/api-to-ts-interface
MIT © NeoSkillFactory