Execution Styles
Nash tasks support three execution styles. Each task must use exactly one style.
Command Style
The command field passes a single string to the system shell for interpretation. Shell features like pipes, redirects, globbing, and variable expansion are all available.
[[task]] id = "serve" title = "Start Dev Server" command = "npm run dev -- --port 3000"
A shell override can be used to force a specific shell regardless of the platform default:
[[task]] id = "deploy" title = "Deploy" shell = ["bash", "-c"] command = "deploy.sh --env production"
Argv Style
The argv field passes an argument vector directly to the executable without shell interpretation. No globbing, no variable expansion, no piping — the process receives exactly the tokens you specify.
[[task]] id = "lint" title = "Lint Project" argv = ["cargo", "clippy", "--", "-D", "warnings"]
This is ideal when arguments contain spaces, special characters, or when you want deterministic behavior across platforms without quoting concerns.
Multi-Step Execution
Tasks with [[task.step]] entries run a sequence of commands in order. If any step fails, execution stops and the task is marked as failed.
[[task]] id = "quality-gates" title = "Quality Gates" target = "new_tab" [[task.step]] name = "Format Check" command = "cargo fmt --check" [[task.step]] name = "Lint" command = "cargo clippy -- -D warnings" [[task.step]] name = "Tests" argv = ["cargo", "test"]
Step-Level Overrides
Each step can override task-level settings:
| Field | Type | Description |
|---|---|---|
name | string | Human-readable step name (shown in progress output) |
cwd | string / path | Step-local working directory |
env | table | Step-local environment variables (merged with task) |
shell | array of strings | Step-local shell argv prefix |
command | string | Shell command for this step |
argv | array of strings | Argv-style execution for this step |
[[task]] id = "build-and-test" title = "Build & Test" env = { NODE_ENV = "production" } [[task.step]] name = "Frontend Build" cwd = "./frontend" command = "npm run build" [[task.step]] name = "Backend Tests" cwd = "./backend" env = { TEST_DB = "sqlite" } command = "pytest"
Note: Step
cwdandenvare composed into generated scripts in declaration order. Earlier steps' env vars are inherited by later steps within the same task.
Continue to Targets & Execution Domains to control where your tasks run.