Import / Export VS Code Extensions

Sometimes setting up a new machine can be a joy, taking your time finding new tools and extensions. Sometimes though we need a quick and easy way to export settings from one machine to another.

Generate the Export List

To export the vs code list of extensions in a format that can be imported use the following commands

Unix:

code –list-extensions | xargs -L 1 echo code –install-extension

Windows (PowerShell):

code –list-extensions | % { “code –install-extension $_” }

An example of the output from the windows Power Shell is shown below

Now you have this list of pre-formatted commands they can be copied to the new machine that has VS Code installed and the commands run in the terminal.

All the extensions will then be installed.



Categories: Developer Chat

Tags: , , , , , , ,

Leave a comment