# `HfHub.Config`
[🔗](https://github.com/North-Shore-AI/hf_hub_ex/blob/v0.3.1/lib/hf_hub/config.ex#L1)

Configuration utilities for HfHub.

Provides functions to access and manage configuration settings.

# `cache_dir`

```elixir
@spec cache_dir() :: Path.t()
```

Gets the cache directory path from application configuration.

Per Elixir runtime-configuration best practices, this library no longer
reads `HF_HUB_CACHE` or `HF_HOME` from the OS environment directly.
Hosts wire env vars into `Application.put_env(:hf_hub, :cache_dir, ...)`
from their `config/runtime.exs`. See the `HfHub` moduledoc for the
recommended snippet.

Falls back to the default `~/.cache/huggingface` if no app-env value is
set.

## Examples

    cache_dir = HfHub.Config.cache_dir()
    # => "/home/user/.cache/huggingface"

# `cache_opts`

```elixir
@spec cache_opts() :: keyword()
```

Gets cache options.

## Examples

    opts = HfHub.Config.cache_opts()

# `endpoint`

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

Gets the HuggingFace Hub endpoint URL.

Defaults to "https://huggingface.co".

## Examples

    endpoint = HfHub.Config.endpoint()
    # => "https://huggingface.co"

# `http_opts`

```elixir
@spec http_opts() :: keyword()
```

Gets HTTP client options.

## Examples

    opts = HfHub.Config.http_opts()

---

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