public static void main(String[] args) throws IOException {
        OptionParser optionParser = new OptionParser();
        optionParser.accepts("cache-dir", "The directory to cache native libraries in").withRequiredArg();
        optionParser.accepts("stat", "Display details about the specified file or directory").withRequiredArg();
        optionParser.accepts("ls", "Display contents of the specified directory").withRequiredArg();
        optionParser.accepts("watch", "Watches for changes to the specified file or directory").withRequiredArg();
        optionParser.accepts("machine", "Display details about the current machine");
        optionParser.accepts("terminal", "Display details about the terminal");

        OptionSet result = null;
        try {
            result = optionParser.parse(args);
        } catch (OptionException e) {
            System.err.println(e.getMessage());
            System.err.println();
            optionParser.printHelpOn(System.err);
            System.exit(1);
        }

        if (result.has("cache-dir")) {
            Native.init(new File(result.valueOf("cache-dir").toString()));
        }

        if (result.has("stat")) {
            stat((String) result.valueOf("stat"));
            return;
        }

        if (result.has("ls")) {
            ls((String) result.valueOf("ls"));
            return;
        }

        if (result.has("watch")) {
            watch((String) result.valueOf("watch"));
            return;
        }

        if (result.has("machine")) {
            machine();
            return;
        }

        terminal();
    }