Added the gen_key command to cli and shell