Finally, after lots of black magic, can list all the commands and return as list