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 scopetasks.toml in your nash config directory
  • Project scope.nash.toml in your project root
version = 1 [[task]] id = "build-gui" title = "Build GUI" command = "cargo build -p wezterm-gui"

Top-level fields

FieldTypeRequiredDescription
versionintegeryesSchema version (currently 1)
[[task]]tableyesOne or more task definitions (repeated array)

Task Fields

Each [[task]] supports the following keys:

FieldTypeRequiredDefaultDescription
idstringyesUnique task identifier
titlestringyesDisplay name shown in the command palette
descriptionstringno""Longer description displayed in the UI
iconstringnoCodicon-style icon name (e.g. "play", "gear", "rocket"). See the Nerd Font Symbols reference for a complete list of supported icons.
keysarraynoKey binding definitions for quick activation
cwdstring / pathnoDefault working directory for execution. Supports absolute or relative paths. See Working Directory Behavior for detailed behavior and step overrides.
envtablenoEnvironment variables applied at task scope
targetstringnoWhere to execute the task (see Targets)
domaindynamic valuenoSpawn domain used for spawned executions
focusbooleannotrueWhether a spawned tab/window/pane takes focus when started
keepbooleannofalseWhether a spawned tab/window/pane stays open after command exits
shellarray of stringsnoShell argv prefix override for spawned shell commands
commandstringno*Shell command execution style
argvarray of stringsno*Argv-style execution (no shell interpretation)
steparray of tablesno*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.