| name | fit-codegen |
| description | Generate JavaScript types, service base classes, typed clients, gRPC definitions, and MCP field metadata from proto contracts, or download a pre-generated bundle. Use when a proto definition changed and the generated code must be regenerated to match, when setting up a gRPC product for the first time, or when a runtime image needs to fetch the generated bundle.
|
Generate Code from Proto Definitions
fit-codegen reads the shared proto contracts and emits the generated code that
keeps JavaScript types, service endpoints, and MCP tools in sync with a single
source of truth. Every generated file carries a @generated by fit-codegen
header — do not edit generated files; change the proto and regenerate. Two
subcommands: generate produces the code, and download fetches a
pre-generated bundle for a runtime that does not build.
When to Use
- Regenerate everything after a proto change —
fit-codegen generate --all
- Generate one artifact kind —
--type, --service, --client,
--definition, --metadata
- Bootstrap a gRPC product for the first time
- Fetch the generated bundle at container startup —
fit-codegen download
Usage
fit-codegen generate --all
fit-codegen generate --type
fit-codegen generate --service
fit-codegen generate --client
fit-codegen generate --definition
fit-codegen generate --metadata
fit-codegen download
fit-codegen download -- <command>
Combine flags to generate a subset: fit-codegen generate --type --client
generates types and clients only. generate needs the proto-compiler
toolchain, which ships with a default install; download is lean and carries
none of it.
Documentation