Occasionally, I find myself doing the following when writing server side apps:
- create a simple command line interface to interact with the server
I decided to write a boiler plate CLI that I can re-use in future projects. I reviewed Java libraries and how other java projects implemented this. I liked the way it was done in Apache Cassandra and hence my inspiration.
The bare-bones CLI uses the following libraries:
- apache.commons.cli => For parsing command line arguments with ease
- jline => For creating a CLI with tab support, history etc.
- ANTLR 3 => Parser, Lexer, etc.
The skeleton app can be found here: