cli-to-js-api-wrapper
Installation
SKILL.md
cli-to-js: Turn Any CLI Into a JavaScript API
Skill by ara.so — Daily 2026 Skills collection.
cli-to-js reads a binary's --help output, parses it into a schema, and returns a fully typed Proxy-based API where subcommands are methods and flags are options. Designed for agent workflows where structured APIs are safer than raw shell strings.
Install
npm install cli-to-js
Core Concepts
convertCliToJs(binary)— runs--help, parses output, returns typed API proxyfromHelpText(binary, text)— same but from a static help string- Every subcommand becomes a method:
api.subcommand({ flag: value }) - Positional args use the
_key:api.command({ _: ["file.txt"] }) - camelCase keys auto-convert to kebab-case flags:
{ dryRun: true }→--dry-run