Installomator¶

See also

Catalog Sources for what each catalog source contributes.

class InstallomatorClient(concurrency: int = 5, api: HTTPClient | None = None)[source]¶

Wrapper around the Installomator project (the macOS automated-installer script set).

This class provides methods for discovering, fetching, and matching Installomator labels to PatchTitle objects. Discovery uses the lightweight Labels.txt file at the Installomator repo root; individual .sh fragments are fetched lazily and only for matches.

Parameters:
  • concurrency (int) – Maximum concurrent requests for label fetches. Defaults to 5.

  • api (HTTPClient | None) – HTTP client used for fetches against Installomator’s GitHub. Defaults to a fresh HTTPClient. No Jamf credentials required, so library callers can use InstallomatorClient() standalone to enumerate or fetch labels. When match() is needed, pass a configured JamfClient instead (it inherits from HTTPClient and adds the Jamf-specific get_app_names() call that match() requires). PatcherClient injects its shared JamfClient automatically.

async list_available_labels() set[str][source]¶

Return the set of every label name currently available in Installomator.

Fetches and parses _LABELS_TXT_URL. The result is cached on the instance for the session; subsequent calls do not re-fetch.

Returns:

A set of label script names (e.g. {"googlechrome", "1password8", ...}).

Return type:

set[str]

Raises:

PatcherError – If the labels file cannot be fetched.

async get_label(name: str) Label | None[source]¶

Fetch and parse a single Installomator label by script name.

Lookup order:

  1. Instance cache (self._labels_by_name)

  2. On-disk cache (~/Library/Application Support/Patcher/.labels/<name>.sh)

  3. HTTP fetch from _FRAGMENT_URL_TEMPLATE

Parameters:

name (str) – The Installomator script name (e.g. "googlechrome"). Case-insensitive; normalized to lowercase before lookup.

Returns:

The constructed Label object, or None if the fragment cannot be fetched, is ignored by Team ID, or fails validation.

Return type:

Label | None

async get_labels(names: Iterable[str] | None = None) list[Label][source]¶

Fetch and parse multiple Installomator labels in parallel.

Parameters:

names (Iterable[str] | None) – Specific label script names to fetch. If None (the default), fetches every label listed in _LABELS_TXT_URL, typically ~700 HTTP calls on first run and served from disk cache on subsequent runs. Prefer passing a concrete name list when you know what you need.

Returns:

List of successfully parsed Label objects. Labels that fail to fetch, hit an ignored Team ID, or fail validation are silently omitted (warnings are logged).

Return type:

list[Label]

InstallomatorClient covers label discovery and fetch: list_available_labels(), get_label(), get_labels(). The match algorithm itself lives at module level in patcher.core.matching so other backends can exercise it without instantiating the client.

Note

The shell-pipeline resolver that historically lived alongside InstallomatorClient (resolve, _exec_*, is_shell_expression, looks_like_clean_http_url, Resolved/Unresolvable/InvalidOutput) moved to patcher_api.installomator.resolver as part of the Patcher API workspace. Resolution is an ingest concern; the patcher package consumes resolved values via the API rather than running pipelines itself.