VS Code extension, 2026
Terminal Command Buttons
Published on the VS Code Marketplace
A VS Code extension that puts buttons for your usual terminal commands next to the terminal. It shows whether the last run passed or failed, supports variables and groups, can stop and restart commands, and manages git aliases.
# starting…
Docked next to the terminal
One click runs a command. A dev server gets its own terminal; click it again to stop it.
Run status at a glance
A dot pulses while it runs, then turns green or red from the real exit code.
Variables ask when you click
${input:branch} opens a quick pick. Same syntax as tasks.json, without writing JSON.
Ask before running
Risky commands like a force push wait for an explicit confirmation.
Why I built it
I kept retyping the same commands (dev server, tests, git) or digging them out of shell history. tasks.json is too heavy for small shortcuts, and the terminal doesn't show at a glance whether the last run worked.
What it does
- A view docked next to the terminal, with a compact icon layout and a list layout.
- Run status from VS Code's shell integration: a dot pulses while a command runs, then turns green or red based on the exit code.
- Variables use the tasks.json syntax (${input:branch}, ${file}, ${selectedText}), so there's nothing new to learn.
- Nothing is written to the project. Global buttons live in user settings, workspace buttons in VS Code's workspace storage.
How it's built
Fifteen TypeScript modules (runner, variables, shell quoting, git aliases, status bar and others) behind a webview with a strict Content Security Policy and a nonce. Values taken from the editor are quoted for each shell (bash, zsh, fish, PowerShell, cmd), so a file named a$(curl …|sh).js can't execute. When safe quoting isn't possible, the command doesn't run and the user sees a message instead. Git is spawned by absolute path, untrusted workspaces only read global aliases, and large command output is processed without blocking the extension host.
Where it is now
Version 1.0 is on the VS Code Marketplace. CI builds, lints, tests and packages a .vsix on every push, and unit tests cover the riskiest parts: shell quoting, variable resolution and settings parsing.
Stack
- TypeScript
- VS Code Extension API
- Webview
- Shell Integration
- Mocha
- webpack
- GitHub Actions