Skip to content

Instantly share code, notes, and snippets.

@RyanJeong
Last active November 5, 2024 14:16
Show Gist options
  • Save RyanJeong/169f8bc8c41f4bbd662b82286ca34dda to your computer and use it in GitHub Desktop.
Save RyanJeong/169f8bc8c41f4bbd662b82286ca34dda to your computer and use it in GitHub Desktop.
Replicate the VSCode extensions installed on server A to server B
  1. Connect to server A and extract the list of installed extensions:
ssh user@a_server
code --list-extensions > extensions-list.txt
  1. Transfer the extensions list file to server B:
scp user@a_server:/path/to/extensions-list.txt user@b_server:/path/to/destination
  1. Connect to server B and install the extensions:
ssh user@b_server
while read extension; do code --install-extension $extension; done < /path/to/destination/extensions-list.txt

vscode-extension.sh

#!/bin/bash

code --install-extension cschlosser.doxdocgen
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension dbaeumer.vscode-eslint
code --install-extension eamodio.gitlens
code --install-extension esbenp.prettier-vscode
code --install-extension formulahendry.docker-explorer
code --install-extension github.vscode-github-actions
code --install-extension GitHub.vscode-pull-request-github
code --install-extension jbockle.jbockle-format-files
code --install-extension josetr.cmake-language-support-vscode
code --install-extension mine.cpplint
code --install-extension ms-azuretools.vscode-docker
code --install-extension ms-dotnettools.vscode-dotnet-runtime
code --install-extension ms-vscode.cmake-tools
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.cpptools-extension-pack
code --install-extension ms-vscode.cpptools-themes
code --install-extension ms-vscode.makefile-tools
code --install-extension ms-vscode.powershell
code --install-extension redhat.java
code --install-extension rvest.vs-code-prettier-eslint
code --install-extension shd101wyy.markdown-preview-enhanced
code --install-extension SonarSource.sonarlint-vscode
code --install-extension twxs.cmake
code --install-extension vadimcn.vscode-lldb
code --install-extension VisualStudioExptTeam.intellicode-api-usage-examples
code --install-extension VisualStudioExptTeam.vscodeintellicode
code --install-extension vscjava.vscode-java-debug
code --install-extension vscjava.vscode-java-dependency
code --install-extension vscjava.vscode-java-pack
code --install-extension vscjava.vscode-java-test
code --install-extension vscjava.vscode-maven
code --install-extension xaver.clang-format

wget https://github.com/SonarSource/sonarlint-vscode/releases/download/4.2.2%2B75910/sonarlint-vscode-4.2.2.vsix
code --install-extension sonarlint-vscode-4.2.2.vsix --force
rm sonarlint-vscode-4.2.2.vsix
@RyanJeong
Copy link
Author

241105

$ code --list-extensions              
Extensions installed on SSH: Home-docker-Ubuntu18:
cschlosser.doxdocgen
DavidAnson.vscode-markdownlint
dbaeumer.vscode-eslint
eamodio.gitlens
esbenp.prettier-vscode
formulahendry.docker-explorer
github.vscode-github-actions
GitHub.vscode-pull-request-github
jbockle.jbockle-format-files
josetr.cmake-language-support-vscode
mine.cpplint
ms-azuretools.vscode-docker
ms-dotnettools.vscode-dotnet-runtime
ms-python.debugpy
ms-python.python
ms-python.vscode-pylance
ms-vscode.cmake-tools
ms-vscode.cpptools
ms-vscode.cpptools-extension-pack
ms-vscode.cpptools-themes
ms-vscode.makefile-tools
ms-vscode.powershell
redhat.java
rvest.vs-code-prettier-eslint
shd101wyy.markdown-preview-enhanced
SonarSource.sonarlint-vscode
twxs.cmake
vadimcn.vscode-lldb
VisualStudioExptTeam.intellicode-api-usage-examples
VisualStudioExptTeam.vscodeintellicode
vscjava.vscode-gradle
vscjava.vscode-java-debug
vscjava.vscode-java-dependency
vscjava.vscode-java-pack
vscjava.vscode-java-test
vscjava.vscode-maven
xaver.clang-format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment