Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Terminal CLINew to Visual Studio Code? Get it now.
Terminal CLI

Terminal CLI

Mohamed Fall

|
1 install
| (0) | Free
Open/Close VS Code terminals from the command line.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSCode Terminal CLI

Open/Close VS Code terminals from the command line.

vsterm demo

Usage

vsterm open -n api -- npm run dev
Flag
-n, --name terminal name (required); reusing a name restarts that terminal
-g, --group split next to other terminals in the same group
--color black, red, green, yellow, blue, magenta, cyan, white
-e, --env KEY=VALUE extra environment variable (repeatable)
--cwd working directory (default: current)
--focus switch to the new terminal
vsterm close --all
Flag
NAME... close these terminals
-g, --group close every terminal in this group
--all close every terminal opened by vsterm
-f, --force close immediately instead of sending Ctrl+C first
--timeout how long to wait after Ctrl+C (default 5s)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft