millionco

millionco / cli-to-js

Public

Turn any CLI into a JavaScript API

15
0
89% credibility
Found Apr 11, 2026 at 15 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

A tool that reads command-line program help text to automatically create typed JavaScript functions for calling them programmatically.

How It Works

1
🔍 Discover a handy helper

You find a simple tool that lets you turn everyday command-line programs into easy JavaScript helpers.

2
📦 Add it to your project

You easily bring this helper into your JavaScript world with a quick install.

3
🛠️ Pick your command-line tool

Choose any program you use on your computer, like one for managing files or code.

4
Magically create JS version

Tell the helper the program's name, and it reads its instructions to build a friendly JavaScript friend.

5
💻 Call it like simple functions

Use methods for commands and settings as easy options, just like writing normal code.

6
Get perfect results every time

Run your tasks, check outputs neatly as text or lists, and fix mistakes before they happen.

🎉 Automate like a pro

Now you control powerful tools right in your code, saving time and making everything smooth.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 15 to 15 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is cli-to-js?

cli-to-js introspects any CLI binary by parsing its --help output, instantly generating a fully typed JavaScript API where subcommands become methods and flags turn into options. Drop in a tool like git or npm, and you get structured calls like `git.commit({message: 'fix'})` with stdout parsing to text, lines, or JSON—no manual wrappers needed. Built in TypeScript, it handles CLI to JSON conversion, YAML/TOML/XML to JSON, and validation, solving the mess of shell strings in Node.js scripts.

Why is it gaining traction?

Unlike static wrappers or codegen tools, it auto-discovers flags, subcommands, and types on any system binary, with Levenshtein-powered "did you mean" validation to catch typos before spawning. Streaming via async iterators and callbacks makes it agent-friendly, while the CLI generates standalone TS/JS files or .d.ts for any tool—think GitHub CLI-js for turning drafts to PRs. Zero deps in outputs and proxy-based API feel magical for quick scripting.

Who should use this?

Node.js devs scripting CLIs like git diff for AI code reviews, npm outdated to JSON, or custom tools for CLI output to JSON workflows. Perfect for agent builders calling system binaries safely, or teams needing typed access to claude, kubectl, or ffmpeg without brittle exec. Avoid if you need battle-tested stability over experimentation.

Verdict

Grab it for prototypes or agents—15 stars and 0.9% credibility score scream experimental, but solid docs and TypeScript make it viable for low-stakes CLI-to-JS hacks. Watch for maturity as it evolves.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.