VSCode Tasks Integration
Nash bridges the gap between VS Code's task system and nash's native task capabilities. You can define tasks in tasks.json, reference them from nash, and extend them with nash-only features like domain targeting and multi-step execution.
How It Works
When nash detects a .vscode/tasks.json file in your project or workspace, it converts those tasks into nash-compatible entries and merges them with any native nash tasks defined in .nash.toml.
Conversion Flow
tasks.json ──► Parse & map fields ──► Merge with .nash.toml ──► Available in command palette
Field Mapping
VS Code tasks.json | Nash .nash.toml Equivalent |
|---|---|
label | title |
type ("shell" / "process") | Determines command vs argv execution style |
command | Mapped to command (shell) or argv (process) |
args | Appended to command string or argv array |
options.cwd | cwd |
options.env | env |
options.shell.executable | shell override |
presentation.panel ("shared") | Influences keep behavior |
group | Used for organization in the command palette |
Basic Example
A standard VS Code tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "Build",
"type": "shell",
"command": "npm run build",
"group": "build",
"problemMatcher": []
}
]
}Nash converts this to an equivalent task that appears in the command palette with the title "Build", executing npm run build through the shell.
Extending VS Code Tasks with Nash Features
You can supplement VS Code tasks with native nash capabilities that have no VS Code equivalent:
# .nash.toml
[[task]]
id = "build-with-domain"
title = "Build (Dedicated Domain)"
command = "npm run build"
domain = "build-domain"
keep = true
focus = falseThis gives you the same build command but runs it in a dedicated spawn domain, keeps the output visible, and doesn't steal focus.
Priority: when the same label/ID exists in both sources, the native nash definition takes precedence.
Continue to VS Code Task Conversion Details for a complete reference on how each field is handled.