Botica.Batteries.LlamaServer.Installer (Botica v2.2.0)

Copy Markdown View Source

Downloads a precompiled llama-server binary into a stable install directory (~/models/llama-server by default, override with LLAMA_INSTALL_DIR) so subsequent runs don't re-download.

Detects OS + arch and picks the matching release artifact URL. Linux x86_64 and macOS arm64 are supported today; other platforms raise :unsupported_platform.

Summary

Types

Subcommand outcome.

Functions

Absolute path to the binary inside install_dir/0.

Downloads and unzips the binary for the current platform. Idempotent: returns :already_installed if binary_path/0 exists.

Where precompiled binaries live.

True when a precompiled binary exists at binary_path/0.

Types

result()

@type result() :: :already_installed | :downloaded | {:error, term()}

Subcommand outcome.

Functions

binary_path()

@spec binary_path() :: String.t()

Absolute path to the binary inside install_dir/0.

install(opts \\ [])

@spec install(keyword()) :: result()

Downloads and unzips the binary for the current platform. Idempotent: returns :already_installed if binary_path/0 exists.

install_dir()

@spec install_dir() :: String.t()

Where precompiled binaries live.

not_installed?()

@spec not_installed?() :: boolean()

True when a precompiled binary exists at binary_path/0.