# `LlmCore.Config.Editor`
[🔗](https://github.com/fosferon/llm_core/blob/v0.3.0/lib/llm_core/config/editor.ex#L1)

Helpers for reading and mutating `llm_core.toml` files.

The editor focuses on the project-level file but accepts custom paths so
callers (mix tasks, tests) can operate on ad-hoc configs without touching
user data.

# `default_path`

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

Returns the default path to the project-level `llm_core.toml` file.

# `delete_path`

```elixir
@spec delete_path(map(), [String.t()]) :: map()
```

Removes the value at the given key path from `config`.

# `put_path`

```elixir
@spec put_path(map(), [String.t()], term()) :: map()
```

Sets a nested value in `config` at the given key path.

Creates intermediate maps as needed.

# `read`

```elixir
@spec read(String.t() | nil) :: {:ok, map()} | {:error, term()}
```

Reads and decodes the TOML configuration file at `path`.

Returns `{:ok, map()}` with the parsed contents, or `{:ok, %{}}` if the
file does not exist.

# `update`

```elixir
@spec update((map() -&gt; map()), String.t() | nil) :: {:ok, map()} | {:error, term()}
```

Reads the config at `path`, applies the transformation function `fun`, and
writes the result back.

Returns `{:ok, new_config}` on success.

# `write`

```elixir
@spec write(map(), String.t() | nil) :: :ok | {:error, term()}
```

Encodes `map` as TOML and writes it to `path`, creating parent directories
as needed.

---

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