flagcraft

Lint your --help output against the CLI Guidelines.

View on GitHub

Report

What Flagcraft checks

Flagcraft is a linter for the text your command-line tool prints when someone runs it with --help. Paste that output into the box above and it grades the flags against the Command Line Interface Guidelines, the widely cited spec for how a good CLI should behave. Every finding names the exact guideline it comes from, so you get a reason, not just a red mark.

It runs five checks:

How it works

Flagcraft never runs your program or reads its source. It parses the same --help text a user would see in a terminal, so it works with any framework that prints column-aligned help: Python's argparse, Rust's clap, Go's cobra, Node's commander, or a hand-rolled parser. Everything runs in your browser. The text you paste never leaves your machine, and there is nothing to install.

FAQ

Does Flagcraft upload my --help output?
No. Parsing and grading run entirely in your browser. Nothing is sent to a server, and there is no account or login.
Which CLI frameworks does it understand?
Any that print column-aligned help with two or more spaces between a flag and its description, which covers argparse, clap, cobra, and commander without configuration.
What are the CLI Guidelines?
The Command Line Interface Guidelines are an open, opinionated spec for building command-line programs people enjoy using. Flagcraft encodes a handful of their concrete, checkable rules.
Can I lint my own tool?
Yes. Run your program with --help, copy the output, and paste it in. Or click a preset (git, docker, kubectl) to see how established tools score.
Why do famous CLIs still get findings?
Large tools accumulate history. git, for example, reuses -f for different long flags across subcommands, which is exactly the kind of inconsistency the guidelines warn against.