Hi 👋🏽 and welcome to Kubb!
My name is Stijn Van Hulle, the creator of Kubb and I'm super excited to have you here! Let me give you a quick introduction to Kubb and what it can do for your project.
💡 What is Kubb
Kubb is a library and toolkit that converts your Swagger/OpenAPI specification to one of the generated client libraries (TypeScript, React-Query, Zod, Zodios, Faker.js and Axios).
Imagine that your backend team is writing an API in Java/Kotlin, how do you connect your frontend to their system without the need of communicating on every API change. This is not a new problem and has already been resolved with the use of a Swagger/OpenAPI specification combined with a code generator.
The problem is that most of them are good at one thing: generating TypeScript types or generating React-Query hooks. Kubb is trying to resolve that with a plugin system where we already provide you with some generation plugins but also giving you the possibilty to create your own custom plugin without the need of forking the full project.
Kubb has the following features:
- Easy to Configure: One of the goals of Kubb is to provide out-of-the-box plugins and utils for converting your Swagger/OpenAPI file to generated code.
You want to use a Swagger/OpenAPI file or URL, you want to split up the generated code based on a tag in the file, you want to use multiple Swagger/OpenAPI files, we have you covered!
- Generate SDK's: Convert your Swagger/OpenAPI file to TypeScript, React-Query, Zod, Zodios, Faker.js, MSW and Axios.
- Templates: Override/change the generated output of a plugin with the help of JSX templates(React).
- Plugin Ecosystem: Kubb has a plugin system that makes it possible to change or add functionalities based on your needs.
- CLI: See in real-time what is getting generated or processed.
- And so much more ...
Come and chat with us on Discord! We're always looking for some contributions.
See kubb.config.js on how to configure Kubb.