How can I install multiple extensions in VSCode using the cli? I tried:
code --install-extension xyz.local-history jock.svg
but it only installs the first extension xyz.local-history
.
Installing extensions...
Installing extension 'xyz.local-history' v1.7.0...
(node:10874) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Extension 'xyz.local-history' v1.7.0 was successfully installed.
If you are use Unix/Linux create a bash script with a loop. In this case I want to backup the extensions list and install again:
First create a list of the extensions:
$ code --list-extensions > extensions.txt
Create a bash script for example with the name vscode-extension-install.sh
and input the following code:
#!/usr/bin/env bash
cat extensions.txt | while read extension || [[ -n $extension ]];
do
code --install-extension $extension --force
done
Then run:
$ ./vscode-extension-install.sh
Example output:
Installing extensions...
Installing extension 'visualstudioexptteam.vscodeintellicode' v1.2.6...
Extension 'visualstudioexptteam.vscodeintellicode' v1.2.6 was successfully installed.
Installing extensions...
Installing extension 'vscode-icons-team.vscode-icons' v10.0.0...
Extension 'vscode-icons-team.vscode-icons' v10.0.0 was successfully installed.
...
From my gists
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With