📤 Export Extensions
To export your locally installed VSCode extensions into a file, follow the steps below. This will save all your
installed extensions along with their marketplace links into a file named vscode-extensions.txt
.
🪟 Windows
code --list-extensions | ForEach-Object { "# https://marketplace.visualstudio.com/items?itemName=$_`n$_`n" } | Out-File vscode-extensions.txt -Encoding utf8; Write-Host "✅ Extensions exported.";🐧 Linux
code --list-extensions | while read ext; do echo -e "# https://marketplace.visualstudio.com/items?itemName=$ext\n$ext\n"; done > vscode-extensions.txt; echo "✅ Extensions exported.";📥 Install Exported Extensions
The scripts below will install the extensions listed in the file vscode-extensions.txt
. Lines that are empty or start with
#
will be ignored.
🪟 Windows
Get-Content vscode-extensions.txt | Where-Object { -not ($_.StartsWith("#") -or [string]::IsNullOrWhiteSpace($_)) } | ForEach-Object { code --install-extension $_ }🐧 Linux
grep -v '^#' vscode-extensions.txt | xargs -r -n 1 code --install-extension🫴 Install My Recommended Extensions
I recommend you download the list of extensions file . Review the extensions listed in the file by clicking on their links to see which ones suit your needs. Remove any unnecessary extensions from the file, and then use the script below to install the remaining ones.
To install all the extensions, execute the following commands:
🪟 Windows
Invoke-WebRequest https://abditory.vercel.app/vscode-extensions.txt -OutFile vscode-extensions.txtNavigate to the directory where the file is saved, and run the following PowerShell command:
Get-Content vscode-extensions.txt | Where-Object { -not ($_.StartsWith("#") -or [string]::IsNullOrWhiteSpace($_)) } | ForEach-Object { code --install-extension $_ }🐧 Linux
curl -o vscode-extensions.txt https://abditory.vercel.app/vscode-extensions.txtgrep -v '^#' vscode-extensions.txt | xargs -L 1 code --install-extensionTo install only my recommended extensions (extensions marked with 🟢), run the following commands:
🪟 Windows
Get-Content vscode-extensions.txt | ForEach-Object { if ($_ -match "^#! 🟢") { $install = $true } elseif ($install -and -not ($_ -match "^#" -or [string]::IsNullOrWhiteSpace($_))) { code --install-extension $_; $install = $false } }🐧 Linux
awk '/^#! 🟢/ {flag=1; next} flag && !/^#/ && NF {system("code --install-extension "$0); flag=0}' vscode-extensions.txt