# `MuonTrap.Options`
[🔗](https://github.com/fhunleth/muontrap/blob/v2.0.0/lib/muontrap/options.ex#L8)

Validate and normalize the options passed to MuonTrap.cmd/3 and MuonTrap.Daemon.start_link/3

This module is generally not called directly, but it's likely
the source of exceptions if any options aren't quite right. Call `validate/4` directly to
debug or check options without invoking a command.

# `t`

```elixir
@type t() :: map()
```

The following fields are always present:

* `:cmd` - the command to run
* `:args` - a list of arguments to the command

The next fields are optional:

* `:into` - `MuonTrap.cmd/3` only
* `:cd`
* `:arg0`
* `:stderr_to_stdout`
* `:capture_stderr_only`
* `:parallelism`
* `:env`
* `:name` - `MuonTrap.Daemon`-only
* `:logger_fun` - `MuonTrap.Daemon`-only
* `:log_output` - `MuonTrap.Daemon`-only, ignored if logger_fun is set
* `:log_prefix` - `MuonTrap.Daemon`-only, ignored if logger_fun is set
* `:log_transform` - `MuonTrap.Daemon`-only, ignored if logger_fun is set
* `:logger_metadata` - `MuonTrap.Daemon`-only, ignored if logger_fun is set and doesn't call the Elixir Logger
* `:stdio_window`
* `:exit_status_to_reason` - `MuonTrap.Daemon`-only
* `:wait_for` - `MuonTrap.Daemon`-only
* `:cgroup`
* `:cgroup_path`
* `:cgroup_base`
* `:delay_to_sigkill`
* `:uid`
* `:gid`
* `:groups`
* `:timeout` - `MuonTrap.cmd/3` only

# `validate`

```elixir
@spec validate(:cmd | :daemon, binary(), [binary()], keyword()) :: t()
```

Validate options and normalize them for invoking commands

Pass in `:cmd` or `:daemon` for the first parameter to allow function-specific
options.

---

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