# `CodexWrapper.Config`
[🔗](https://github.com/genagent/codex_wrapper_ex/blob/v0.5.3/lib/codex_wrapper/config.ex#L1)

Shared client configuration for the Codex CLI.

Holds binary path, working directory, environment variables, and default
options that apply across all commands.

## Usage

    config = CodexWrapper.Config.new()
    config = CodexWrapper.Config.new(working_dir: "/path/to/project")

# `t`

```elixir
@type t() :: %CodexWrapper.Config{
  binary: String.t(),
  env: [{String.t(), String.t()}],
  timeout: pos_integer() | nil,
  verbose: boolean(),
  working_dir: String.t() | nil
}
```

# `base_args`

```elixir
@spec base_args(t()) :: [String.t()]
```

Build the base command args from config (global flags).

# `cmd_opts`

```elixir
@spec cmd_opts(t()) :: keyword()
```

Build the cmd options (working dir, env) for `System.cmd`.

# `find_binary`

```elixir
@spec find_binary() :: String.t()
```

Find the codex binary path.

Checks in order:
1. `CODEX_CLI` environment variable
2. System PATH

# `new`

```elixir
@spec new(keyword()) :: t()
```

Create a new config from keyword options.

## Options

  * `:binary` - Path to the codex binary (default: auto-discover)
  * `:working_dir` - Working directory for the subprocess
  * `:env` - List of `{key, value}` environment variable tuples
  * `:timeout` - Command timeout in milliseconds
  * `:verbose` - Enable verbose output

# `stream_opts`

```elixir
@spec stream_opts(t()) :: keyword()
```

Build the runner options for a streaming run.

Same shape as `cmd_opts/1` but with `stderr_to_stdout: false`: the
streaming paths parse NDJSON off stdout, and merging stderr into it
would put unparseable lines in the stream. Stderr is left to flow to
the parent's stderr.

---

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