litestar-vite-typegen

Generate TypeScript types from Litestar routes and OpenAPI schemas.

15|4|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/cofin/flow --skill litestar-vite-typegen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: litestar-vite-typegen
Source: https://github.com/cofin/flow/tree/main/skills/litestar-vite-typegen
Command: npx skills add https://github.com/cofin/flow --skill litestar-vite-typegen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill bridges the gap between your Litestar backend and Vite frontend by automatically generating TypeScript types from your Python code, ensuring type safety and reducing manual synchronization errors.

Core Features & Use Cases

  • Type Generation: Automatically generate TypeScript types for routes, OpenAPI schemas, and Inertia page props.
  • SDK Generation: Create a type-safe client SDK for your backend API.
  • Use Case: When you define a new API endpoint in Litestar, use this Skill to automatically generate the corresponding TypeScript types and a client function in your frontend, keeping your frontend code in sync with your backend API.

Quick Start

Enable type generation in your Litestar ViteConfig and run the litestar assets generate-types command.

Frequently Asked Questions about litestar-vite-typegen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate TypeScript types from a Litestar backend for my Vite frontend?

Generate TypeScript types by enabling type generation in your Litestar ViteConfig and running the litestar assets generate-types command. This exports routes, OpenAPI specifications, and schemas into consumable TypeScript artifacts.

What is the best way to sync backend Python types with a Vite frontend?

Syncing backend Python types with a Vite frontend is best handled by automatic TypeScript type generation. This process extracts backend schemas and routes, ensuring type consistency and reducing manual synchronization errors across your project.

Does this type generation approach work with Inertia.js in a Litestar project?

Yes, this type generation method works with Inertia.js in a Litestar project. It automatically generates TypeScript types for Inertia page props, which is essential for maintaining type safety between your backend and frontend.

When do I need to regenerate TypeScript types after changing my Litestar API?

You need to regenerate TypeScript types whenever you define a new API endpoint or modify existing schemas in Litestar. Running the generation command updates the corresponding TypeScript types and client functions in your frontend.

What types of frontend artifacts are exported from Litestar for Vite?

The frontend artifacts exported from Litestar include TypeScript types for routes, OpenAPI schemas, and Inertia page props. These consumable TypeScript artifacts facilitate backend-to-frontend synchronization.