Skip to content

commandr: an automatic CLI builder for Python


A while ago at TellApart, I wrote a little library for making command-line interfaces for Python functions easier to create. You simply add a decorator to a function, and it builds an optparse specification directly from the function’s signature. It was a small self-contained module, part of a larger project — I thought it would see some use in one or two of my tools.

It turned out to be much more useful than I had thought. Pretty much everyone started using it for any new (and old) scripts. A couple people even added some functionality, such as Chris Huegle adding type checking, positional arguments, and short flags.

One day, someone had the great idea to open-source the tool; so we did just that:

I also posted about it on the Engineering blog:

It’s been out for only a couple days now, and there’s been more buzz than I expected. A post on /r/Python was one of the top articles for most of the day, PyCoder’s Weekly picked it up (without anyone submitting it!), and the github repository has a ton of stars, and even a couple forks. It’s been really exciting seeing my little tool be useful to so many people!


From → TellApart

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: