skmtc generates typed clients, Zod schemas, TanStack Query hooks, forms and mocks straight from your API schema — following your naming and file conventions, regenerable every time the API changes.
curl -fsSL https://skm.tc/install | shThe CLI runs on Deno; the generated code drops into your ordinary npm, Vite or Next.js project. Also on JSR and GitHub.
One operation from a schema becomes a validated model and a ready-to-use hook.
paths:
/pets/{id}:
get:
operationId: getPet
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
components:
schemas:
Pet:
type: object
required: [id, name]
properties:
id: { type: integer }
name: { type: string }
tag: { type: string }export const pet = z.object({
id: z.number().int(),
name: z.string(),
tag: z.string().optional()
})
export type Pet = z.infer<typeof pet>
export const useGetPet = ({ id }: GetPetArgs) =>
useQuery({
queryKey: ['pets', id],
queryFn: async () => {
const res = await fetch(`${baseUrl}/pets/${id}`)
return pet.parse(await res.json())
}
})Illustrative output from gen-zod + gen-tanstack-query-fetch-zod. Every generator is string-template based — no ASTs — so the output reads like handwritten code.
Install the CLI, scaffold a project, add generators, generate.
Install the CLI
curl -fsSL https://skm.tc/install | shScaffold a project and choose where generated code lands in your app
skmtc init petstore src/generatedAdd generators from the registry
skmtc install @skmtc/gen-zod petstorePoint it at your OpenAPI schema — a URL or a local file
skmtc generate petstore https://petstore3.swagger.io/api/v3/openapi.jsonCodegen tools earn trust by answering these up front.
curl -fsSL https://skm.tc/install | sh