Spec CLI
Spec CLI bridges the gap between TypeSpec API specifications and robust Go testing. It orchestrates the generation of OpenAPI specs from TypeSpec, then leverages ogen to produce clean, idiomatic Go code—while adding its own specialized mock server capabilities on top.
The tool's core strength lies in its programmable mock servers: stateful, session-aware test doubles that can be precisely controlled for complex integration scenarios. Unlike static responders, these mocks handle parallel test execution cleanly and allow developers to define specific behaviors for different test cases.
A small, focused TypeSpec emitter pre-processes specifications to ensure optimal compatibility with ogen, particularly for strict payload validation. The entire toolchain is orchestrated via Taskfile, maintaining clean separation between Go and TypeScript components without hidden processes.