Mohammed Ibrahim Islam
Ibrahim's Weblog

Ibrahim's Weblog

Automating VS Code Extension Installation

Automating VS Code Extension Installation

Mohammed Ibrahim Islam's photo
Mohammed Ibrahim Islam
·Aug 27, 2021·

1 min read

It can be frustrating to install all the extensions you are used to one at a time when you install a fresh version of your OS or move from one machine to another. So, I decided to create a simple bash script that will install all my required extensions.

FTR, I am mostly using C# and JS so my extension choices are mostly geared towards those but the script can be used to replace it with any list of extensions. The ids of extensions are visible from the extension page itself under More Info section.

Screen Shot 2021-08-27 at 11.59.32 PM.png


# Color

function green {
    printf "${GREEN}$@${NC}\n"

function yellow {
    printf "${YELLOW}$@${NC}\n"

# List of extensions
declare -a extensions=(

# Installation
for ext in ${extensions[@]}; do
    echo $(yellow "INSTALLING $ext...")
    code --install-extension $ext
    echo $(green "DONE INSTALLING $ext!")
Share this