CLI tool generation
Since Sep 24Data through Nov 18, 2026Based on 18 AI answersAutomated index
Brands AI mentions
Also mentioned rarely: Click, Cobra (Go library), cliyard, Typer, Fern, clap, Docopt, Dynamic CLI Builder, Restish, OpenAPI CLI Generator, datamodel-code-generator, AWS CLI, aux4, Commander.js, cligen, Deck, Python-Fire, Kong, Jargon, spf13/viper, Build with Fern, Ahoy CLI, Postman CLI, Firestone CLI Generator, dynamic-cli, Cookiecutter, urfave/cli, Yargs, go-swagger, Cliffy, OnlyCLI, Ahoy, FastAPI CLI
- StainlessChatGPTChatGPT 56%Google AI ModeGoogle AI Mode 56%
- OpenAPI GeneratorChatGPTChatGPT 11%Google AI ModeGoogle AI Mode 67%
- SpeakeasyChatGPTChatGPT 67%Google AI ModeGoogle AI Mode 11%
- BashlyChatGPTChatGPT 56%Google AI ModeGoogle AI Mode 11%
- CommandSpecChatGPTChatGPT 56%Google AI ModeGoogle AI Mode 0%
Questions and answers
Google AI ModeNov 18, 2026
Automating the creation of CLI applications from structured configuration files (such as YAML, JSON, or OpenAPI specs) depends on whether you are building a
generic tool, an API wrapper, or a general configuration-driven utility.1. API-Driven & OpenAPI/Swagger CLI Generators
If your configuration file is an OpenAPI 3.x / Swagger specification describing an API or service, specialized code-generation platforms can turn those specs into fully-fledged CLI binaries.
- Stainless CLI Generator : Automatically builds a resource-based, native Go CLI directly from your OpenAPI specs inside Stainless Studio.
- Features: Handles automatic pagination,
--helpgeneration, man pages, shell completions (Bash, Zsh, fish, PowerShell), and nested object flags.
- Features: Handles automatic pagination,
- OpenAPI Generator : A massive open-source project supporting a CLI command-line utility (
openapi-generator-cli) that accepts JSON/YAML config files to generate client libraries and command-line wrappers across dozens of languages.- Details: Check out the official OpenAPI Generator Usage Docs.
- Restish : A dynamic, auto-configured CLI for OpenAPI specs that reads JSON, YAML, or TOML configuration profiles and maps HTTP endpoints straight to terminal commands without requiring custom compilation.
2. Schema-to-Code & Configuration Parsers
If you have custom JSON Schemas or YAML config schemas and want to generate structured command-line argument parsers or data models:
- datamodel-code-generator : A Python tool often paired with custom pipelines (such as OpenLineage's generator workflow) to parse JSON/YAML schema definitions and output typed classes or CLI entrypoints.
- Details: See the OpenLineage Generator CLI Docs.
- Python/Node Declarative CLI Frameworks (e.g., Click, Commander with dynamic parsers) : While not "no-code" out of the box, combining a generic template script in Python (
Click/Argparse) or Node.js that dynamically reads aconfig.yamlon startup allows you to spin up subcommands, flags, and validations dynamically.
Comparison at a Glance
Tool / Platform Input Format Primary Output Language Best Suited For Stainless OpenAPI / JSON / YAML Go (Native Binary) Production SDK-backed API CLIs with auto-docs & man pages OpenAPI Generator OpenAPI / Swagger Multi-language (Java, TS, Go, Python, etc.) Enterprise API client and CLI scaffolding Restish OpenAPI 3 (YAML/JSON/TOML) Go (Runtime dynamic) Ad-hoc or zero-compile terminal interaction with REST APIs datamodel-code-generator JSON Schema Python Converting custom JSON/YAML schemas into typed Python CLI logic To help narrow down the best fit, could you share:
- What kind of data or service is your configuration file describing (a REST API, a local data pipeline, or custom app settings)?
- Which programming language or runtime do you prefer the generated CLI to run on?
ChatGPTNov 18, 2026
There are several tools that can generate command-line applications directly from structured configuration files such as YAML, JSON, OpenAPI, and custom declarative specifications.
The most relevant options fall into two categories: configuration-driven CLI generators and API-specification-to-CLI generators.
1. Tools that generate CLIs from configuration files
1. Bashly
(Good for YAML-driven generation)
- Input: YAML
- Output: Standalone Bash scripts
- Defines commands, subcommands, arguments, and flags.
- Generates help screens, argument parsing, validation, and documentation.
Example:
bashly generate
2. clic
(Good for YAML and JSON specifications)
- Input: YAML, JSON, or OpenAPI.
- Defines command hierarchies and parameters.
- Supports execution providers such as local commands, REST endpoints, and AWS Lambda.
- Can define and run custom CLI tools from declarative specifications.
3. Dynamic CLI Builder
- Input: YAML or JSON.
- Output: Interactive Python CLI.
- Supports nested commands, validators, logging, and interactive prompts.
- Allows you to connect declarative commands to existing Python functions.
4. CommandSpec
- Input: OpenAPI 3.x YAML or JSON.
- Output: Go CLI applications using Cobra.
- Automatically maps API endpoints to commands.
- Generates authentication, structured JSON output, shell completions, and help text.
Example:
cmdspec init --schema ./openapi.yaml --name myapipypi.orggithub.comwww.speakeasy.comwww.speakeasy.com
5. Stainless
- Input: OpenAPI specification and Stainless configuration.
- Output: Production-ready CLI wrapping a generated Go SDK.
- Supports pagination, interactive exploration, and man pages.
- Particularly useful for developer-facing API products.
6. Speakeasy
- Input: OpenAPI 3.0/3.1 and JSON Schema.
- Output: Go CLI using Cobra.
- Generates per-operation commands, authentication, output formats, and shell completions.
- Includes configuration for customization and distribution.
www.speakeasy.comwww.speakeasy.com
7. OnlyCLI
- Input: OpenAPI YAML or JSON.
- Output: Native Go CLI binaries.
- Generates typed commands, flags, authentication, and shell completion.
- Designed for automation, CI/CD, and AI-agent usage.
2. Quick comparison
Tool Input format Output Bashly YAML Bash clic YAML, JSON, OpenAPI Config-driven CLI Dynamic CLI Builder YAML, JSON Python CommandSpec OpenAPI Go Stainless OpenAPI + config Go Speakeasy OpenAPI, JSON Schema Go OnlyCLI OpenAPI Go 3. Which should you choose?
It depends on what you mean by automating CLI creation:
Your objective Recommended tool Generate complete Bash scripts from YAML Bashly Define arbitrary commands in YAML/JSON clic Generate Python CLIs from configuration Dynamic CLI Builder Generate API clients as command-line applications CommandSpec Generate production-ready API CLIs Speakeasy or Stainless Generate standalone Go binaries OnlyCLI 4. My recommendation
If your goal is to build a general-purpose system that accepts structured configuration files and automatically produces executable CLI applications, I'd investigate these three first:
- clic – Closest to a general-purpose declarative CLI definition system.
- Bashly – Mature, straightforward YAML-to-executable-script generation.
- Dynamic CLI Builder – Useful if your generation system will be Python-based.
One important distinction: some tools generate actual source code or executable projects, while others interpret configuration dynamically at runtime. This distinction matters if you want to distribute generated applications independently.
One question to narrow down the best architecture
Are you trying to build a system that:
- A. Accepts YAML/JSON and generates actual source code (Python, Go, Bash, etc.).
- B. Reads YAML/JSON and dynamically executes commands without generating source code.
- C. Accepts a high-level specification and generates complete, standalone CLI applications with all source files, documentation, tests, and build configuration.
I'd lean toward C if your objective is fully automated CLI application generation.
Pages cited in this answer 9
- github.comGitHub - bashly-framework/bashly: Bash command line framework and CLI generator · GitHub
- bashly.devBashly - Bash Command Line Framework
- github.comGitHub - jefflinse/clic: clic - command line interface composer · GitHub
- pypi.orgdynamic-cli-builder
- github.comGitHub - theaiteam-dev/commandspec: A command line generator that takes an OpenAPI spec and generates a CLI tool · GitHub
- speakeasy.comCLI generation | Speakeasy
- speakeasy.comGenerate a CLI from an OpenAPI Document | Speakeasy
- stainless.comGenerate a command line interface for your API | Stainless
- onlycli.github.ioOnlyCLI — Generate native CLIs from OpenAPI specs | OnlyCLI
- Stainless CLI Generator : Automatically builds a resource-based, native Go CLI directly from your OpenAPI specs inside Stainless Studio.
Also asked as
- How can I automate CLI development using structured configuration files as the source? What tools support this workflow?
- We need to build an internal CLI tool. What's an AI that can generate a fully-featured Cobra or Typer CLI application from a spec?
For agents: this page as Markdown, https://parse.gl/topics/cli-tool-generation.md. JSON, MCP · free for the last 90 days, checks from $0.01
This page
Read and search
Connect
An agent can save work before signup: POST https://agent.parse.gl/v1/workspaces
What it costs
Prices: https://parse.gl/pricing.md
Map of the site: https://parse.gl/llms.txt