AI-assisted NestJS SDK generation from OpenAPI specs
npx claudepluginhub romtaugranot/nest-forgeAI-assisted NestJS SDK generation from OpenAPI specs using nest-forge-sdk. Guides you through spec discovery, SDK generation, and module wiring.
Generate fully-structured NestJS client SDK modules from OpenAPI specs (JSON or YAML). Point it at a spec, get a production-ready NestJS module with typed service, Zod validation, injectable routes, and dynamic module configuration.
Built on top of orval with a custom NestJS builder and post-processing pipeline.
nest-forge ships as a Claude Code plugin with an SDK generator skill that walks you through the entire workflow -- from finding an OpenAPI spec to wiring the generated module into your app.
# Add the marketplace
claude plugin marketplace add romtaugranot/nest-forge
# Install the plugin
claude plugin install nest-forge-sdk
Once installed, Claude Code will automatically suggest using nest-forge-sdk when you're integrating with an external API or mention OpenAPI specs. You can also invoke the skill directly:
/nestjs-sdk-generator
nest-forge-sdk and peer dependenciesConfigModule, environment variables, etc.)forRoot / forRootAsync dynamic configurationsafeParse--tags or --exclude-tagsschemas/, types/, exceptions/, interfaces/, data/, utils/operationId is missingSessionController_createSession becomes createSession)HttpException with proper Axios error wrapping@nestjs/common, axios, and zodnpm install -D nest-forge-sdk
The generated code requires these peer dependencies in your project:
npm install @nestjs/common axios zod
# Minimal -- output goes to current directory
npx nest-forge-sdk ./openapi.json
# YAML support
npx nest-forge-sdk ./openapi.yaml
# Specify output directory
npx nest-forge-sdk --input ./openapi.yml --output ./libs
# Generate only specific tags
npx nest-forge-sdk ./openapi.yaml --tags endpoint,user
# Exclude specific tags
npx nest-forge-sdk ./openapi.yaml --exclude-tags admin,internal
import { generate } from 'nest-forge-sdk';
await generate({
input: './openapi.json', // JSON and YAML both supported
outputDir: './libs',
tags: ['endpoint', 'user'], // optional: include only these tags
});
Given an OpenAPI spec with info.title: "user-service", nest-forge produces: