Skip to content

VS Code Marketplace

Proxy and cache VS Code extension VSIX downloads from Microsoft's Visual Studio Marketplace via its Gallery API. Use it for extensions only on the Microsoft marketplace and not mirrored on open-vsx.org; it can also host private extensions.

At a glance

Config typevscode-marketplace
Default upstreammarketplace.visualstudio.com
Modesproxy · local · hybrid
Addressingper-package
Private publish✅ VSIX upload (PUT …/vsix)

Proxy setup

Same protocol, same routes as the OpenVSX page — the gallery is the client side, so it does not depend on which upstream sits behind the registry:

jsonc
{
  "extensionsGallery": {
    "serviceUrl": "https://batlehub.example.com/proxy/<registry>/vscode/gallery",
    "itemUrl": "https://batlehub.example.com/proxy/<registry>/vscode/item",
    "resourceUrlTemplate": "https://batlehub.example.com/proxy/<registry>/vscode/unpkg/{publisher}/{name}/{version}/{path}"
  }
}

The editor sends no credentials to its gallery, so this registry needs anonymous = ["releases:read", "source:read"] under [registries.rbac], or an authenticating ingress. See the warning on the OpenVSX page.

Download a VSIX directly

Download a VSIX directly by coordinate and install it. Replace <registry> with your configured registry name; use latest as the version to fetch the newest release:

sh
# Pinned version
curl -H "Authorization: Bearer $BATLEHUB_TOKEN" \
  "https://batlehub.example.com/proxy/<registry>/ms-python.python/2024.2.1/vsix" \
  -o ms-python.python-2024.2.1.vsix

# Or the latest version
curl -H "Authorization: Bearer $BATLEHUB_TOKEN" \
  "https://batlehub.example.com/proxy/<registry>/ms-python.python/latest/vsix" \
  -o ms-python.python.vsix

code --install-extension ms-python.python-2024.2.1.vsix

Publishing (local / hybrid)

The registry must be in local or hybrid mode. A vscode-marketplace registry shares the VSIX upload/download endpoint with OpenVSX; point the PUT …/{publisher}.{name}/{version}/vsix upload at your vscode-marketplace registry name:

sh
curl -X PUT \
  -H "Authorization: Bearer $BATLEHUB_TOKEN" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @my-org.my-extension-1.0.0.vsix \
  "https://batlehub.example.com/proxy/<registry>/my-org.my-extension/1.0.0/vsix"

Authentication

Pass a BatleHub token as a Bearer header on the VSIX request. Anonymous access works only when the registry's RBAC grants the anonymous role read access.

Notes

  • The direct VSIX route is …/proxy/<registry>/{publisher}.{name}/{version}/vsix, identical to OpenVSX — the two types share the same handler.
  • Prefer OpenVSX for extensions that are mirrored on open-vsx.org; use this type only for Microsoft-marketplace-exclusive extensions.

See also

Released under the Apache 2.0 License. Made with ❤️ and too much ☕.