Hey API presents openapi-ts

Vite Plugin

Vite plugin for @hey-api/openapi-ts.

DevTrends badge for @hey-api/vite-plugin DevTrends badge for @hey-api/vite-plugin CI status GitHub stars MIT License

Manual  •  Issues  •  Contribute

## About [Vite](https://vite.dev) is a blazing fast frontend build tool powering the next generation of web applications. The Vite plugin integrates [`@hey-api/openapi-ts`](https://heyapi.dev/openapi-ts) into the Vite build pipeline, running automatically whenever Vite resolves its configuration – no separate script or manual step required. Part of the Hey API ecosystem. ## Features - runs automatically as part of your Vite build - reads your existing configuration (or accepts inline config) - works with any Vite-based project - [sync with Hey API Registry](https://heyapi.dev/openapi-ts/integrations) for spec management ## Contributing Want to see your code in products used by millions? Start with our [Contributing](https://heyapi.dev/openapi-ts/community/contributing) guide and release your first feature. ## Sponsors Hey API is sponsor-funded. If you rely on Hey API in production, consider becoming a [sponsor](https://github.com/sponsors/hey-api) to accelerate the roadmap.

Gold

Stainless logo
Best-in-class developer interfaces for your API.
stainless.com

Opencode logo
The open source coding agent.
opencode.ai

Silver

Scalar logo
scalar.com
FastAPI logo
fastapi.tiangolo.com

Bronze

Kinde logo Cella logo
## Installation You can download `@hey-api/vite-plugin` from npm using your favorite package manager. #### npm ```sh npm add @hey-api/vite-plugin -D -E ``` #### pnpm ```sh pnpm add @hey-api/vite-plugin -D -E ``` #### yarn ```sh yarn add @hey-api/vite-plugin -D -E ``` #### bun ```sh bun add @hey-api/vite-plugin -D -E ``` ## Usage Add the plugin to your `vite.config.ts`: ```ts import { heyApiPlugin } from '@hey-api/vite-plugin'; import { defineConfig } from 'vite'; export default defineConfig({ plugins: [heyApiPlugin()], }); ``` The plugin will automatically pick up your [configuration](https://heyapi.dev/openapi-ts/configuration) file. You can also pass options inline using the `config` option: ```ts import { heyApiPlugin } from '@hey-api/vite-plugin'; import { defineConfig } from 'vite'; export default defineConfig({ plugins: [ heyApiPlugin({ config: { input: 'hey-api/backend', // sign up at app.heyapi.dev output: 'src/client', }, }), ], }); ``` ## License Released under the [MIT License](https://github.com/hey-api/openapi-ts/blob/main/LICENSE.md).