GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • KubbDOCS
  • Docs
  • Extensions
  • Sponsor
  • Open Studio
  • Explanation
  • Reference
  • Migration
  • AI
  • Plugins
  • Adapters
  • Parsers
  • Registry
  • Ecosystem

This view

  • Original page
  • New address

GeezerVison is showing kubb.dev — Kubb · Turn your API spec into type-safe code

LAUNCHING NOV 5

Kubb Studio goes live in--d--h--m--s

Kubb 5.x · API spec to code 10.5M yearly downloads

Turn your API spec into type-safe code.

Kubb is an open source code generator. Point it at your API spec, such as OpenAPI, and get TypeScript types, fetch or axios clients, TanStack Query and SWR hooks, Zod schemas and MSW mocks, always in sync with your API.
Get started
$npx kubb initnpx kubb init
  • Open source, MIT licensed
  • OpenAPI 2.0, 3.0, 3.1 and 3.2
  • Runs anywhere Node runs
openapi.yaml42 paths · 18 schemas
npx kubb generate
$ npx kubb generate◆ Generation started
src/gen/hooks/useGetPet.ts
export function getPetQueryOptions(
  { path }: GetPetOptions,
) {
  return queryOptions({
    queryKey: getPetQueryKey({ path }),
    queryFn: ({ signal }) =>
      getPet({ path, signal }).unwrap(),
  })
}
export function getPet(
  options: Options<GetPetOptions>,
) {
  return withUnwrap(client({
    method: 'GET',
    url: '/pet/{petId}',
    ...options,
  }))
}
export type Pet = {
  id: number
  name: string
  status?: PetStatusEnumKey
}

Generates code for

  • TypeScript
  • Zod
  • TanStack Query
  • Axios
  • SWR
  • MSW
  • Faker
  • Cypress
  • MCP
How it works

From spec to code in three steps

Every Kubb run follows the same pipeline, so adding a plugin never changes how the others behave.
01 · Adapt
An adapter parses your spec into one shared AST, so every plugin reads the same model.
02 · Generate
Plugins turn that AST into types, clients, hooks, validators and mocks. Pick the ones your stack needs.
03 · Print
Parsers write the result as TypeScript or Markdown files, with barrel files and formatting handled.
See it in action

One API spec, typed code for every layer

Switch tabs to see the TypeScript types, React Query hooks and Zod schemas Kubb generates from one API spec.
petstore.yaml
openapi: 3.0.0
info:
  title: Pet Store API
  version: 1.0.0
paths:
  /pets:
    get:
      operationId: getPets
      summary: List all pets
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: A list of pets
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pet'
components:
  schemas:
    Pet:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
        name:
          type: string
        status:
          type: string
          enum: [available, pending, sold]
Ecosystem

Adapters, plugins and parsers

Mix and match what your stack needs: types, clients, hooks, validators and mocks.
Plugins
15 official plugins for TypeScript, Zod, TanStack Query, MSW and more.
Adapters
1 adapter that reads OpenAPI 2.0, 3.0, 3.1 and 3.2 into the Kubb AST.
Parsers
2 parsers that print generated code as TypeScript or Markdown.
Downloads

Downloaded from npm every day

Download counts for @kubb/core, taken from the npm registry.

Kubb

@kubb/core

npm

10.5M10.5M10.5M

Total downloads (year)

575.5K+575.5K+575.5K+

Weekly

By the numbers

Built in the open

1843+1843+1843+
GitHub stars
105+105+105+
Contributors
15+15+15+
Official plugins
10.5M10.5M10.5M
Yearly downloads

Review every generated change in Kubb Studio.

Connect the Kubb CLI or a Docker agent, generate from the browser and diff the output before it reaches your repository. Code stays on machines you control unless you allow Studio to read it.
Open Kubb StudioRead the Studio guide
Sponsors

Keep Kubb free and independent

Kubb is MIT licensed and maintained in the open. Sponsorships pay for maintenance, releases and new plugins, and your logo reaches every developer who reads these docs.
Sponsor on GitHubOpen CollectiveAll sponsors
🥇Gold Sponsor
Bug and feature prioritization for Kubb.
$500
 /month
  • A free Kubb Studio Pro subscription.
  • Bug prioritization for Kubb.
  • Feature prioritization for Kubb.
  • Your avatar will be visible as Gold on all major projects.
  • Your avatar will be visible as Gold on the home page of kubb.
Sponsor as Gold
🥈Silver Sponsor
Visibility on all major Kubb projects.
$250
 /month
  • A free Kubb Studio Pro subscription.
  • Your avatar will be visible as Silver on all major projects.
  • Your avatar will be visible as Silver on the home page of kubb.
Sponsor as Silver
🥉Bronze Sponsor
You are serious about supporting Kubb!
$100
 /month
  • A free Kubb Studio Pro subscription.
  • Your avatar will be visible as Bronze on my major projects.
  • Your avatar will be visible as Bronze on the home page of kubb.
Sponsor as Bronze
🥉 Bronze Sponsors 2
CodeRabbit

CodeRabbit

@coderabbitai

Claude

Claude

@anthropics

💜 Backers 3
ZendrMatt SutkowskiVolodymyr Kushnir

Generate your first client in minutes.

Run npx kubb init, point it at your API spec and get type-safe code.
Get startedJoin DiscordSponsor Kubb
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.