Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By workos Verified Orgv0.0.1MIT
Builds custom SDK generators from OpenAPI 3.x specs: scaffold a language emitter, extractor, or smoke test, then regenerate an SDK when the spec changes. Requires maintaining your own emitter code; not a turnkey generator.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
sdk-generator, code-generation, emitter, api-client, smoke-test, compatibility-check, codegen, sdk
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
oagen (oʊweɪdd͡ʒɛn) is a framework for building custom SDK generators from OpenAPI 3.x specifications.
Its core job is narrow:
More advanced workflows, such as preserving the public API of an existing SDK during a migration to generation, is also supported.
oagen is a fit if you:
oagen is probably not a fit if you:
oagen has a small core:
ApiSpec IRApiSpec -> GeneratedFile[]Advanced features such as API-surface extraction, compatibility overlays, smoke verification, and live-SDK integration are available, but they are optional. You can ignore them until you need them.
Install the package:
npm install @workos/oagen
Inspect a spec:
oagen parse --spec openapi.yml
Create an emitter project:
oagen init --lang ruby --project ./my-emitter
cd ./my-emitter
Generate files with your emitter:
npm run sdk:generate -- --spec ../openapi.yml --namespace MyService
For the shortest end-to-end setup, see Minimal Quickstart.
The default @workos/oagen entrypoint is intentionally focused on the framework core:
import {
defaultSdkBehavior,
mergeSdkBehavior,
diffSpecs,
generate,
generateFiles,
getEmitter,
parseSpec,
planOperation,
registerEmitter,
toCamelCase,
toPascalCase,
toSnakeCase,
} from "@workos/oagen";
import type {
ApiSpec,
SdkBehavior,
Emitter,
EmitterContext,
GeneratedFile,
Model,
Enum,
Service,
OperationPlan,
} from "@workos/oagen";
Advanced compat and verification APIs are available through explicit subpaths:
import {
buildOverlayLookup,
patchOverlay,
registerExtractor,
} from "@workos/oagen/compat";
import { runCompatCheck, runOverlayRetryLoop } from "@workos/oagen/verify";
Emitters are pure functions over the IR. They receive typed IR nodes and return GeneratedFile[].
import type { Emitter } from "@workos/oagen";
const myEmitter: Emitter = {
language: "go",
generateModels: (models, ctx) => [/* ... */],
generateEnums: (enums, ctx) => [/* ... */],
generateResources: (services, ctx) => [/* ... */],
generateClient: (spec, ctx) => [/* ... */],
generateErrors: () => [],
generateTests: () => [],
fileHeader: () => "// Auto-generated by oagen. Do not edit.",
};
Start with:
ApiSpec.sdk contains language-agnostic runtime policies — retry logic, error mapping, telemetry, pagination delays, User-Agent construction, and more. It is always populated (via defaultSdkBehavior() during parsing).
Emitters read policy from ctx.spec.sdk instead of hardcoding values:
function generateHttpClient(ctx: EmitterContext) {
const sdk = ctx.spec.sdk;
const retryCodes = sdk.retry.retryableStatusCodes; // [429, 500, 502, 503, 504]
const maxRetries = sdk.retry.maxRetries; // 3
const backoff = sdk.retry.backoff; // { initialDelay: 1, multiplier: 2, maxDelay: 30, jitterFactor: 0.5 }
// ...generate code using these values
}
Override defaults per-SDK via oagen.config.ts:
// oagen.config.ts — Python SDK overrides
export default {
sdkBehavior: {
retry: { backoff: { initialDelay: 0.5, maxDelay: 8.0 } },
timeout: {
defaultTimeoutSeconds: 30,
timeoutEnvVar: "SDK_REQUEST_TIMEOUT",
},
pagination: { autoPageDelayMs: 0 },
},
};
See src/ir/sdk-behavior.ts for all interfaces and default values.
7-day copy clicks
Generated from the plugin's indexed repository (workos/oagen) — no native marketplace selected
npx claudepluginhub p/workos-oagenBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground