The command-line interface (CLI) is the inner world of software development. From the shell, we have direct access to all the operating system’s capabilities, and with that comes the power to compose and orchestrate all aspects of the software. Many tools and frameworks incorporate command lines. Not only that, but the command prompt is the root magic of working with software systems; it’s the home of near unlimited possibilities.
In this article, we’ll take a tour of building sophisticated interactive command-line interface (CLI) applications and REPLs (read–eval–print loops, or interactive shells) in Java. We’ll set up a basic demo application in Java and use the JLine and ConsoleUI libraries to add the features that we need.