CLI tool generation

Since Sep 24Data through Nov 18, 2026Based on 18 AI answersAutomated index

How we measure
Mentioned in, on ChatGPT and Google AI Mode
  • 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

    1. 1Stainless
    2. 2OpenAPI Generator
    3. 3Restish
    4. 4datamodel-code-generator
    5. 5Click
    6. 6Commander.js

    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, --help generation, man pages, shell completions (Bash, Zsh, fish, PowerShell), and nested object flags.
    • 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.
    • 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 a config.yaml on startup allows you to spin up subcommands, flags, and validations dynamically.

    Comparison at a Glance

    Tool / PlatformInput FormatPrimary Output LanguageBest Suited For
    StainlessOpenAPI / JSON / YAMLGo (Native Binary)Production SDK-backed API CLIs with auto-docs & man pages
    OpenAPI GeneratorOpenAPI / SwaggerMulti-language (Java, TS, Go, Python, etc.)Enterprise API client and CLI scaffolding
    RestishOpenAPI 3 (YAML/JSON/TOML)Go (Runtime dynamic)Ad-hoc or zero-compile terminal interaction with REST APIs
    datamodel-code-generatorJSON SchemaPythonConverting 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

    1. 1Bashly
    2. 2Dynamic CLI Builder
    3. 3CommandSpec
    4. 4Stainless
    5. 5Speakeasy
    6. 6OnlyCLI

    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

    • Create robust CLI apps with Bashly - DEV Community

    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

    GitHub repository ·

    github.com


    • GitHub - pallets/click: Python composable command line interface toolkit · GitHub

    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.

    GitHub repository

    github.com


    • Dynamic-CLI Logo · Issue #121 · IndianOpenSourceFoundation/dynamic-cli · GitHub

    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.

    PyPI project

    pypi.org


    • GitHub - danielgtaylor/openapi-cli-generator: Generate a CLI from an OpenAPI 3 specification · GitHub

    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 myapi

    GitHub repository

    pypi.orggithub.comwww.speakeasy.comwww.speakeasy.com


    • Stainless - Best-in-class developer interfaces for your API

    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.

    Documentation

    www.stainless.com


    • Speakeasy - Terms Consumer

    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.

    Documentation

    www.speakeasy.comwww.speakeasy.com


    • OpenAPI Logo PNG Vector (SVG) Free Download

    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.

    Documentation

    onlycli.github.io

    2. Quick comparison

    ToolInput formatOutput
    BashlyYAMLBash
    clicYAML, JSON, OpenAPIConfig-driven CLI
    Dynamic CLI BuilderYAML, JSONPython
    CommandSpecOpenAPIGo
    StainlessOpenAPI + configGo
    SpeakeasyOpenAPI, JSON SchemaGo
    OnlyCLIOpenAPIGo

    3. Which should you choose?

    It depends on what you mean by automating CLI creation:

    Your objectiveRecommended tool
    Generate complete Bash scripts from YAMLBashly
    Define arbitrary commands in YAML/JSONclic
    Generate Python CLIs from configurationDynamic CLI Builder
    Generate API clients as command-line applicationsCommandSpec
    Generate production-ready API CLIsSpeakeasy or Stainless
    Generate standalone Go binariesOnlyCLI

    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:

    1. clic – Closest to a general-purpose declarative CLI definition system.
    2. Bashly – Mature, straightforward YAML-to-executable-script generation.
    3. 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.

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, parse.gl/topics/cli-tool-generation.md.

This page

Reuse: Figures and tables on this page are free to republish with attribution: a link to https://parse.gl/topics/cli-tool-generation beside them. A standard followed link (dofollow) is preferred.

Read and search

Every brand's share on this topic, with 95% ranges: GET agent.parse.gl/v1/tools/query_metrics?args=%7B%22measures%22%3A%5B%22share_named%22%5D%2C%22by%22%3A%5B%22brand%22%5D%2C%22filter%22%3A%7B%22topic%22%3A%5B%22top_9eefbc5f-4077-4a65-83bd-a93ea30b7c89%22%5D%7D%7D
Search the index: GET parse.gl/api/public/search?q=<words>

Connect

Connect an assistant: agent.parse.gl/mcp

An agent can save work before signup: POST https://agent.parse.gl/v1/workspaces

What it costs

No account: Public figures and up to 5 examples per list, about 120 brands a day per address.
Free account: 90-day Parse Index reads, your brand's first check (20 buyer questions), and a free weekly check.
Prepaid credits (from $20): Exports, deeper search results, live checks, verified contacts, and daily tracking.
Live checks: $0.01 per question per engine ($0.05 on Gemini and Claude).
Full public answers and pages: 25 free per day, then $0.005 each.
Public answers older than 90 days: $0.001 each the first time your workspace counts or lists one, then yours.