VS Code Terminal and CLI

Integrated terminal workflows plus `code` CLI commands for opening files, folders, diffs, and extensions.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Integrated Terminal

Create new terminal

Open another terminal session.

textANYterminal
text
Command Palette: Terminal: Create New Terminal

Split terminal

Create side-by-side terminal panes.

textANYterminal
text
Command Palette: Terminal: Split Terminal

Rename terminal

Give a terminal tab a meaningful name.

textANYterminal
text
Command Palette: Terminal: Rename

Run selected text in active terminal

Send selected code to the terminal.

textANYterminalworkflow
text
Command Palette: Terminal: Run Selected Text in Active Terminal

`code` CLI Basics

Show VS Code CLI help

Display usage and options.

bashANYcli
bash
code --help

Open in a new window

Launch a folder in a separate VS Code window.

bashANYcliwindow
bash
code -n .

Reuse current window

Open in the current window instead of creating a new one.

bashANYcliwindow
bash
code -r .

Open multiple files or folders

Pass many paths to VS Code.

bashANYclifiles
bash
code README.md src/ package.json

Wait until editor closes

Useful from Git commit editors and automation scripts.

bashANYcliworkflow
bash
code --wait path/to/file.txt

Start with extensions disabled

Helpful for troubleshooting extension issues.

bashANYcliextensionstroubleshooting
bash
code --disable-extensions

CLI Advanced

Install an extension from the CLI

Add an extension by identifier.

bashANYcliextensions
bash
code --install-extension esbenp.prettier-vscode

Uninstall an extension from the CLI

Remove an installed extension by identifier.

bashANYcliextensions
bash
code --uninstall-extension esbenp.prettier-vscode

List installed extensions

Print extension identifiers to stdout.

bashANYcliextensions
bash
code --list-extensions

Export extension list

Create a portable list of installed extensions.

bashANYcliextensionsbackup
bash
code --list-extensions > vscode-extensions.txt

Recommended next

No recommendations yet.