Jerod Santo changelog.com/posts

docopt gets CLI argument parsing right

Brilliant ideas can be painfully obvious in retrospect. They'll leave you thinking, "Why didn't I think of that?!"

docopt is that for parsing CLI arguments. It generates an argument parser based on the application's help message (which you have to write anyway).

Watch the first few minutes of the video below and you'll see exactly how awesome this is:

The original implementation was in Python, but there are now docopt-based command-line arguments parsers for Ruby, CoffeeScript/JavaScript, PHP, Bash, C#, and Go.

Check out the GitHub org to see all the goods.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00