> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nika.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# command

> Contract, placement, related fields and source examples for this Nika YAML field.

[Language reference](https://docs.nika.sh/reference/language/overview.md) / `command`

## Meaning and placement

### exec

argv — the program and its arguments, execve, NO shell. Each element substituted independently (the injection-safe form). Shell features (pipes · redirects · globs) live in `shell:`.

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/$defs/exec/properties/command` |
| type | `"array"` |

**In the same object:** [capture](https://docs.nika.sh/reference/language/words/capture.md) · [cwd](https://docs.nika.sh/reference/language/words/cwd.md) · [decode](https://docs.nika.sh/reference/language/words/decode.md) · [env](https://docs.nika.sh/reference/language/words/env.md) · [shell](https://docs.nika.sh/reference/language/words/shell.md) · [stdin](https://docs.nika.sh/reference/language/words/stdin.md)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/schemas/workflow.schema.json)

## In a source template

Excerpt from `templates/docker-report.nika`, source lines 49–58. This is a fragment, not a runnable workflow.

```yaml illustration theme={"system"}
      # SLOT: argv ARRAY form — one program, exactly these arguments. The array
      # is why there is no shell here: no word-splitting, no globbing, nothing
      # to quote wrong. `permits.exec` above is the provable allowlist.
      command: ["docker", "ps", "--all", "--format", "{{.Names}}\t{{.Status}}\t{{.Image}}"]
    on_error:
      # Offline rehearsal · a host with no daemon answers with a literal that
      # LOOKS like the real thing, so `diagnose` reads the same shape either
      # way. Delete this once the daemon is really there.
      recover: "REHEARSAL\tno docker daemon on this host\tn/a"

```

### Templates containing this field

| Template | Source |
| - | - |
| `templates/docker-report.nika` | [Line 52](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/docker-report.nika#L52) |
| `templates/human-gated-ship.nika` | [Line 111](https://github.com/supernovae-st/nika-spec/blob/4e259e5b8012fcdf92f094142a52dfef24099b85/templates/human-gated-ship.nika#L111) |

These are literal key occurrences in the source files, not an execution or conformance claim. [How to instantiate a template](https://docs.nika.sh/guides/templates.md).

## Contract and implementation

This page projects the named specification revision. Check [released engine status](https://docs.nika.sh/reference/status.md) and [the validation workflow](https://docs.nika.sh/guides/agent-authoring.md) before running a file. An optional field is not evidence that every engine supports every value.

Canonical identity: `language:word:command`. Spec revision: [`4e259e5b8012`](https://github.com/supernovae-st/nika-spec/tree/4e259e5b8012fcdf92f094142a52dfef24099b85).

[How documentation stays connected](https://docs.nika.sh/reference/knowledge-system.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.