Skip to content

Instantly share code, notes, and snippets.

@wanglf
Last active April 28, 2026 00:58
Show Gist options
  • Select an option

  • Save wanglf/7acc591890dc0d8ceff1e7ec9af32a55 to your computer and use it in GitHub Desktop.

Select an option

Save wanglf/7acc591890dc0d8ceff1e7ec9af32a55 to your computer and use it in GitHub Desktop.
Download VS Code extensions as VSIX

How to use?

  • Copy content of vsix-bookmarklet, create a bookmark in your browser.
  • Navigate to the web page of the VS Code extension you want to install.
  • Click the bookmark you just created, then click the download button.
    download
  • After download finished, rename the file extension to *.vsix.
  • In VS Code, select Install from VSIX... in the extension context menu.
    vsc

How does it work?

http://stackoverflow.com/a/38866913/1032492

A VS Code extension's offline install package (VSIX) is available at:

https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${extension name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

Take the syntax highlight extension for Vue.js as an example:

https://marketplace.visualstudio.com/items?itemName=liuji-jim.vue

  • The itemName query is a composition of publisher and extension name, separated with a dot.
  • The publisher is liuji-jim.
  • The extension name is vue.
  • The latest version number is in More Info section on the right side.
    more

So the package can be downloaded via this URL:

https://liuji-jim.gallery.vsassets.io/_apis/public/gallery/publisher/liuji-jim/extension/vue/0.1.3/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

javascript:!function(){(function(){for(var%20e={version:%22%22,publisher:%22%22,identifier:%22%22,getDownloadUrl:function(){return[%22https://%22,this.identifier.split(%22.%22)[0],%22.gallery.vsassets.io/_apis/public/gallery/publisher/%22,this.identifier.split(%22.%22)[0],%22/extension/%22,this.identifier.split(%22.%22)[1],%22/%22,this.version,%22/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage%22].join(%22%22)},getFileName:function(){return[this.identifier,%22_%22,this.version,%22.vsix%22].join(%22%22)},getDownloadButton:function(){var%20e=document.createElement(%22a%22);return%20e.innerHTML=%22Download%20VSIX%22,e.href=%22javascript:void(0);%22,e.style.fontFamily=%22wf_segoe-ui,Helvetica%20Neue,Helvetica,Arial,Verdana%22,e.style.display=%22inline-block%22,e.style.padding=%222px%205px%22,e.style.background=%22darkgreen%22,e.style.color=%22white%22,e.style.fontWeight=%22bold%22,e.style.margin=%222px%205px%22,e.setAttribute(%22data-url%22,this.getDownloadUrl()),e.setAttribute(%22data-filename%22,this.getFileName()),e.onclick=function(e){e.target.onclick=null,e.target.innerHTML=%22Downloading%20VSIX...%22;var%20t=new%20XMLHttpRequest;console.log(e.target.getAttribute(%22data-url%22)),t.open(%22GET%22,e.target.getAttribute(%22data-url%22),!0),t.responseType=%22blob%22,t.onprogress=function(t){if(t.lengthComputable){var%20r=t.loaded/t.total*100;e.target.innerHTML=%22Downloading%20VSIX...%22+r.toString()+%22%25%22}},t.onload=function(t){if(200==this.status){var%20r=this.response,n=document.createElement(%22a%22);n.href=window.URL.createObjectURL(r),n.download=e.target.getAttribute(%22data-filename%22),n.click(),e.target.href=n.href,e.target.download=n.download,e.target.innerHTML=%22Download%20VSIX%22}else%20e.target.innerHTML=%22Error.%20Please%20reload%20the%20page%20amd%20try%20again.%22,alert(%22Error%20%22+this.status+%22%20error%20receiving%20the%20document.%22)},t.onerror=function(t){e.target.innerHTML=%22Error.%20Please%20reload%20the%20page%20amd%20try%20again.%22,alert(%22Error%20%22+t.target.status+%22%20occurred%20while%20receiving%20the%20document.%20%22)},t.send()},e}},t={Version:%22version%22,Publisher:%22publisher%22,%22Unique%20Identifier%22:%22identifier%22},r=document.querySelectorAll(%22.ux-table-metadata%20tr%22),n=0;n%3Cr.length;n++){var%20i=r[n],a=i.querySelectorAll(%22td%22);if(2==a.length){var%20o=a[0].innerText.replace(/^\s+|\s+$/g,%22%22),l=a[1].innerText.replace(/^\s+|\s+$/g,%22%22);t.hasOwnProperty(o)%26%26(e[t[o]]=l)}}document.querySelector(%22.vscode-moreinformation%22).parentElement.appendChild(e.getDownloadButton()).scrollIntoView(),e})()}();
@joshprlx
Copy link
Copy Markdown

joshprlx commented Nov 18, 2025

In this example i'm getting the latest https://marketplace.visualstudio.com/items?itemName=laravel.vscode-laravel so the id is just the itemName just change the name for the extension you need:

run it on pwsh

$extensionId = "laravel.vscode-laravel"
$publisher, $name = $extensionId -split '\.'
$downloadUrl = "https://$publisher.gallery.vsassets.io/_apis/public/gallery/publisher/$publisher/extension/$name/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"
Invoke-WebRequest -Uri $downloadUrl -OutFile "$name.vsix" -UseBasicParsing

Thanks for great simple solution.

#!/bin/sh

extensionId="laravel.vscode-laravel"
publisher=$(echo "$extensionId" | cut -d '.' -f 1)
name=$(echo "$extensionId" | cut -d '.' -f 2)
downloadUrl="https://$publisher.gallery.vsassets.io/_apis/public/gallery/publisher/$publisher/extension/$name/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"
curl -L "$downloadUrl" -o "$name.vsix"
version=$(unzip -p "$name.vsix" extension.vsixmanifest | grep -oP '<Identity[^>]+Version="\K[^"]+')
mv "$name.vsix" "${extensionId}-${version}.vsix"

I tweaked this a little so that it accepts the extension ID as a param, and added some validation / error handling

(I'm on macOS, so I had to install GNU grep via brew install grep and then changed grep to ggrep. If you're on Linux you can probably change ggrep back to just grep)

#!/usr/bin/env bash

if [ $# -lt 1 ]; then
  echo "Usage: $(basename "$0") <extensionId>"
  exit 1
fi

extensionId=$1

if [[ "$extensionId" != *.* ]]; then
  echo "Error: Extension ID must be of the form <publisher>.<name>"
  exit 1
fi

publisher=$(echo "$extensionId" | cut -d '.' -f 1)
name=$(echo "$extensionId" | cut -d '.' -f 2)

downloadUrl="https://$publisher.gallery.vsassets.io/_apis/public/gallery/publisher/$publisher/extension/$name/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"
curl -fL "$downloadUrl" -o "$name.vsix" || { echo "Error: Failed to download VSIX file"; exit 1; }

version=$(unzip -p "$name.vsix" extension.vsixmanifest | ggrep -oP '<Identity[^>]+Version="\K[^"]+')
mv "$name.vsix" "$extensionId-$version.vsix"

echo "Downloaded $extensionId version $version to $extensionId-$version.vsix"

@Ansen
Copy link
Copy Markdown

Ansen commented Dec 22, 2025

Hi,

Thanks to your excellent guide here, I was able to build an automated tool for downloading VSIX packages. It simplifies the search and version-fetching process based on the logic you shared.

I’ve officially open-sourced it and included a credit to your Gist.

🚀 VSIX Downloader
💻 Source

Hope you find it useful. Keep up the great work!

@cardin
Copy link
Copy Markdown

cardin commented Feb 12, 2026

There's a similar tool here too, that allows one to script the entire thing up (version, platform, extension name): https://github.com/gni/offvsix

@shunf4
Copy link
Copy Markdown

shunf4 commented Feb 13, 2026

For platform (operating system) dependent VSIX urls, add query param targetPlatform:

https://github.com/Peter-007/VSIX_download_url/blob/d8c1178a28d4033c9b13bc8272928b5bc8839b1f/generate_vsix_url.py#L33-L47

 # win32-x64: Windows 64-bit
    # win32-ia32: Windows 32-bit
    # win32-arm64: Windows ARM64
    # darwin-x64: macOS Intel
    # darwin-arm64: macOS Apple Silicon
    # linux-x64: Linux 64-bit
    # linux-arm64: Linux ARM64
    # alpine-x64: Alpine Linux

@zpratikpathak
Copy link
Copy Markdown

I have doing all of this and running into endless search and scroll. i have built this tool https://zpratikpathak.github.io/vsix-download
A single html file based project, you can quickly search and download the vsix file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment