{"repo":"lispyclouds/climate","free":true,"listed":false,"github":"https://github.com/lispyclouds/climate","clone":"git clone https://github.com/lispyclouds/climate.git","description":"The sidekick for your CLIs powered by OpenAPI","language":"Go","stars":29,"topics":["cli","golang","openapi"],"license":"MIT","category":"cli-tools","readme_excerpt":"climate Read the detailed blogpost! Go is a fantastic language to build CLI tooling, specially the ones for interacting with an API server. ctl anyone? But if you're tired of building bespoke CLIs everytime or think that the swagger codegen isn't just good enough or don't quite subscribe to the idea of codegen in general (like me!), look no further. What if you can influence the CLI behaviour from the server? This enables you to bootstrap your cobra or urfave/cli/v3 CLI tooling from an OpenAPI spec. Checkout Wendy as an example of a full CLI project made using climate. Getting started Rationale climate allows the server to influence the CLI behaviour by using OpenAPI's extensions. It encourages spec-first practices thereby keeping both users and maintenance manageable. It does just enough to handle the spec and nothing more. Overall, the way it works: - Each operation is converted to a Cobra or urfave/cli command - Each parameter is converted to a flag with its corresponding type - As of now, request bodies are a flag and treated as a string regardless of MIME type. Name defaults to climate-data unless specified via x-cli-name . All subject to change - The provided handlers are attached to each command, grouped and attached to the rootCmd Influenced by some of the ideas behind restish it uses the following extensions as of now: - x-cli-aliases : A list of strings which would be used as the alternate names for an operation - x-cli-group : A string to allow grouping subcommands","default_branch":null,"files":null,"tree":[],"storefront":"/r/lispyclouds","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lispyclouds/climate/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}