Search for a command to run...
Transform your OpenAPI specifications into production-readyTypeScript code with TanStack Query, RTK Query, SWR, and more.
Works seamlessly with your favorite tools
Watch how easy it is to generate TypeScript code from your Swagger specs


Swagger to TanStack transforms your OpenAPI/Swagger specification into fully-typed, production-ready TypeScript code with your favorite data-fetching library
The CLI reads your OpenAPI/Swagger JSON or YAML file and parses all endpoints, schemas, and parameters into an intermediate representation.
TypeScript interfaces and types are generated from your Swagger schemas, including request/response types, path parameters, and query parameters.
Custom hooks are generated for each endpoint using your chosen template (TanStack Query, SWR, RTK Query) with full type safety and IntelliSense support.
Preserve custom code while updating from Swagger changes
Choose between split, group, or group-hooks file structures
Generate only the endpoints you need with tag inclusion/exclusion
Automatic detection and handling of multipart/form-data
Automatically regenerate code when Swagger files change
Clean URLs by removing common base paths automatically
Learn best practices, tips, and advanced techniques for API code generation
Install the CLI and generate your first TypeScript code in minutes
Read the Documentation