A minimal repo configured with modern JavaScript tooling to scaffold new Visual Studio Code extensions
- Use this template to create a new repository.
- Search-and-replace
vscode-extension-templatewith your extension's id and update thepublisher,displayName, anddescriptionfields in package.json. - Update the
contributesblock and command ids to match your extension. - Implement your extension in src/index.ts (
activate/deactivate).
The scaffold ships a single Hello World command. Run the extension with F5 in VSCode (or vp pack then load the built .vsix) and invoke it from the Command Palette.
Extensions are bundled to a self-contained CommonJS artifact and packaged into a .vsix. Publishing is handled automatically on merge to main by Bumpy via the release workflow, targeting both the VS Code Marketplace and Open VSX.
vp pack # bundle src β dist/index.cjs
vp exec vsce package --no-dependencies # build the .vsix locallyPublishing is automated, but each marketplace needs an account, a publisher, and an access token before your first release. Do this once, then the release workflow handles every publish after.
The Marketplace is backed by Azure DevOps, so the token is an Azure DevOps Personal Access Token β not a Marketplace-specific one.
- Create an Azure DevOps organization if you don't have one (a free personal account is fine).
- Create your publisher at https://marketplace.visualstudio.com/manage/createpublisher. The publisher ID you choose here must match the
publisherfield in package.json. - Mint a token at https://dev.azure.com/ β User settings (top-right avatar) β Personal access tokens β New Token:
- Organization: set to All accessible organizations (required β a single-org token will fail with a 401).
- Scopes: click Show all scopes, then grant Marketplace β Manage.
- Expiration: set as long as allowed; you'll need to rotate the secret when it expires.
- Copy the token (shown only once) and save it as the
VSCE_PATrepository secret (see below).
Open VSX is the vendor-neutral registry used by VSCodium, Cursor, Gitpod, and other non-Microsoft editors.
- Sign in at https://open-vsx.org/ with your GitHub account.
- Open Settings β Access Tokens, click Generate New Token, and copy it.
- Create a namespace matching your
publisherid, then claim it:vp exec ovsx create-namespace <publisher> -p <token>. - Sign the Eclipse Publisher Agreement β Open VSX blocks your first publish until this is accepted.
- Save the token as the
OVSX_PATrepository secret.
Bumpy opens release PRs and creates GitHub Releases. Create a fine-grained personal access token scoped to this repository with Contents: Read and write and Pull requests: Read and write, then save it as BUMPY_GH_TOKEN.
In your repository, go to Settings β Secrets and variables β Actions β New repository secret and add each of:
| Secret | Purpose |
|---|---|
VSCE_PAT |
VS Code Marketplace personal access token (vsce publish) |
OVSX_PAT |
Open VSX personal access token (ovsx publish) |
BUMPY_GH_TOKEN |
Token Bumpy uses to open release PRs / GitHub Releases |
To publish only to one marketplace, drop the other's publishCommand from the bumpy block in package.json and remove its secret.
The project uses Vite+ as a unified toolchain (Oxlint + Oxfmt + tsdown + Vitest) and Bumpy for versioning and release.
vp install # install dependencies
vp check --fix # format + lint + typecheck (with autofixes)
vp test # run Vitest
yarn bumpy add # create a bump file for your PRReleased under the MIT license Β© Drake Costa.