Documentation menu
On this page
Pinned technical reference

Terminal workflow design

Canonical terminal workflow design from the v0.20.0 published source.

Status: living design for the workflow initiative. Ledger: docs/development/workflow-initiative-ledger.md.

NMSh already owns what most of these features need: a structured record per command (command text, stored output, exit code, duration, waits, lifecycle row, stable startId), its own viewport and hit-testing, a session service that owns the shell, the paste guard, and provider/tool integration. The work below builds on those records instead of the rendered screen.

What other terminals teach (and what NMSh takes)

SystemProven ideaCumbersome / not for NMShNMSh decision
WarpBlocks as the unit of copy/share; per-block actions; “copy output” without selectingBlocks require Warp’s own shell integration and editor model; sharing defaults toward its cloudAlready block-based. Copy/report/compare act on block records; nothing leaves the machine.
Wave TerminalRich block widgets, file previews in placeHeavy UI per block; a second app modelRejected: NMSh stays text-first; previews go to pager/editor handoffs.
iTerm2Triggers (regex → action), semantic history (cmd-click paths), “copy output of last command” via shell integrationRegex triggers run automatically on output; easy to make unsafeReferences are recognized lazily, offered on explicit invocation, never auto-run.
Ghostty / WezTerm / KittyHyperlinks (OSC 8), hints/quick-select modes that pick URLs/paths/hashes by keyboardMode-heavy key schemesKeyboard “references in this block” list from the Actions menu; OSC 8 links already honoured.
Zellij / tmuxSession persistence, panes; copy modeNMSh is not a multiplexerKeep the session service; integrate with tmux, do not replace it.
AtuinContext-rich history (cwd, exit, duration, session), fuzzy searchSeparate history database and syncNMSh already has a history provider for Atuin; pins/recipes reuse history and presets.
PueueA daemon queue for background jobs, separate shells, logsLoses the interactive shell’s state (cwd, env, functions)Distinct concept. NMSh’s queue runs in the same shell; Pueue is an optional integration for detached jobs, not the queue.
fzf / TelevisionFast fuzzy pickers with previewExternal process handoffNative picker first; fzf/Television stay optional providers.
YaziFile manager with previewsA whole TUIHandoff only (open a directory/file with it when installed).
delta / batReadable diffs and highlighted sourcesExternal binariesCompare renders its own unified view; delta is an optional renderer when installed.
NushellStructured data between commandsA different shell languageOut of scope: NMSh preserves the user’s shell.
GumPrompts for scripts (choose, confirm, input)—Must keep working: input awareness and passthrough already route keys to such prompts.

Decisions and defaults

CapabilityDefaultWhy
/copy (Quick Copy), output onlyAlways availableExisting behaviour; fastest path.
Completion status in copiesOff; --status per copyThe output is what people paste; status is opt-in context.
Interactive copy picker/copy ui, or Settings → CopyProgressive disclosure.
Copy as Report (Markdown, plain)Explicit action (--report, picker, Actions)Reports carry commands, paths, exit codes: shared deliberately.
Report redactionOffered in the review, never claimed completeHeuristic; the person inspects the result.
Compare outputExplicit action (“Compare output…”, /compare)Computed lazily, never per command.
Reference recognitionLazy, on Actions/hover; no decorationAvoids noise and false confidence.
Error navigationOn demand (/find filters, Actions)Exit status is authoritative; text matches are hints.
Pins and recipesExplicit; nothing persisted otherwiseNever auto-run.
Queue after failure/interruptPausedDependent commands must not run blindly.
PasteNever executes; batches are reviewedPasting is not execution.
Clipboard-change suggestionOpt-in where detection is cheap and privateNo polling of contents; no history.
Sticky block controlsContextual: only while a block’s header is scrolled awayNo permanent buttons on every block.
AnimationMinimal; obeys reduced motionRestraint.

Rejected or deferred

  • Automatic execution of clipboard, AI or output-derived commands: never.
  • Background AI interpretation of output; any AI dependency in these features.
  • Clipboard history or persistence; transmitting output anywhere.
  • A workflow engine: recipes are reviewed sequences fed to the existing queue.
  • A competing log analyzer: error navigation extends /find.
  • Embedded file manager or diff engine of our own beyond a small line diff for Compare (an LCS line diff is a few dozen lines; delta renders when present).

Shared foundations

  • Block identity: every action names a block by startId; records that fail ownership checks after clears or legacy restores are dropped (see transcript repair), so actions never land on recycled line positions.
  • Provenance: output is what the command wrote (NMSh lines inside a running block excluded); lifecycleText is NMSh’s completion row, kept separate; reports and copies compose from these.
  • One action path: mouse, keyboard, slash commands and menus call the same handlers (copyRecords, runBlockAction, the queue’s QueueOps).
  • Input ownership: a program waiting for input owns Enter; NMSh never turns a reply into a queued command.
  • Ephemeral by default: pickers, staging and reviews hold data in memory only.

Limits stated plainly

  • Sticky controls exist in NMSh’s viewport only; the terminal’s own scrollback cannot be decorated.
  • Redaction is pattern-based; it will miss things. The review exists for that reason.
  • Clipboard-change detection depends on the platform. Reading the clipboard’s contents to notice a change is not acceptable; only a change signal that does not expose the text qualifies (decided in the clipboard slice).
Reviewed against v0.20.0 · source 65e4de55 · 2026-10-18
Sources: terminal-workflow.md
Suggest a correction ↗

Documentation

Try “sessions” or “Theme Bridge”. Search runs in your browser.