Summary
Add support in automated code generation command (ocli gen cli) to produce fully-typed, structured Node.js CLI applications using the Yargs framework directly from an OpenCLI specification document.
Details
The goal of this feature is to allow Node.js developers to use the OpenCLI specification as a single source of truth for their command-line tools. Similar to how OpenAPI generates Express routers or Axios clients, OpenCLI should generate ready-to-run Yargs code including commands, positional arguments, options/flags, and type definitions. Potentially update editor on http://opencli.dev to show live code updates along with existing document preview.
Yargs is one of, if not the most popular CLI framework for Node, so adding support for Yargs in OpenCLI code generation could improve adoption of the standard.
Impact and Effort
Impacts
/gen
/internal/cli/app/actions.go
Effort: HIGH
Summary
Add support in automated code generation command (
ocli gen cli) to produce fully-typed, structured Node.js CLI applications using the Yargs framework directly from an OpenCLI specification document.Details
The goal of this feature is to allow Node.js developers to use the OpenCLI specification as a single source of truth for their command-line tools. Similar to how OpenAPI generates Express routers or Axios clients, OpenCLI should generate ready-to-run Yargs code including commands, positional arguments, options/flags, and type definitions. Potentially update editor on http://opencli.dev to show live code updates along with existing document preview.
Yargs is one of, if not the most popular CLI framework for Node, so adding support for Yargs in OpenCLI code generation could improve adoption of the standard.
Impact and Effort
Impacts
/gen/internal/cli/app/actions.goEffort:
HIGH