Haoliang Yu

Document any CLI with cmdgraph - A dev tool building CLI documentation for humans and agents

by•
The first tool to recursively parse any existing CLI and create documentations for humans and agents. Suitable to build AI-aware documentation for your project.

Add a comment

Replies

Best
Haoliang Yu
Maker
📌
I’ve been building CLI tools with Node.js frameworks like commander and oclif. While writing docs in code is convenient for developers, it forces users to install the tool just to read them—and maintaining separate docs is extra overhead. So I built **cmdgraph**. cmdgraph parses in-CLI help output and turns it into an agent-ready JSON AST, plus human-friendly formats like HTML and Markdown. It supports popular CLI frameworks across languages (Node.js, Go, Rust, Python, etc.) and falls back to heuristics when needed. The goal is simple: generate accurate, up-to-date CLI documentation automatically—ready for both humans and AI agents—directly from your source. It fits naturally into CI/CD workflows, so your docs stay in sync with every release.