Stainless CLI generator: your API, now with --help
Blog post from Stainless
Stainless has introduced a feature that allows developers to generate command line tools directly from their OpenAPI specifications, streamlining the creation of high-quality CLI interfaces. These tools, which are built as wrappers around Go SDKs due to Go's performance and distribution advantages, provide scriptable and efficient ways for developers to interact with APIs. Stainless's solution simplifies the traditionally complex process of building CLIs by handling aspects like argument parsing, pagination, shell completions, and cross-platform distribution, ensuring ease of use for end users across macOS, Linux, and Windows. The CLI tools are designed with a resource-based structure and support intuitive syntax for common use cases, as well as advanced input methods for complex data. Additionally, the CLIs are self-documenting, making them suitable for both human users and AI agents by offering clear documentation and predictable command structures. Through integration with the existing release flow, Stainless ensures that CLI tools are distributed seamlessly alongside other SDKs, with support for package managers like Homebrew and plans for further expansions to npm.