How to add a new UE4editor.exe commandlet

I believe you could create a new class derived from UCommandlet, and implement your feature in Main function of this class. Running command line looks like what you mentioned. Mycmd is your class name without U prefix and Commandlet suffix.