XTasks
XTasks adds clickable status bar buttons for commands you define in .vscode/xtasks.json.
Each visible task becomes a button. Clicking a button sends the configured command to a shared terminal named XTasks.
Features
- Creates status bar buttons from your task config.
- Supports custom icons per task.
- Runs each task command in a reusable terminal.
- Auto-refreshes when
xtasks.json changes.
Quick Start
- Open a workspace in VS Code.
- Create
.vscode/xtasks.json in the workspace root.
- Add tasks using the format below.
Example:
{
"Build": {
"show": true,
"icon": "$(tools)",
"command": "npm run build"
},
"Test": {
"show": true,
"icon": "$(beaker)",
"command": "npm test"
},
"Hidden Task": {
"show": false,
"command": "echo not shown"
}
}
Each top-level key is the button label.
show (boolean): If true, the button appears.
icon (string, optional): A text/icon prefix shown before the label. Default is ▶.
command (string): Command sent to the terminal when clicked.
Notes
- Tasks are loaded from the first workspace folder.
- If
.vscode/xtasks.json is missing or invalid JSON, no buttons are shown.
Release Notes
1.0.0
Initial version of XTasks.
| |