XCommand Tasks
XCommand Tasks adds clickable status bar buttons for commands you define in .vscode/xcmd.json.
Each task becomes a button. Clicking it runs the configured commands in a terminal.
Features
- Creates status bar buttons from
.vscode/xcmd.json.
- Supports custom icons per task.
- Runs multiple chained commands per task.
- Named terminals with custom shell paths (including MSYS2/MinGW).
- Falls back to the active terminal when no terminal is specified.
- Auto-refreshes when
xcmd.json is saved.
Quick Start
- Open a workspace in VS Code.
- Create
.vscode/xcmd.json in the workspace root.
- Add tasks and optional terminal definitions.
Example:
{
"tasks": {
"Build": {
"icon": "$(tools)",
"commands": ["npm run build"]
},
"Test": {
"icon": "$(beaker)",
"commands": ["npm test"]
},
"Deploy": {
"icon": "$(rocket)",
"commands": ["npm run build", "npm run deploy"],
"terminal": "bash"
}
},
"terminals": [
{
"name": "bash",
"path": "C:\\msys64\\msys2_shell.cmd"
}
]
}
Task Fields
Each key under tasks is the button label.
| Field |
Type |
Description |
icon |
string (optional) |
Codicon or text prefix. Default is ▶. See VS Code codicons. |
commands |
string[] |
Commands to run, joined with &&. |
terminal |
string (optional) |
Name of a terminal defined in terminals. If omitted, uses the active terminal. |
Icon Examples
Common Icons
| Icon |
Use case |
$(play) |
▶️ run |
$(debug) |
🐞 debug |
$(run) |
▶️ execute |
$(rocket) |
🚀 deploy/start |
$(terminal) |
💻 terminal |
$(console) |
🖥️ console |
$(check) |
✔️ success |
$(error) |
❌ error |
$(warning) |
⚠️ warning |
$(info) |
ℹ️ info |
$(question) |
❓ help |
$(bug) |
🐞 bug |
$(issues) |
🧩 issues |
$(alert) |
🚨 alert |
$(extensions) |
🧩 extensions |
$(package) |
📦 package |
$(lock) |
🔒 lock |
$(unlock) |
🔓 unlock |
Terminal Fields
Each entry in terminals defines a named shell.
| Field |
Type |
Description |
name |
string |
Identifier referenced by tasks. |
path |
string |
Absolute path to the shell executable. MSYS2 shells are detected automatically. |
Notes
- Config is loaded from the first workspace folder.
- If
.vscode/xcmd.json is missing or invalid, no buttons are shown.
- Named terminals are created on first use and reused for subsequent commands.
Release Notes
1.0.0
Initial release.
| |