633

I need to send all my installed extensions to my colleagues. How can I export them?

The extension manager seems to do nothing... It won't install any extension.

Gama11
  • 31,714
  • 9
  • 78
  • 100
Andrew
  • 6,808
  • 3
  • 18
  • 33
  • You can package an extension pack into a `.vsix file` and distribute this file. How to do this is described here https://stackoverflow.com/questions/58513266/how-to-install-multiple-extensions-in-vscode-using-command-line/71380592#71380592 – sharhp Mar 07 '22 at 11:59
  • @sharhp That answer is actually much more useful here than on that question (which specifically asks for a cli solution, as your disclaimer admits). Probably worth hitting _edit_ on that one and copy and pasting that text here. It is a useful alternative [if it works; haven't tried yet]. (Actually the answer _is_ 100% on the command line, but isn't batch, which is probably what you & OP had in mind; works perfectly here, though.) – ruffin Jul 11 '23 at 15:06
  • For a bash solution, see https://stackoverflow.com/a/65963925/7881859. – Wenfang Du Jul 13 '23 at 12:58

27 Answers27

1011

Automatic

If you are looking forward to an easy one-stop tool to do it for you, I would suggest you to look into the Settings Sync extension.

It will allow

  1. Export of your configuration and extensions
  2. Share it with coworkers and teams. You can update the configuration. Their settings will auto updated.

Manual

  1. Make sure you have the most current version of Visual Studio Code. If you install via a company portal, you might not have the most current version.

  2. On machine A

    Unix:

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

    Windows (PowerShell, e. g. using Visual Studio Code's integrated Terminal):

    code --list-extensions | % { "code --install-extension $_" }
    
  3. Copy and paste the echo output to machine B

    Sample output

    code --install-extension Angular.ng-template
    code --install-extension DSKWRK.vscode-generate-getter-setter
    code --install-extension EditorConfig.EditorConfig
    code --install-extension HookyQR.beautify
    

Please make sure you have the code command line installed. For more information, please visit Command Line Interface (CLI).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Benny
  • 11,466
  • 1
  • 18
  • 6
  • 9
    Can someone provide a Windows friendly version of this command? xargs seems to be unique to UNIX. – damanptyltd Apr 17 '18 at 03:32
  • 17
    @damanptyltd If you use GitHub, you probably have Git Bash installed on your Windows laptop/pc. You can use Unix/Mac commands in that - that how i got it working – Drenai Apr 17 '18 at 17:41
  • 8
    for anybody who thinks they need a windows version, please note, you are supposed to run this from the vscode command line, you can get it by hitting Ctrl+`, then just paste it in! – Jared May 23 '18 at 17:43
  • 1
    I used the Ctrl+` with --list-extensions command above to get my settings out of my windows vscode and then used Ctrl+` to paste in the code --install results into my vscode instance on Linux (over RDP). It just worked. Downloaded and installed all of them. Awesome – Dean Jul 04 '18 at 05:16
  • I'd also appreciate a windows-friendly non-xargs version of this I'm stuck on a PC without admin rights, and they haven't set up bash on these machines :/ – Gandalf Saxe Jul 18 '18 at 21:17
  • 1
    On Mac OSX I had to use the exact `code` executable location: `/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code` ~ I have now just created an alias to it in my `.bash_profile` on all my Mac's – nicc777 Oct 08 '18 at 05:19
  • 10
    This should work under Windows PowerShell: `code --list-extensions | % { "code --install-extension $_" }` (I also edited this into the answer) – powerzone3000 Mar 29 '19 at 12:57
  • 1
    @nicc777 Follow Benny's link to how to set up the command-line. Short answer: open command palette in Code and type "shell command" and there will be a command to add "code" to path. – Steve Jan 07 '20 at 16:28
  • copy to `install.sh`, in git bash `start install.sh` – 山茶树和葡萄树 Feb 05 '20 at 08:54
  • You can pipe the output to a file so you don't have to copy from the terminal like: `code --list-extensions | xargs -L 1 echo code --install-extension > vsc-extensions.txt` – Josh Dando Jul 15 '20 at 10:13
  • What is about [Settings Sync from MS](https://code.visualstudio.com/docs/editor/settings-sync) – KargWare Sep 16 '20 at 06:29
  • @Jared on Windows it is ctrl + **ö**, german.. to all: **code ...** in terminal opens a new editor with the welcome. But does not print the extensions to the terminal. – Timo Dec 04 '20 at 17:29
  • I am on windows 10`powershell 5` and `code -h` or any other parameter opens a new instance but not prints the result to stdout. Should I ask a new question? – Timo May 18 '21 at 18:40
  • Pure batch file: `@for /f %%l in ('code --list-extensions') do @echo code --install-extension %%l` Or on command-line (replacing `%%` by `%`): `@for /f %l in ('code --list-extensions') do @echo code --install-extension %l` – Jeroen Wiert Pluimers Sep 19 '21 at 11:16
  • From a Windows batch `.bat`/`.cmd` file: `PowerShell -Command "code --list-extensions | % { """""code --install-extension $_""""" }"` (quote escaping explained in https://stackoverflow.com/questions/31575784/how-to-escape-powershell-double-quotes-from-a-bat-file/31575981#31575981) – Jeroen Wiert Pluimers Sep 19 '21 at 12:29
  • 3
    If you are on Windows, type `code.cmd --list-extensions` instead of just `code`. The problem is `C:\Program Files\Microsoft VS Code` (or vscode install folder) has `code.exe` which opens vscode and is getting called. You actually need to run `C:\Program Files\Microsoft VS Code\bin\code.cmd`, which is the command line utility script. – adam.hendry May 29 '22 at 20:24
  • @Benny Could you update your answer to show the instructions for Windows users to type `code.cmd` instead of just `code`? – adam.hendry May 29 '22 at 20:26
  • 1
    share as links: `code --list-extensions | xargs -L 1 echo https://marketplace.visualstudio.com/items?itemName=` – Leo Caseiro Jun 17 '22 at 22:48
  • To get `code` to work, type cmd + shift + p in VSCode and look for `Shell Command: Install 'code' command in PATH` – Ian Dec 20 '22 at 18:49
  • If you have the old `extensions` directory files & folders, but don't have access to the old OS you copied them from (and so can't run `code --list-extensions` to get the list to pass to `code --install-extensions`, here is a way to reformat the directory names (removing the version part) and reinstall them: `for EXT in $( ls ~/old/.vscode/extensions/ ); do NAME=$( echo $EXT | perl -ne 's/\-[\d\.]+$//; print "$_"' ); code --install-extension $NAME; done` – gigawatt Jan 25 '23 at 13:16
267

I've needed to do this myself a few times - especially when installing on another machine.

Common questions will give you the location of your folder

Visual Studio Code looks for extensions under your extensions folder .vscode/extensions. Depending on your platform it is located:

Windows %USERPROFILE%\.vscode\extensions
Mac ~/.vscode/extensions
Linux ~/.vscode/extensions

That should show you a list of the extensions.

I've also had success using Visual Studio Code Settings Sync Extension to sync settings to GitHub gist.

In the latest release of Visual Studio Code (May 2016), it is now possible to list the installed extensions on the command line:

code --list-extensions
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
MarkP
  • 4,745
  • 3
  • 22
  • 18
  • 11
    For me (linux, code Version 1.7.1) it does not work... it just starts VS Code. – vanthome Dec 02 '16 at 11:38
  • 4
    @vanthome I never tried on Linux but I think this is the same: I first had the same issue you had, until I realized the command line utility is in fact under the `bin` folder of the application installation. If you look at its content you will see it calls the main executable but telling it to execute the CLI instead. – Yannick Meine Oct 09 '17 at 09:42
  • 1
    FYI you'll need to run 'Shell command: Install 'code' command in PATH' from the command palette (cmd/ctrl-shift-p) within VS Code and then run the above code in your terminal to allow this to work. – scuds Jan 09 '18 at 17:21
  • @vanthome, on windows, find the **code.cmd** file and try it with this. Worked for me. On **wsl, Debian**, I get with code.cmd: `/mnt/c/Program Files/Microsoft VS Code/bin/code.cmd: 1: /mnt/c/Program Files/Microsoft VS Code/bin/code.cmd: @echo: not found`. code.exe in wsl debian starts the programme and says `Ignoring option list-extensions: not supported for code`.. – Timo Nov 20 '20 at 09:55
  • @carlin, I do not understand. Why using the **command palette** or **F1**? – Timo Nov 20 '20 at 09:59
  • The trick is running `bin/code` (Linux, shell script) and `bin/code.cmd` (Windows, batch file). This is a subfolder of your `vscode` install directory. It runs electron as node and executes a cli javascript file. – adam.hendry May 29 '22 at 20:46
  • `code --list-extensions` still works on VSCode, 1.74.2 at DEC 22, thanks – Miguel Gargallo Dec 24 '22 at 10:27
71

Windows (PowerShell) version of Benny's answer

Machine A:

In the Visual Studio Code PowerShell terminal:

code --list-extensions > extensions.list

Machine B:

  1. Copy extension.list to the machine B

  2. In the Visual Studio Code PowerShell terminal:

     cat extensions.list |% { code --install-extension $_}
    
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
milanio
  • 4,082
  • 24
  • 34
  • 2
    This just launches a new code window with the Welcome tab for me. – Gandalf Saxe Jul 18 '18 at 21:21
  • 1
    This answer works perfectly for me -- I had no issues at all getting everything installed. – Incorporeal Logic Sep 19 '18 at 19:59
  • 1
    This is my preferred answer, because it doesn't rely on xargs (compared with the higher rated answer). Now if only "code" were recognized as a command ... *sigh* (it's always something) – GG2 Feb 12 '19 at 01:05
  • This worked perfectly in creating my .list file and showing me what extensions I currently have rocking. I just needed the list as a reference. Didn't need to do the copy process. Many thanks. – klewis Mar 19 '19 at 18:02
  • Simple, low effort and effective. This should be the answer. – Victor Ian Jan 13 '20 at 02:33
  • 2
    On Windows, run `code.cmd` instead of `code` if you are getting a new window. `code.cmd` is in the `bin/` subdirectory of your vscode install folder. On Linux, run `bin/code` (which is a shell script) – adam.hendry May 29 '22 at 20:48
63

I have developed an extension which will synchronise your all Visual Studio Code settings across multiple instances.

Key Features

  1. Use your GitHub account token.
  2. Easy to upload and download on one click.
  3. Saves all settings and snippets files.
  4. Upload key: Shift + Alt + U
  5. Download key: Shift + Alt + D
  6. Type Sync In Order to View all sync options

It synchronises the

  1. Settings file
  2. Keybinding file
  3. Launch file
  4. Snippets folder
  5. Visual Studio Code extensions

Detail Documentation Source

Visual Studio Code Sync ReadMe

Download here: Visual Studio Code Settings Sync

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Shan Khan
  • 9,667
  • 17
  • 61
  • 111
  • 1
    does this automatically installs synced extensions? – Raghavendra Jun 13 '17 at 14:21
  • Yes! Try that and let me know – Shan Khan Jun 13 '17 at 16:26
  • what exception you are getting in the developer console ? open a github issue in the repo and we will see – Shan Khan Jun 14 '17 at 07:28
  • Hey, i used your extension, it is great, but i dont know how to share my extensions list with my friend. – vanduc1102 Aug 11 '17 at 02:36
  • @vanduc1102 - Check this link : http://shanalikhan.github.io/2016/09/02/how-to-Share-visual-studio-code-settings.html – Shan Khan Aug 19 '17 at 17:19
  • It showed the message ` Delete your private GIST and create a public GIST? ` It would be nice if it will create a public GIST everytime i use the feature and keep my private GIST all the time. thanks @ShanKhan , great work – vanduc1102 Aug 21 '17 at 05:38
  • It will not delete the gist from github but only from the extension and create the public gist so when ever you need to configure the private gist you can just add the ID and sync again. Thanks for the suggest i will change this text in the menu. – Shan Khan Aug 22 '17 at 06:44
30

I used the following command to copy my extensions from Visual Studio Code to Visual Studio Code insiders:

code --list-extensions | xargs -L 1 code-insiders --install-extension

The argument -L 1 allows us to execute the command code-insiders --install-extension once for each input line generated by code --list-extensions.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
MUG4N
  • 19,377
  • 11
  • 56
  • 83
  • This is very useful for the `init.sh` in my dotfiles repo. I first install extensions from a file and then write all currently installed extensions to the file. Only downside is I would have to delete the file if I want to remove an extension but it should work if I add one. – ThaJay Nov 13 '18 at 13:15
26

For Linux

On the old machine:

code --list-extensions > vscode-extensions.list

On the new machine:

cat vscode-extensions.list | xargs -L 1 code --install-extension
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Falieson
  • 2,198
  • 3
  • 24
  • 35
  • `cat: vscode-extensions.list: No such file or directory` – vsync Aug 15 '19 at 08:26
  • 1
    It seems you can improve your answer by specifying that the `vscode-extensions.list` file must be copied from the old machine to the new machine. – Jørn Jensen Sep 25 '19 at 08:41
  • How to I export the extension list, on wsl or wsl2? I am using Vscode with remote-wsl to alpine and ubuntu – KargWare Sep 17 '20 at 05:30
24

If using bash, you can use the following commands:

Export extensions

code --list-extensions |
xargs -L 1 echo code --install-extension |
sed "s/$/ --force/" |
sed "\$!s/$/ \&/" > install-extensions.bash

With bash alias, just run eve:

# eve - export vscode extensions
alias eve='code --list-extensions |
xargs -L 1 echo code --install-extension |
sed "s/$/ --force/" |
sed "\$!s/$/ \&/" > install-extensions.bash'

Install extensions

. install-extensions.bash
Wenfang Du
  • 8,804
  • 9
  • 59
  • 90
  • command must be run from VSCODE terminal -- for extended $PATH that includes code command – bortunac Jan 05 '23 at 08:48
  • 1
    @Du. I was trying to replicate vscode extensions between remote machines -- Remote SSH from Mac with updated VSCODE -- your solution is very stright and usefull – bortunac Jan 05 '23 at 11:03
16

Dump extensions:

code --list-extensions > extensions.txt

Install extensions with Bash (Linux, OS X and WSL):

cat extensions.txt | xargs code --list-extensions {}

Install extensions on Windows with PowerShell:

cat extensions.txt |% { code --install-extension $_}
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Morten
  • 2,148
  • 2
  • 15
  • 16
  • 3
    Sadly this doesn't work. It uses `--list-extensions`, which doesn't install, so it should be something line `--install-extension` but when changed to that it still doesn't work – atwright147 Jan 29 '20 at 13:39
  • On Mac, not working even with "--install-extension". – josemigallas Sep 01 '22 at 14:45
14

https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions

A better way to share extension list is to create workspace-based extension set for your colleagues.

After generating a list of extensions via code --list-extensions | xargs -L 1 echo code --install-extension (check your $PATH contains Visual Studio Code entry C:\Program Files\Microsoft VS Code\bin\ before running code commands), run Extensions: Configure Recommended Extensions (Workspace Folder) Visual Studio Code command (Ctrl + Shift + P) and put extensions into the generated .vscode/extensions.json file:

{
    "recommendations": [
        "eg2.tslint",
        "dbaeumer.vscode-eslint",
        "msjsdiag.debugger-for-chrome"
    ]
}
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
godblessstrawberry
  • 4,556
  • 2
  • 40
  • 58
12

Generate a Windows command file (batch) for installing extensions:

for /F "tokens=*" %i in ('code --list-extensions')
   do @echo call code --install-extension %i >> install.cmd
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
sadisaks
  • 121
  • 1
  • 2
8

Open the Visual Studio Code console and write:

code --list-extensions (or code-insiders --list-extensions if Visual Studio Code insider is installed)

Then share the command line with colleagues:

code --install-extension {ext1} --install-extension {ext2} --install-extension {extN} replacing {ext1}, {ext2}, ... , {extN} with the extension you listed

For Visual Studio Code insider: code-insiders --install-extension {ext1} ...

If they copy/paste it in Visual Studio Code command-line terminal, they'll install the shared extensions.

More information on command-line-extension-management.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Damien Leroux
  • 11,177
  • 7
  • 43
  • 57
7

How to export your Visual Studio Code extensions from the terminal. Here is git for that. Maybe this helps somebody.

How to export your Visual Studio Code extensions from the terminal

Note: Unix-like systems only.

  1. Export your extensions to a shell file:
code --list-extensions | sed -e 's/^/code --install-extension /' > my_vscode_extensions.sh
  1. Verify your extensions installer file:
less my_vscode_extesions.sh

Install your extensions (optional)

Run your my_vscode_extensions.sh using a Bash command:

bash my_vscode_extensions.sh
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
5

Use Visual Studio Code's Profiles feature (introduced February 2023) to share settings, including installed extensions, with colleagues using a named Profile.

From VS Code:

  1. Invoke the command: Profiles: Export Profile
  2. In the Profiles view, review the Settings, UI State and Extensions:

enter image description here

  1. From the Profiles view, click the Export button
  2. Enter a name for the profile - if prompted
  3. Select the GitHub gist save option
  4. Once saved, you will see the following:

enter image description here

  1. Press the Copy Link button to save the URL

In the Browser:

  1. Visit the GitHub gist site where you should see a new Gist with your profile name:
  2. Select the new Gist and click the 'Edit' button
  3. In edit-mode, press the 'Make Public' button

Share and Import:

  1. Share the URL you copied earlier with colleagues who can use the Profiles: Import Profile command.
  2. The imported Profiles is associated with the current workspaces.
  3. Profiles can later be switched, renamed etc. from within VS Code
pgfearo
  • 2,087
  • 1
  • 22
  • 27
4

There is an Extension Manager extension, that may help. It seems to allow to install a set of extensions specified in the settings.json.

Michael_Scharf
  • 33,154
  • 22
  • 74
  • 95
4

Benny's answer on Windows with the Linux subsystem:

code --list-extensions | wsl xargs -L 1 echo code --install-extension
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Álvaro González
  • 142,137
  • 41
  • 261
  • 360
4
  1. code --list-extensions > list

  2. sed -i 's/.*/\"&\",/' list

  3. Copy contents of file list and add to file .vscode/extensions.json in the "recommendations" section.

  4. If extensions.json doesn't exist then create a file with the following contents

    {
        "recommendations": [
            // Add content of file list here
        ]
    }
    
  5. Share the extensions.json file and ask another user to add to the .vscode folder. Visual Studio Code will prompt for installation of extensions.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
codescope
  • 293
  • 2
  • 12
4

Now there's a feature still in preview that allows you to sign in with a Microsoft or GitHub account and have your settings synced without any additional extension. It's pretty simple and straigh-forward. You can learn more here.

The things you can sync.

4

How to share VS Code extensions without using plugins, gists, sharing files or forcing users to use a multi-line command

If you need to send all your extensions to install on another computer, you can install multiple extensions with a single-line command in this format:

code --install-extension dakshmiglani.hex-to-rgba --install-extension techer.open-in-browser

How to create the single-line command:

1. In your terminal, run the following command:

code --list-extensions

2. Copy your list of extensions from the terminal and paste your copied list into a new document. Do a regex search and replace in VS Code to share extensions on new computer

3. Open a Search and Replace prompt (CTRL+R on Windows) and do a REGEX search for:

(.+)(\n?)

4. Replace with

 --install-extension $1

(Don't omit the space at the beginning.)

5. Add the word code to the beginning of the resulting text and you'll have a very large command that you can hand off to your colleagues to run in their terminal.

code --install-extension hbenl.vscode-test-explorer --install-extension maciejdems.add-to-gitignore --install-extension techer.open-in-browser --install-extension traBpUkciP.vscode-npm-scripts ...

Benson
  • 4,181
  • 2
  • 26
  • 44
3

I opened the Visual Studio Code extensions folder and executed:

find * -maxdepth 2 -name "package.json" | xargs grep "name"

That gives you a list from which you can extract the extension names.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Juri
  • 32,424
  • 20
  • 102
  • 136
3

Under windows typically I need to run

cd C:\Program Files\Microsoft VS Code\bin
code.cmd --list-extensions

What you don't do is run the code.exe directly under C:\Program Files\Microsoft VS Code\

garlicbread
  • 321
  • 3
  • 6
2

If you intend to share workspace extensions configuration across a team, you should look into the Recommended Extensions feature of Visual Studio Code.

To generate this file, open the command pallet > Configure Recommended Extensions (Workspace Folder). From there, if you wanted to get all of your current extensions and put them in here, you could use the --list-extensions stuff mentioned in other answers, but add some AWK script to make it paste-able into a JSON array (you can get more or less advanced with this as you please - this is just a quick example):

code --list-extensions | awk '{ print "\""$0"\"\,"}'

The advantage of this method is that your team-wide workspace configuration can be checked into source control. With this file present in a project, when the project is opened Visual Studio Code will notify the user that there are recommended extensions to install (if they don't already have them) and can install them all with a single button press.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
eziegl
  • 331
  • 3
  • 10
2

For those that are wondering how to copy your extensions from Visual Studio Code to Visual Studio Code insiders, use this modification of Benny's answer:

code --list-extensions | xargs -L 1 echo code-insiders --install-extension
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Erik
  • 227
  • 3
  • 5
1

If you would like to transfer all the extensions from code to code-insiders or vice versa, here is what worked for me from Git Bash.

code --list-extensions | xargs -L 1 code-insiders --install-extension

This will install all the missing extensions and skip the installed ones. After that, you will need to close and reopen Visual Studio Code.

Similarly, you can transfer extensions from code-insiders to code with the following:

code-insiders --list-extensions | xargs -L 1 code --install-extension
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
nPcomp
  • 8,637
  • 2
  • 54
  • 49
1

On Windows using PowerShell script, including a 'friendlyName' which better matches the extension name as it appears in Visual Studio Code interface (which code --list-extensions doesn't do):

<#
.SYNOPSIS
    Gets installed Visual Studio Code extensions in a friendly format.

.DESCRIPTION
    Gets installed Visual Studio Code extensions in a friendly format.

.INPUTS
    None. You cannot pipe objects to this.

.OUTPUTS
    Installed Visual Studio Code extensions in a friendly format.

.EXAMPLE
    PS> .\Get-VSCodeExtensions.ps1

.NOTES
    Authors: John Bentley, Andrew D. Bond <https://github.com/andrewdbond/>

    Updated: 2023-03-22

    Latest:
    How can you export the Visual Studio Code extension list?: https://stackoverflow.com/a/72929878/872154
#>

$extensions = (Get-Item $HOME/.vscode/extensions/*/package.json).ForEach({
    Get-Content $_ | ConvertFrom-Json | Select-Object `
        @{name='friendlyName';expr={if($_.PSObject.Properties['displayName']) {$_.displayName} else { $_.name}}},
        @{name='publisherAndName';expr={"$($_.publisher).$($_.name)"}},
        description,
        homepage,
        @{name='repository.url';expr={$_.repository.url}},
        version
}) | Sort-Object friendlyName

Write-Output $extensions
# Optional: Set clipboard with the results to paste into Google Sheets, Excel, etc.
$extensions | ConvertTo-Csv | Set-Clipboard

Example output:

friendlyName     : Pylance
publisherAndName : ms-python.vscode-pylance
description      : A performant, feature-rich language server for Python in VS Code
homepage         : 
repository.url   : https://github.com/microsoft/pylance-release
version          : 2023.3.20

friendlyName     : Python
publisherAndName : ms-python.python
description      : IntelliSense (Pylance), Linting, Debugging (multi-threaded, remote), Jupyter Notebooks, code formatting,  
                   refactoring, unit tests, and more.
homepage         : https://github.com/Microsoft/vscode-python
repository.url   : https://github.com/Microsoft/vscode-python
version          : 2023.4.1

Instructions (Windows only):

  1. Paste the above script code into a PowerShell terminal

Or

  1. Copy the above script code and save it somewhere as Get-VSCodeExtensions.ps1
  2. Open a PowerShell terminal at the directory where you saved Get-VSCodeExtensions.ps1 (cd might help here)
  3. Run the script from the PowerShell terminal with .\Get-VSCodeExtensions.ps1
Andrew D. Bond
  • 902
  • 1
  • 11
  • 11
John Bentley
  • 1,676
  • 1
  • 16
  • 18
  • Below `PublisherAndName = ...` I put `Description = $json.description` to get the text description in the output as well. – Nathan Goings Aug 18 '22 at 15:34
  • @NathanGoings good idea. Your suggestion probably helps when sharing such a list with other devs to communicate 'this is what I use, pick from it what you like'. I edited in your line to the code. It will be easy for a dev to delete it, if it doesn't suit their tastes. – John Bentley Aug 20 '22 at 06:12
0

For Linux/Mac only, export the installed Visual Studio Code extensions in the form of an installation script. It's a Z shell (Zsh) script, but it may run in Bash as well.

https://gist.github.com/jvlad/6c92178bbfd1906b7d83c69780ee4630

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
vladZams
  • 737
  • 6
  • 9
0

File > Preferences > Turn on Settings Sync Will sync your VS Code settings across different devices.

I'm using VS Code Version 1.74.0

SridharKritha
  • 8,481
  • 2
  • 52
  • 43
0

I create an extension for this problem. This extension allows you to export a list of all currently installed extensions in your Visual Studio Code. The exported list is saved in a JSON file that can be imported later to restore the extensions.

How can you export the Visual Studio Code extension list?

(Ctrl+Shift+P or Cmd+Shift+P) and type

Export Extensions

Import Extensions