In this categoryVS Code Setup ยท 25
- How to Set Up GitHub Copilot in VS CodeStart
- How to Use Copilot Chat and Inline Chat in VS Code
- How to Install and Manage Extensions in VS Code
- How to Install the Continue Extension in VS Code
- How to Install Cline, the Autonomous Coding Agent, in VS Code
- How to Configure Continue with an API Model
- How to Set Up an AI Assistant in VS Code
- How to Run Continue with a Local Model Using Ollama
- How to Run Copilot, Continue, and Cline Together Without Conflicts
- How to Add an MCP Server to Cline
- How to Fix AI Suggestions Not Appearing in VS Code
- How to Install and Trust an AI Extension in VS Code
- How to Install a VS Code Extension from the Command Line
- How to Create a launch.json to Debug a Node.js App in VS Code
- How to Initialize a Git Repository in VS Code
- How to Stage, Commit, and Push Changes from VS Code
- How to Debug a Browser App in VS Code with the Built-in Chrome Debugger
- How to Resolve Git Merge Conflicts in VS Code
- How to Run Build and Dev Commands with tasks.json in VS Code
- How to Add Environment Variables to a VS Code Debug Configuration
How to Install a VS Code Extension from the Command Line
Install and pin VS Code extensions with the code CLI so a fresh machine or container is set up in seconds.
Clicking through the Extensions panel is fine for one extension, but it does not reproduce. The code CLI installs extensions by id, which means you can script a full editor setup and run it on any new machine or dev container. This guide installs one, then captures your whole list.
What you need
- VS Code installed with the code command on PATH
- The id of an extension you want
- About 5 minutes
Step 1: Find the extension id
Every extension has a publisher.name id shown on its marketplace page. That id is what the CLI installs, not the display name.
Step 2: Install it from the CLI
Pass the id to the install flag. The CLI downloads and enables it without opening the panel.
Step 3: Save your full list
Export every installed extension to a file. This is the reproducible setup you can commit and re-run anywhere.
code --list-extensions > extensions.txt
# later, on a new machine:
cat extensions.txt | xargs -L1 code --install-extensionResult: extensions install from a script instead of clicks, so a fresh environment matches your working setup in seconds.
Watch related tutorials
14:00
14:27
13:05
6:41
10:00
15:50New guides in your inbox
Fresh step-by-step how-to guides as we publish them. One email a week, no more.