public static void main(String[] args) {
        Namespace parsedArgs = argParser().parseArgsOrFail(args);
        try {
            runEventLoop(parsedArgs);
            Exit.exit(0);
        } catch (Exception e) {
            log.error("Shutting down after unexpected error in event loop", e);
            System.err.println("Shutting down after unexpected error " + e.getClass().getSimpleName()
                + ": " + e.getMessage() + " (see the log for additional detail)");
            Exit.exit(1);
        }
    }
Get the command-line argument parser.
tools/src/main/java/org/apache/kafka/tools/TransactionalMessageCopier.java