public static void main(String[] args) throws Exception {
        if (args.length == 0) {
            printUsage(PROGNAME);
            return;
        }
        final String command = args[0];
        final boolean succeeded;
        if (matches("add", command)) {
            succeeded = doAdd(dropFirst(args));
        } else if (matches("remove", command)) {
            succeeded = doRemove(dropFirst(args));
        } else if (matches("info", command)) {
            succeeded = doInfo(dropFirst(args));
        } else {
            System.err.println("不明なコマンド: " + command);
            printUsage(PROGNAME);
            succeeded = false;
        }

        System.exit(succeeded ? 0 : 1);
    }