# `Vibe.Command`
[🔗](https://github.com/elixir-vibe/vibe/blob/v0.2.3/lib/vibe/command.ex#L1)

Supervised OS command execution for eval sessions and agents.

Commands run under Vibe's command supervisor instead of as untracked shell
calls. Use `run/2` for bounded synchronous commands and `start/2` for long
running jobs whose status, output, and cancellation should remain inspectable.

Eval sessions alias this module as `Cmd`. Prefer `Cmd.run/2` and `Cmd.start/2`
over raw `System.cmd/3` so command output can stream into the UI and cleanup is
tied to Vibe's supervised runtime.

# `await`

```elixir
@spec await(Vibe.Command.Job.t() | pid(), timeout()) ::
  Vibe.Command.Result.t() | {:error, term()}
```

# `cancel`

```elixir
@spec cancel(Vibe.Command.Job.t() | pid()) ::
  Vibe.Command.Result.t() | {:error, term()}
```

# `output`

```elixir
@spec output(
  Vibe.Command.Job.t() | pid(),
  keyword()
) :: String.t() | {:error, term()}
```

# `run`

```elixir
@spec run(
  [String.Chars.t()],
  keyword()
) :: Vibe.Command.Result.t() | {:error, term()}
```

# `start`

```elixir
@spec start(
  [String.Chars.t()],
  keyword()
) :: {:ok, Vibe.Command.Job.t()} | {:error, term()}
```

# `status`

```elixir
@spec status(Vibe.Command.Job.t() | pid()) ::
  Vibe.Command.Result.t() | {:error, term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
