Installing Existing VS Code Extensions on a New Computer

I recently purchased a new computer and realized there isn’t an easy way in the VS Code GUI to get a list of all of your installed extensions. I was able to find a way to do it using the command line.
The code
command can be used to list all of your installed extensions quickly.
computerOld % code --list-extensions
atlassian.atlascode
bmewburn.vscode-intelephense-client
calebporzio.better-phpunit
EditorConfig.EditorConfig
felixfbecker.php-debug
felixfbecker.php-intellisense
GrapeCity.gc-excelviewer
ikappas.phpcs
ms-mssql.mssql
ms-vscode.sublime-keybindings
onecentlin.laravel-blade
pnp.polacode
redhat.vscode-yaml
streetsidesoftware.code-spell-checker
vector-of-bool.gitflow
With a little xargs
work you can get a series of commands you can then copy and paste into the console on your new computer.
computerOld % code --list-extensions | xargs -L 1 echo code --install-extension
code --install-extension atlassian.atlascode
code --install-extension bmewburn.vscode-intelephense-client
code --install-extension calebporzio.better-phpunit
code --install-extension EditorConfig.EditorConfig
code --install-extension felixfbecker.php-debug
code --install-extension felixfbecker.php-intellisense
code --install-extension GrapeCity.gc-excelviewer
code --install-extension ikappas.phpcs
code --install-extension ms-mssql.mssql
code --install-extension ms-vscode.sublime-keybindings
code --install-extension onecentlin.laravel-blade
code --install-extension pnp.polacode
code --install-extension redhat.vscode-yaml
code --install-extension streetsidesoftware.code-spell-checker
code --install-extension vector-of-bool.gitflow
Then on your new computer you can run them one at a time or all at once.
computerNew % code --install-extension bmewburn.vscode-intelephense-client
Installing extensions...
Installing extension 'bmewburn.vscode-intelephense-client' v1.3.11...
(node:60952) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(node:60952) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'bmewburn.vscode-intelephense-client' v1.3.11 was successfully installed.
I’m questioning all the extensions I have installed now but at least now my new computer is like my old computer. :-)
Scott Keck-Warren
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around the house with his loving partner.
Top Posts
- Working With Soft Deletes in Laravel (By Example)
- Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
- Upgrading to Laravel 8.x
- Get The Count of the Number of Users in an AD Group
- Multiple Vagrant VMs in One Vagrantfile
- Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
- Changing the Directory Vagrant Stores the VMs In
- Accepting Android SDK Licenses From The OSX Command Line
- Fixing the 'Target class [config] does not exist' Error
- Using Rectangle to Manage MacOS Windows