So you can get a list of the packages (well the directories) by using the Sublime API. You can then look through those directories for Default.sublime-command files. Those are simply JSON files, so after parsing you can extract whatever information you want from it. The below link is a portion of my code that reads key map files. I want to clean it up some, but let me know if you have any questions.
link