VS Code Logo

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. :-)