Eclipse Open VSX: A Free Marketplace for VS Code Extensions
According to the 2019 Stack Overflow developer survey, Visual Studio (VS) Code is used by more than 50 percent of all developers worldwide. Its extension protocol has enabled the broader developer community to create more than 16,000 extensions supporting all major programming languages, frameworks, and tools used in modern software projects. While large parts of VS Code are developed as open source, the actual product is not open source.
Vendor-Neutral Alternatives to VS Code Are Available
Eclipse Theia, the integrated developer environment (IDE) that powers Gitpod, Google Cloud Shell, and others, offers a vendor-neutral alternative to VS Code and is based on parts of the same open-source codebase as VS Code.
Theia works as an Electron-based desktop app, and it runs in browsers. It also features a highly flexible architecture that allows extensive customizations. Arduino’s new Pro IDE and Arm’s Mbed Studio are great examples of Theia’s flexibility. In addition to this built-in flexibility, Theia can also run VS Code extensions.
Another community-driven project called VSCodium offers a 100 percent open-source version of VS Code.
Only Visual Studio Products Can Access the Extension Marketplace
While all of the projects listed above support VS Code extensions, only Microsoft products can use and connect to Microsoft’s Extension Marketplace. The terms of use for the Marketplace prevent any non-Visual Studio products from accessing it.
Gitpod employs a workaround where users upload .vsix files to install extensions. This causes unnecessary overhead as users have to download the files from GitHub, then upload them to Gitpod. Downloading extensions from the Microsoft Marketplace for any use other than in Microsoft products is prohibited as well.
Most extensions are developed by communities and published under permissive open source licenses. The requirement to distribute and access these community-owned extensions in a system with such restrictive terms of service does not seem right.
Our goal is to resolve this issue by hosting an open source extension registry at the Eclipse Foundation, a vendor-neutral organization. We’re doing this through the Eclipse Open VSX Registry project.
You Can Host Your Own Registry With Eclipse Open VSX Registry
In addition to providing a publicly hosted, vendor-neutral extension registry, the Eclipse Open VSX project also makes the code available as open source. This way everyone can install their own registry and use it, for example, on a corporate network.
You’re not forced to publish proprietary extensions to a public marketplace, but you still maintain full control over their availability. This is very similar to common practices in other ecosystems such as npm, Cargo, and Maven.
The illustration below shows the Open VSX Registry.
Using the Eclipse Open VSX
Open VSX contains the registry server, a web interface, and a command line interface (CLI) to simplify publishing.
The publicly hosted instance of the registry is available here. The upcoming Theia version 1.0 release will use this installation as its default registry.
Because Microsoft’s VS Code Extension Marketplace API is proprietary and undocumented, the Open VSX project has defined its own API. An adapter between the two APIs is planned and will be required to connect VS Code and VSCodium to the Open VSX Registry.
Four Easy Steps to Publish Extensions
We would love to see extension developers publish to our registry in addition to Microsoft’s. To encourage publishing, we developed a CLI that makes publishing very easy. The four basic steps to publish extensions are:
- Register on open-vsx.org through GitHub OAuth.
- Create an access token and copy it.
- Run
npx ovsx create-namespace <publisher> --pat <token>
with the publisher name specified in the extension’s package.json. - Run
npx ovsx publish --pat <token>
in the directory of the extension you want to publish.
We’re Seeding the Registry
Until extension developers start publishing to open-vsx.org themselves, we will publish open source extensions through a script maintained in a GitHub repository. A continuous integration build regularly runs through the list of changes and automatically deploys all listed projects.
If you’re missing a particular extension:
- Ask the original maintainer to publish to open-vsx.org, pointing them to this article for context.
- If the maintainer does not respond, create a pull request here.
Open Source Should Remain Open Source
The VS Code team is doing a great job building a developer experience that is loved and used by millions of developers. The large ecosystem of extensions is unique and provides state-of-the-art tool support for all modern programming languages, frameworks, and tools.
However, we believe that assets released as open source should remain readily available to everyone. A vendor-neutral, community-driven marketplace for VS Code extensions at the Eclipse Foundation is an important first step to make this happen.