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
Command Palette: Terminal: Create New Terminal

# Open another terminal session.

Split terminal
Command Palette: Terminal: Split Terminal

# Create side-by-side terminal panes.

Rename terminal
Command Palette: Terminal: Rename

# Give a terminal tab a meaningful name.

Run selected text in active terminal
Command Palette: Terminal: Run Selected Text in Active Terminal

# Send selected code to the terminal.

## `code` CLI Basics
Show VS Code CLI help
code --help

# Display usage and options.

Open in a new window
code -n .

# Launch a folder in a separate VS Code window.

Reuse current window
code -r .

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

Open multiple files or folders
code README.md src/ package.json

# Pass many paths to VS Code.

Wait until editor closes
code --wait path/to/file.txt

# Useful from Git commit editors and automation scripts.

Start with extensions disabled
code --disable-extensions

# Helpful for troubleshooting extension issues.

## CLI Advanced
Install an extension from the CLI
code --install-extension esbenp.prettier-vscode

# Add an extension by identifier.

Uninstall an extension from the CLI
code --uninstall-extension esbenp.prettier-vscode

# Remove an installed extension by identifier.

List installed extensions
code --list-extensions

# Print extension identifiers to stdout.

Export extension list
code --list-extensions > vscode-extensions.txt

# Create a portable list of installed extensions.

Recommended next

No recommendations yet.