Oratos (oratos v0.3.1)

Copy Markdown View Source

Manages the native Oratos CLI for Elixir and Phoenix projects.

Oratos audits rendered HTML for SEO, accessibility, structured data, and LLM readiness. This Hex package downloads a prebuilt binary from GitHub Releases — it does not parse HTML inside the BEAM.

Quick start (Phoenix)

# mix.exs — not needed in production
{:oratos, "~> 0.3.1", only: [:dev, :test], runtime: false}

mix deps.get
mix assets.deploy && mix phx.digest && mix phoenix.prerender
mix oratos.audit ./priv/static --fail-under 85

See the Hex package README for Mix aliases, CI, oratos.toml, and how Oratos relates to phoenix_seo.

Configuration

config :oratos,
  version: "0.3.1",
  # path: "/usr/local/bin/oratos",
  prefer_path: false

Summary

Functions

Path to the managed binary under this package's priv/bin directory.

Ensure the Oratos binary is present, downloading it if needed.

Ensure the Oratos binary is present, downloading it if needed.

Configured Oratos CLI version (without leading v).

Functions

binary_path()

Path to the managed binary under this package's priv/bin directory.

ensure_binary()

Ensure the Oratos binary is present, downloading it if needed.

Returns {:ok, path} or {:error, reason}.

Resolution order:

  1. config :oratos, path: "..." if set
  2. oratos on PATH when prefer_path: true
  3. Cached binary under priv/bin
  4. Download from GitHub Releases for version/0

ensure_binary!()

Ensure the Oratos binary is present, downloading it if needed.

Raises via Mix.raise/1 on failure.

version()

Configured Oratos CLI version (without leading v).