Post

How to Install VsCode Extension from your custom or local repo

Install VS Code or Cursor extensions from local or remote repositories without the marketplace.

How to Install VsCode Extension from your custom or local repo

There are several ways to install a Visual Studio Code (VS Code) extension without using the official marketplace—useful when working on custom, private, or modified extensions. Below are practical, up-to-date methods for installing extensions from both local and remote repositories, compatible with VS Code and Cursor.

Installing from a Local Repository

Method 1: Using vsce to package and install

  1. Install the VS Code Extension Manager globally:

    1
    
     npm install -g @vscode/vsce
    
  2. Navigate to your extension’s root directory:

    1
    2
    
     npm install       # install dependencies
     vsce package      # package the extension as .vsix
    
  3. Install the .vsix file:

    • In VS Code:

      • Open Extensions view (Ctrl+Shift+X or Cmd+Shift+X)
      • Click the (three dots) menu at the top
      • Select Install from VSIX…
      • Choose your .vsix file
    • In Cursor:

      • Cursor does not always display the menu. Instead:

        • Use the Command Palette (Cmd+Shift+P) and run Extensions: Install from VSIX
        • Or open the terminal and run:
        1
        
          cursor --install-extension path/to/your-extension.vsix
        

Method 2: Command line installation (VS Code or Cursor)

1
code --install-extension path/to/your-extension.vsix

Or for Cursor:

1
cursor --install-extension path/to/your-extension.vsix

Installing from a Remote Repository

GitHub Method

  1. Clone the repo:

    1
    2
    3
    
     git clone https://github.com/username/repo-name.git
     cd repo-name
     git checkout branch-name  # optional: choose specific branch
    
  2. Install and package as .vsix: Same steps as described in the local repository section above.

    1
    2
    
     npm install
     vsce package
    
  3. Install the generated .vsix file using one of the methods above.

Alternative: Manual Folder Installation

  1. Copy your extension folder into the VS Code extensions directory:
  • macOS/Linux: ~/.vscode/extensions
  • Windows: %USERPROFILE%\.vscode\extensions
  1. Restart VS Code or Cursor.

Things to Consider

  • Version Compatibility: Your extension must match your editor’s API version.
  • Dependencies: Unlike Marketplace installs, dependencies must be handled manually.
  • No Auto-updates: Manual installations don’t update automatically.
  • Development Mode: Use F5 in the extension project to launch a development host for live testing.

These methods give you full control over your development and testing process, ideal for custom or in-progress extensions, whether you’re using standard VS Code or its fork, Cursor.

☕ Support My Work

If you found this post helpful and want to support more content like this, you can buy me a coffee!

Your support helps me continue creating useful articles and tips for fellow developers. Thank you! 🙏

This post is licensed under CC BY 4.0 by the author.