Output Structure
Typeweaver generates a folder of artifacts, not just one SDK file. The exact output depends on the plugins you enable, but the structure stays predictable enough that you can quickly find what you need.
A typical generated folder
api/generated/
├── index.ts
├── todo/
│ ├── GetTodoRequest.ts
│ ├── GetTodoRequestCommand.ts
│ ├── GetTodoRequestValidator.ts
│ ├── GetTodoResponse.ts
│ ├── GetTodoResponseValidator.ts
│ ├── TodoClient.ts
│ └── TodoRouter.ts
├── responses/
│ ├── GetTodoSuccessResponse.ts
│ └── TodoNotFoundErrorResponse.ts
└── lib/
├── clients/
├── server/
└── types/
You may also see plugin-specific output such as TodoHono.ts when you enable the hono plugin.
How to think about the folders
Resource folders
Folders like todo/ contain the operation-specific files you touch most often.
That usually includes:
- request types
- request commands
- request validators
- response unions
- response validators
- resource clients
- resource server artifacts
If you are working on GetTodo, this is usually the first folder to open.
Shared responses
The responses/ folder contains named response artifacts that can be reused across operations.
This is where response-specific types and factory functions usually live, such as:
IGetTodoSuccessResponseITodoNotFoundErrorResponsecreateGetTodoSuccessResponse(...)
Think of this folder as the shared catalog of concrete response shapes.
lib helpers
The lib/ folder contains runtime helpers that generated files build on top of.
You usually do not read every file in lib/, but it is useful to know what lives there:
lib/clientssupports generated request commands and clientslib/serversupports the dependency-free server path, middleware helpers, and thenodeAdapterfor Node.jshttp.createServercompatibilitylib/typessupports validators and generated type-aware utilities
Most application code imports from the generated root or resource folders, not directly from deep internal files.
The files most users touch
In day-to-day usage, most teams mainly work with:
<ResourceName>Client<OperationId>RequestCommand<OperationId>Requestand<OperationId>Responsetypes- response factory functions such as
createGetTodoSuccessResponse(...) - generated server artifacts such as
<ResourceName>Routeror<ResourceName>Hono
You do not need to memorize the entire tree. Find the resource folder, then follow the operation name.
What changes when you enable different plugins
The base generated output already includes types and validators. Plugins add more runtime-facing artifacts on top.
clientsadds generated clients and request commandsserveradds dependency-free server routers and server helpershonoadds generated Hono routers
So the shape stays familiar even as the output grows.