Installomator#
Warning
InstallomatorClient is deprecated and will be removed in a future release. For label
and match data, prefer PatcherClient /
PatcherAPIClient (set PATCHER_API_URL for
self-hosted catalogs). Constructing the client emits a DeprecationWarning.
See also
Catalog Sources for what each catalog source contributes.
- class InstallomatorClient(concurrency: int = 5, api: HTTPClient | None = None)[source]#
Discovers and fetches Installomator labels directly from upstream GitHub.
Deprecated since version Prefer:
PatcherClient/PatcherAPIClientfor label and match data (setPATCHER_API_URLfor self-hosted catalogs). This client will be removed in a future release.Wrapper around the Installomator project (the macOS automated-installer script set).
This class discovers and fetches Installomator labels. Discovery uses the lightweight
Labels.txtfile at the Installomator repo root; individual.shfragments are fetched lazily.- 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 freshHTTPClient. No Jamf credentials required, so callers can useInstallomatorClient()standalone to enumerate or fetch labels.
- static purge_legacy_disk_cache() bool[source]#
Remove the legacy on-disk Installomator label cache if present.
Older versions persisted parsed label fragments under
~/Library/Application Support/Patcher/.labelswith no expiration or invalidation. That cache is gone; this best-effort sweep deletes any leftover directory so stale fragments don’t linger. Safe to call when the directory is absent.- Returns:
True if a directory was removed, False if there was nothing to remove or removal failed (failures are logged, not raised).
- Return type:
- 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:
- 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:
Instance (session) cache (
self._labels_by_name)HTTP fetch from
_FRAGMENT_URL_TEMPLATE
- 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
Labelobjects. 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.