Skip to content

SDK Generation

Open in ChatGPTOpen in Claude

axs sdk generate reads your static config and emits a typed client SDK — REST via OpenAPI 3.1 + openapi-typescript/openapi-fetch, and GraphQL via one operation per root field through @graphql-codegen’s client preset. The SDK is generated into your project with a drift banner and a source-surface hash, so a stale client is visible.

Terminal window
axs sdk generate # both surfaces to ./sdk
axs sdk generate --target rest # REST only
axs sdk generate --out packages/client
axs sdk generate --no-client # spec artifacts only, skip the typed client

--target accepts rest | graphql | all (default all). See the axs sdk generate reference for every flag.

The generator discovers your route/resolver config the same way axs visualize does — a static read, no synth and no AWS calls. Each REST route becomes an OpenAPI path; each GraphQL root field becomes a client operation. Because it reads the same config the stacks read, the client can’t describe a surface your infrastructure doesn’t expose.

--eject materialises the built-in codegen/OpenAPI config into your project and stops, so you can customise it and re-run against your own config with --config.

© 2026 Axis Tech. Powered by axis-tech.co.