# `Laev.Doctor`
[🔗](https://github.com/alexdont/laev/blob/main/lib/laev/doctor.ex#L1)

Health checks for `laev doctor` and live key validation for `laev setup`.

Every check returns `{:ok, detail}` or `{:error, detail}` — the CLI owns
the presentation. Service checks are run concurrently with per-check
timeouts so a dead service can't hang the whole report.

# `check_rd`

Validate a Real-Debrid token against /user. {:ok, "alexdont · premium · 143 days left"}.

# `check_tmdb`

Validate a TMDB key (v3 api_key or v4 bearer) against /configuration.

# `check_torbox`

Validate a TorBox API key against /user/me. {:ok, "essential plan"}.

# `check_vlc_codecs`

Whether VLC can actually decode the things laev hands it.

VLC's own package is a shell: on most Linux distributions the codecs live in
separate packages, and a VLC installed without them opens a window and then
refuses the file — "could not decode the format hevc" — for the h265/TrueHD/
AC3/PGS that debrid releases are full of. Nothing about that looks like a
player problem until you know to look for it, so laev looks.

The signal is libavcodec, which is where VLC gets nearly every format it
understands. Where the plugin directory can't be found at all — macOS, where
it lives inside the bundle, or a distribution that lays it out differently —
nothing is claimed either way.

# `run`

Run every applicable check concurrently. Returns `{results, healthy?}`:
results are `{section, name, :ok | :error | :skip, detail}` in display
order; `healthy?` is false when a required piece is broken.

---

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