An exporter is the mirror of an importer. It reads the unified model and writes files: documentation, a server project, or a spec in another format.
What an exporter does
An exporter implements the spirefy:exporter interface. The host hands it the model, and it returns the files to write. Exporters run in the app for one-off generation and as steps in a workflow, so the same export drives a CI pipeline from the spirefy CLI.
The exporters today
- Arazzo: writes a standards-compliant Arazzo bundle, the workflow file plus the API descriptions it references.
- Documentation: generates Markdown API documentation with code examples.
- Reference servers: scaffolds a working server project, Go with the Chi router, or Spring Boot.
- Client SDKs: writes a typed client in your language, generated from the same model.
Scaffold one
spirefy init my-exporter --lang=zig
cd my-exporter
spirefy build
spirefy pack
Your exporter declares the spirefy:exporter interface in its WIT, and spirefy generate emits the typed bindings. From there you read the model the host passes in and return your output files.
Client SDKs
A client SDK is just another exporter: it reads the model and writes a typed client in your language. Because the model holds every operation and schema with its source, the generated client matches what each service exposes, and regenerating after a contract change is one command. Write your own SDK exporter against the spirefy:exporter interface, or install one from the marketplace.