package com.tmitim.twittercli;

import com.github.rvesse.airline.annotations.Cli;
import com.tmitim.twittercli.commands.DirectMessage;
import com.tmitim.twittercli.commands.Favorite;
import com.tmitim.twittercli.commands.Help;
import com.tmitim.twittercli.commands.Location;
import com.tmitim.twittercli.commands.TimeLineCommand;
import com.tmitim.twittercli.commands.Trend;
import com.tmitim.twittercli.commands.Tweet;
import com.tmitim.twittercli.commands.Search;

@Cli(
		name = "twitter",
		description = "Twitter CLI", defaultCommand = TimeLineCommand.class,
		commands = { Tweet.class, TimeLineCommand.class, Location.class, Trend.class, Search.class, DirectMessage.class,
				Favorite.class, Help.class }
	)
public class TwitterCli {
	public static void main(String[] args) {

		com.github.rvesse.airline.Cli<Runnable> cli = new com.github.rvesse.airline.Cli<>(TwitterCli.class);
		try {
			Runnable cmd = cli.parse(args);
			cmd.run();
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}
}

@@ -25,16 +25,74 @@
 ercli;%0A%0A
+import java.util.Arrays;%0Aimport java.util.stream.Stream;%0A%0A
 import c
@@ -133,16 +133,16 @@
 ns.Cli;%0A
-
 import c
@@ -471,16 +471,17 @@
 .Tweet;%0A
+%0A
 import c
@@ -836,16 +836,16 @@
 rgs) %7B%0A%0A
-
 %09%09com.gi
@@ -939,16 +939,264 @@
 class);%0A
+%09%09%0A%09%09if (Stream.of(args).anyMatch(x -%3E x.equals(%22--version%22) %7C%7C x.equals((%22-v%22)))) %7B%0A%09%09%09String version = TwitterCli.class.getPackage().getImplementationVersion();%0A%09%09%09System.out.println(String.format(%22TwitterCLI4j: %25s%22, version));%0A%09%09%09return;%0A%09%09%7D%0A%09%09%0A
 %09%09try %7B%0A

Add version flag