Reputation: 1637
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?
Upvotes: 5
Views: 1538
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