split keygen into a simple interactive command