Five reasons to build a CLI for your web app

As web developers, we tend to focus mostly on the web side of the application, and for good reasons too, good UX should be on top of your priority list.

However, it’s important to remember that the developers and maintainers in your application are also users and you need to take care of their experience. And how do you get to please developers? You come as close as possible to their environment, i.e add a command line interface to your application!

Adding a command line interface to your web application has several great advantages as listed below.


The most obvious interpretation of this arises from the fact that you can use your application in multiple environments. However most importantly your application can now be used as part of a bigger application without any need to modify it! Read this to understand why this is important


Application maintenance tasks tend to be rote, unless your audience are brain dead, please spare them the agony of this tasks by providing easy automation switches. This can be as easy as adding tail to all requests or as complex as a command to run a self healing module in your application.


As a dev shop you can not possibly anticipate all the uses your application can have to your users, developers or even future self. Adding a TUI enables a user to script a sequence of commands in your application to cover use cases that you did not think possible.


Lets face it, your web application will likely go down at one point in its lifetime. In this critical time, you really want to still be able to access it and even better run admin tasks.


It is infinitely quicker to carry out tasks on the command line than equivalent tasks on the web interface. For end users the pain of learning to use a TUI far outweighs this benefit, however most developers are quite at home in this environment, spare them carpal syndrome.

Good news

The good news is that all major frameworks provide an easy way to build out your CLI.

  • Laravel Artisan
  • Django Admin
  • Rails runner

Will you be implementing a cli in your next application? Tell us in the comment section below.


Published by


Software Project Manager