Nash Tasks Overview
Nash tasks let you define, organize, and execute commands directly from the nash terminal. Tasks are defined in TOML manifests and support multiple execution styles, scoped environments, and flexible targeting.
Task Manifest
A task manifest is a TOML document containing repeated [[task]] tables. The manifest can live in:
- Global scope —
tasks.tomlin your nash config directory - Project scope —
.nash.tomlin your project root
version = 1 [[task]] id = "build-gui" title = "Build GUI" command = "cargo build -p wezterm-gui"
Top-level fields
| Field | Type | Required | Description |
|---|---|---|---|
version | integer | yes | Schema version (currently 1) |
[[task]] | table | yes | One or more task definitions (repeated array) |
Task Fields
Each [[task]] supports the following keys:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | — | Unique task identifier |
title | string | yes | — | Display name shown in the command palette |
description | string | no | "" | Longer description displayed in the UI |
icon | string | no | — | Codicon-style icon name (e.g. "play", "gear", "rocket") |
keys | array | no | — | Key binding definitions for quick activation |
cwd | string / path | no | — | Working directory for spawned task execution |
env | table | no | — | Environment variables applied at task scope |
target | string | no | — | Where to execute the task (see Targets) |
domain | dynamic value | no | — | Spawn domain used for spawned executions |
focus | boolean | no | true | Whether a spawned tab/window/pane takes focus when started |
keep | boolean | no | false | Whether a spawned tab/window/pane stays open after command exits |
shell | array of strings | no | — | Shell argv prefix override for spawned shell commands |
command | string | no* | — | Shell command execution style |
argv | array of strings | no* | — | Argv-style execution (no shell interpretation) |
step | array of tables | no* | — | Multi-step execution style |
* Exactly one execution style must be defined per task:
command,argv, or one or more[[task.step]]entries. Using zero or multiple styles in a single task is invalid.
Quick Reference
version = 1 [[task]] id = "reload" title = "Reload Config" icon = "refresh" command = "nash cli reload" [[task]] id = "build-and-test" title = "Build & Test" target = "new_tab" [[task.step]] name = "Build" command = "cargo build" [[task.step]] name = "Test" command = "cargo test"
Continue to Execution Styles to learn about the three ways nash can run your tasks.