Search code examples
sublimetext3sublimetext

Export list of installed packages in SublimeText


I am aware that I can see all installed packages in Sublime using Ctrl+Shift+P and selecting Package Control: List Packages.

I have many packages installed (>20) and I need a way to export their names (and ideally also the link to their https://packagecontrol.io/ page) to a text file or similar output.

Can this be done at all?


Solution

  • You can easily get the list of installed packages by looking at Package Control's user preferences file: Preferences -> Package Settings -> Package Control -> Preferences - User and checking the installed_packages value.

    Getting the URL as well is a bit more complicated, but can be done for example by executing the following in ST's Python console (View menu -> Show Console):

    import os; [(os.path.dirname(file)[len('Packages/'):], sublime.decode_value(sublime.load_resource(file))['url']) for file in sublime.find_resources('package-metadata.json')]