cmdvisual-studio-code

How to install Visual Studio Code extensions from Command line


How to install Visual Studio Code Extensions from Command Prompt while Code Instance is open. I want to install extension from Visual Studio Code gallery.

Following is the extension data i want to install.

enter image description here

My Visual Studio Code Instance is open. What i want to do is to install the following extension from command prompt.


Solution

  • To make it easier to automate and configure VS Code, it is possible to list, install, and uninstall extensions from the command line. When identifying an extension, provide the full name of the form publisher.extension, for example donjayamanne.python.

    code --list-extensions
    code --install-extension ms-vscode.cpptools
    code --uninstall-extension ms-vscode.csharp
    

    You can also include extensions from local .vsix files like this:

    code --install-extension <extension-vsix-path>
    

    Usage:

    code --install-extension hello-world-extension.vsix
    

    Documentation