sabrehagen
sabrehagen

Reputation: 1637

How to install all VS Code workspace extensions programatically

When VS Code opens in a folder with .vscode/extensions.json present the user has the option to Install All recommended extensions.

How can the Install All function be invoked programatically (i.e. without human interaction) using the command line or VS Code API?

popup

Upvotes: 5

Views: 1538

Answers (1)

Gama11
Gama11

Reputation: 34148

It doesn't look like the "Install All" action is associated with a command you could call via the vscode.commands API.

The easiest solution is probably to parse .vscode/extensions.json yourself. You could then simply run code --install-extension <extension-id> for each of the extension IDs you find.

Upvotes: 5

Related Questions