https://github.com/workos/oagen-emitters
WorkOS' oagen emitters
https://github.com/workos/oagen-emitters
Last synced: about 2 months ago
JSON representation
WorkOS' oagen emitters
- Host: GitHub
- URL: https://github.com/workos/oagen-emitters
- Owner: workos
- License: mit
- Created: 2026-03-18T16:48:56.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-27T00:45:48.000Z (2 months ago)
- Last Synced: 2026-04-27T02:34:37.974Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.05 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# oagen-emitters
Language emitters, extractors, and smoke runners for [oagen](../oagen). This package is a **plugin library** -- it provides SDK generation capabilities but does not own the consumer config. The canonical generation config lives in the spec-consuming project (e.g. https://github.com/workos/openapi-spec/oagen.config.ts`).
## Plugin export
The primary export for consumers is the `workosEmittersPlugin` bundle:
```ts
import { workosEmittersPlugin } from "@workos/oagen-emitters";
const config: OagenConfig = {
...workosEmittersPlugin,
// consumer-owned spec policy goes here
docUrl: "https://workos.com/docs",
operationHints,
mountRules,
};
```
The plugin bundle registers all emitters, extractors, and smoke runners provided by this package.
## Development
```bash
npm install
npm test # run emitter unit tests
npm run typecheck # verify types
npm run build # build dist/ output
```
### Using a local `oagen` checkout
```bash
npm run oagen:use:local # build and link ../oagen
npm run oagen:build:local # rebuild ../oagen after changes
npm run oagen:use:published # switch back to published package
npm run git:push -- # push with published oagen, then restore local link
```
## Emitter development
Each emitter lives in `src//` and implements the `Emitter` interface from `@workos/oagen`. Extractors live in `src/compat/extractors/.ts`. Smoke runners live in `smoke/sdk-.ts`.
When building or changing an emitter:
1. Implement or update the emitter code in `src//`
2. Implement or update the extractor in `src/compat/extractors/` if needed
3. Implement or update the smoke runner in `smoke/` if needed
4. Export the emitter through `src/plugin.ts` and `src/index.ts`
5. Run `npm test` and `npm run typecheck`
6. Switch to the consumer project (e.g. `openapi-spec`) and run the real end-to-end flow
### Adding a new language
Use the oagen skills:
```bash
claude --plugin-dir node_modules/@workos/oagen
/oagen:generate-sdk
```
This orchestrates: emitter scaffolding, extractor, compat verification, smoke tests, and integration.