installation
Install Duck Gen and generate your first types.
Prerequisites
- Node 22 or newer.
- A TypeScript project with a valid
tsconfig.json. - NestJS (the only supported framework today).
Install the package
pnpm add -D @gentleduck/genpnpm add -D @gentleduck/genCreate duck-gen.toml
duck-gen.toml
framework = "nestjs"
[extensions.shared]
sourceGlobs = ["src/**/*.ts", "src/**/*.tsx"]
tsconfigPath = "./tsconfig.json"
includeNodeModules = false
[extensions.apiRoutes]
enabled = true
globalPrefix = "/api"
normalizeAnyToUnknown = true
[extensions.messages]
enabled = trueduck-gen.toml
framework = "nestjs"
[extensions.shared]
sourceGlobs = ["src/**/*.ts", "src/**/*.tsx"]
tsconfigPath = "./tsconfig.json"
includeNodeModules = false
[extensions.apiRoutes]
enabled = true
globalPrefix = "/api"
normalizeAnyToUnknown = true
[extensions.messages]
enabled = trueRun the generator
pnpm exec duck-genpnpm exec duck-genRead the core guide
Head to Duck Gen core for configuration details, output paths, and troubleshooting.