Java CLI Skeleton App with Grammer for Parsing

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:

  1. apache.commons.cli => For parsing command line arguments with ease
  2. jline => For creating a CLI with tab support, history etc.
  3. ANTLR 3 => Parser, Lexer, etc.

The skeleton app can be found here:

https://github.com/umermansoor/microcli

One thought on “Java CLI Skeleton App with Grammer for Parsing

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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