# Voxgig SDK Generator

> The generator reads your OpenAPI spec, extracts a type-safe semantic model of your API, and generates six surfaces from that model. Generation is deterministic, so the same spec produces the same output on every run.

Install: `npm create @voxgig/sdkgen`
Source: https://github.com/voxgig/sdkgen (MIT)

## The six output surfaces

1. SDK: uniform client libraries, one per language target. You call entities and operations, not URLs.
2. CLI: a command-line tool over your API, entity-shaped, for scripts, CI and on-call.
3. MCP Server: a Model Context Protocol server, so Claude, ChatGPT, Cursor and Cline can call your API as a native tool.
4. Agent Skills: generated markdown that teaches a coding agent your entities and operations.
5. REPL: an interactive shell over the same entities.
6. Semantic Model: the type-safe model of your API, entities, attributes and operations. The ground truth the other five are generated from.

## Language targets

Twenty-three language targets are available. Twenty ship with the
generator: TypeScript, JavaScript, Go, Python, PHP, Ruby, Lua, C#, Java,
Kotlin, Scala, Swift, Rust, C, C++, Zig, Perl, Clojure, Elixir, and OCaml.
Dart, Haskell and Lean come together in a language pack
(`@voxgig/sdkgen-langpack`), and a project can add a target of its own.
You add the targets you want and generate only those.

Every target gets the same operation pipeline, the same twenty features,
generated documentation and an offline test suite, so a feature means the same
thing in every language. It is not a TypeScript tier with wrappers elsewhere.
Three consumer targets ship with the generator and wrap those SDKs:
a CLI and an MCP server in Go, and an analyst-oriented data package in Python.
A Seneca provider plugin comes from a second package, `@voxgig/sdkgen-infrapack`.
Documentation editions come from a third, `@voxgig/docgen`: a summary document,
a static reference site for GitHub Pages, and a slide deck.

The released packages carry the definitive lists: https://www.npmjs.com/package/@voxgig/sdkgen
and https://www.npmjs.com/package/@voxgig/sdkgen-langpack.

## How it differs from the alternatives

- Ship no SDK. You lose the enterprise deal, or you ship raw HTTP and absorb the support load.
- Hand-write per language. Every API change is N writes, and the SDKs drift from the spec.
- AI-assisted generation. Ownership cost is identical to hand-writing, and the output is non-deterministic. Useful for exploration, harder to live with for libraries customers compile against for years.
- Other open-source generators. Wooden output, SDK only, nobody behind it when it breaks.
- Paid SaaS SDK products. SDK only, closed source, priced per seat.
- Hand-rolled MCP server. Solves MCP once, then drifts from your SDK on the next spec change.

Voxgig generates all six surfaces from one model, deterministically, under MIT, into your repo.

Named tools are compared one page each at https://voxgig.com/sdk/comparisons: OpenAPI Generator, Speakeasy, Fern, Stainless, Cloudflare Forge, APIMatic, liblab, Kiota and Hey API. Published by Voxgig, which makes one of the tools compared. Each page covers what the tool does that Voxgig does not, a side-by-side table, and an SDK made with the tool beside a Voxgig SDK for the same API. It also covers the cases each suits and the limits of the comparison.

## Twenty generated features

Twenty opt-in features are generated into the SDK alongside the entity
methods, in every language target: retry with backoff, timeout, ratelimit,
cache, idempotency keys, paging, streaming, telemetry, metrics, audit, cost
tracking with a spend budget, debug, clienttrack, rbac, proxy, secrets,
validate, log, and an offline test transport with network simulation. Each is off until activated in the client constructor. Full
detail at https://voxgig.com/sdk/features.

## Customization without forking

The templates and generator components are copied into your repo at scaffold
time. Project decisions are declared in the model, so regeneration is always
safe. The supported extension points take custom components, custom features,
and entire custom language targets, packaged so an upgrade cannot revert them.
A `doctor` command reports drift for CI. Full detail at
https://voxgig.com/sdk/custom, with a worked example that generates a Bash SDK.

## Frequently asked

- Is it really MIT? Yes. The generator and templates are MIT. The generated SDKs are yours.
- What if Voxgig disappears? The generator is on npm and GitHub, and the generated code is in your repo. Nothing breaks.
- Java and C#? Both are bundled targets, generated like every language above.
- What are Agent Skills? Generated markdown describing your API at the entity and operation level, in the format coding agents read as a skill.
- Do the SDKs handle retries and caching? Yes, if you switch them on. See https://voxgig.com/sdk/features.

## Machine-readable

- Catalog index: https://voxgig.com/api/sdk/catalog.json
- Per SDK: https://voxgig.com/api/sdk/{slug}.json and https://voxgig.com/voxgig-sdk/{slug}.md
- CSV: https://voxgig.com/sdk/voxgig-sdk.csv
