Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Command Nest - Terminal ButtonsNew to Visual Studio Code? Get it now.
Command Nest - Terminal Buttons

Command Nest - Terminal Buttons

daiping

|
1 install
| (0) | Free
Create named terminal buttons, organize them in collapsible categories, and run multiple shell commands in sequence. Cross-platform command runner for Windows, macOS and Linux.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Command Nest — Terminal Buttons

Your commands. One click away. Create named buttons for terminal commands, group them into collapsible categories, and run a whole workflow in order.

Author: daiping · Free · MIT · Windows / macOS / Linux · VS Code 1.96+

中文速览:添加自定义终端按钮,命名并绑定多条命令,按顺序执行;支持分类折叠、搜索、全局/工作区按钮库和导入导出。点击活动栏 Command Nest 图标后选择“添加按钮”即可开始。完整中文说明随安装包附带在 README.zh-CN.md。

A small home for everyday commands

  • Named terminal buttons. Save a command or a sequence of commands. Click once to run it in VS Code's integrated terminal.
  • Collapsible categories. Keep development, Git, deployment, and other workflows together. Collapse state is remembered.
  • Sequential execution. Commands run in one shell process, so cd and environment changes carry forward. Stop after a failure, or continue through the list.
  • Cross-platform libraries. Use common commands or override the list separately for Windows, macOS, and Linux.
  • Search. Find buttons by name, description, category, or command text. Use Command Nest: Find and Run Button from the Command Palette.
  • Workspace and global libraries. Keep project workflows separate from commands you use everywhere.
  • Manage your collection. Edit, duplicate, move up/down, rename categories, and import/export JSON. Deleting a category moves its buttons to Uncategorized.
  • English and Chinese. The interface follows VS Code's display language.

Quick start

  1. Open Command Nest from the Activity Bar.

  2. Choose Workspace or Global. A workspace library requires an open folder.

  3. Add a category, such as Development.

  4. Select Add button, name it Start development, and choose the category.

  5. Enter one complete command per line:

    npm install
    npm run dev
    
  6. Save, then click the button. Output appears in an integrated terminal task. While it runs, the play button becomes a stop button.

Saving, importing, and opening a workspace never execute commands automatically.

Commands and shells

Each button creates a temporary native script and runs it using a VS Code process task. Commands execute sequentially in the same shell. This does not require Terminal Shell Integration. The script is removed after the task ends; the terminal retains the output.

System Automatic shell Other supported shells
Windows Built-in Windows PowerShell PowerShell 7, cmd, installed Bash, Fish
macOS Supported $SHELL, otherwise /bin/sh Bash, Zsh, POSIX sh, Fish, installed PowerShell
Linux Supported $SHELL, otherwise /bin/sh Bash, Zsh, POSIX sh, Fish, installed PowerShell

Configure Command Nest: Shell and Command Nest: Shell Path to select another installed shell. For a custom executable or wrapper, explicitly select its syntax. PowerShell runs without loading profiles; command-line tools need to be available in the environment inherited by VS Code. On remote SSH, WSL, and Dev Containers, the extension, shell, working paths, and commands run on the remote host.

The extension works across operating systems; a command still needs to be valid for the selected shell and its tools must be installed. For example, put PowerShell syntax in the Windows override and Bash syntax in the Linux/macOS overrides. A non-empty platform override replaces the common command list. Empty overrides fall back to the common list.

Each line must be one complete shell command. Do not split a function, loop, here-document, or continued command across lines. You can invoke an existing script such as python tools/build.py or bash scripts/deploy.sh. In cmd mode, commands use call so tools such as npm.cmd return to the next step; cmd's usual batch-file % and ^ escaping rules apply. Commands are passed as shell code and are not automatically escaped or rewritten.

Execution details:

  • A long-running service blocks subsequent commands until it exits. Use separate buttons to start independent services.
  • A button cannot start a second run while its current run is active. Different buttons may run concurrently.
  • Stop-on-error uses the shell's result for each line. Without stop-on-error, all lines run and the task still reports failure if any line failed. Pipeline status follows the chosen shell's normal rules.
  • Working directory and environment changes persist between commands within a run. Each new run starts with a fresh shell.
  • Stopping uses VS Code's task termination. Independently detached processes follow normal operating-system behavior.

Working directory

Leave it empty to use the workspace root, or your home directory when no folder is open. A multi-root workspace asks which folder to use when needed. Paths may be absolute or relative to the selected workspace folder.

Supported working-directory variables:

Variable Meaning
${workspaceFolder} Selected workspace root
${workspaceFolder:server} Workspace folder named server
${userHome} Current user's home directory
${env:PROJECT_HOME} Environment variable PROJECT_HOME

~, ~/path, and ~\path are also accepted. These variables are expanded in the working-directory field only. In command text, use your shell's native variables and quoting.

Libraries and backups

The Workspace library uses VS Code workspace storage. The Global library uses extension global storage in the current VS Code profile/extension host. It is available across projects in that host. Local and remote hosts have separate libraries. Libraries are not saved to .vscode/settings.json, committed to a repository, or automatically registered for Settings Sync.

Use Export for backups or to share JSON. Import offers Merge or Replace library. Merge matches category names without case sensitivity and adds new copies of incoming buttons. Import validates IDs, category references, size, and schema version before saving. Limits: 2 MB per library/import, 200 categories, 1,000 buttons, 200 commands per command list.

An importable example is included in the extension package at examples/command-nest.example.json.

Settings

Setting Default Purpose
commandNest.defaultScope workspace Initial library; falls back to global without an open folder
commandNest.shell auto auto, powershell, posix, fish, or cmd
commandNest.shellPath empty Optional installed shell executable
commandNest.confirmBeforeRun false Preview and confirm commands before execution
commandNest.focusTerminal true Focus the terminal when starting a run

Privacy and trust

Command Nest has no runtime dependencies, analytics, telemetry, accounts, or extension network requests. Commands execute with your user's permissions and may use the network themselves. Libraries and exported JSON store commands as plain text; use environment variables for secrets. Restricted Mode allows managing buttons but blocks execution. Review commands from imported libraries before running them.

A real desktop or remote terminal is required. Browser-only virtual workspaces are not supported.

Development

npm ci
npm run check
npm test
npm run test:integration
npm run package

Press F5 in this project to open an Extension Development Host. Integration tests use isolated settings, extensions, and workspace folders under .cache/. To test against an existing VS Code installation, set VSCODE_EXECUTABLE_PATH to its executable. Otherwise the harness downloads VS Code 1.96.0. The CI workflow validates Windows, macOS, and Linux and produces VSIX artifacts.

Search terms

Terminal buttons, command runner, command launcher, shell scripts, sequential commands, task runner, workflow automation, command shortcuts, collapsible categories, npm scripts, PowerShell, Bash, Zsh, Fish, cmd, Windows, macOS, Linux, 终端按钮、快捷命令、顺序执行、分类折叠、脚本执行、自动化。

License

MIT © 2026 daiping. The full license is included in LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft