An ORM for your package managers.

abxpkg

A Python library for installing & managing packages locally with a variety of package managers. Great for when requirements.txt isn't enough and you need to detect or install dependencies at runtime โ€” across apt, brew, pip, uv, npm, pnpm, yarn, bun, deno, cargo, gem, go, nix, docker, bash, playwright, puppeteer, and more.

aptbrewpipuvnpmpnpmyarnbundenocargogemgogetnixdockerbashchromewebstorepuppeteerplaywrightpyinfraansibleenv
21 BinProviders
231 Config fields
37 Env vars

Quick Start

Pick a provider below to auto-fill an example command, or use abxpkg directly from the CLI.

Selected provider abxpkg
Expand to see install + library usage
pip install abxpkg
# or
uv tool add abxpkg

# CLI
abxpkg --version
abxpkg version
abxpkg list
abxpkg install yt-dlp
abxpkg update yt-dlp
abxpkg uninstall yt-dlp
abxpkg load yt-dlp

# Select specific providers / re-order provider precedence
abxpkg install --binproviders=env,uv,pip,apt,brew prettier
env ABXPKG_BINPROVIDERS=env,uv,pip,apt,brew abxpkg install yt-dlp

# Customize install location
abxpkg --lib=~/my-abx-lib install yt-dlp
env ABXPKG_LIB_DIR=/tmp/abxlib abxpkg install yt-dlp

# Dry-run mode
abxpkg install --dry-run some-package
env ABXPKG_DRY_RUN=1 abxpkg install some-package
21 / 21 visible

PATH Fallback

1 provider(s)

System / OS

4 provider(s)

Language Ecosystem

10 provider(s)

Browser Runtime

3 provider(s)

Shell Scripts

1 provider(s)

Orchestrator

2 provider(s)

Global Environment Variables

These env vars are read once at import time and apply across every provider (or to the abxpkg CLI itself). Explicit constructor kwargs always override these defaults.

Variable Default Effect
ABXPKG_DRY_RUN 0 Flips the shared dry_run default. Provider subprocesses are logged and skipped, install()/update() return a placeholder, uninstall() returns True. Beats DRY_RUN if both are set.
DRY_RUN 0 Alternative dry-run toggle. ABXPKG_DRY_RUN wins if both are set.
ABXPKG_NO_CACHE 0 Flips the shared no_cache default. install() skips the initial load() check and forces a fresh install path; load()/update()/uninstall() bypass cached probe results.
ABXPKG_INSTALL_TIMEOUT 120 Seconds to wait for install()/update()/uninstall() handler subprocesses.
ABXPKG_VERSION_TIMEOUT 10 Seconds to wait for version / metadata probes (--version, npm show, pip show, etc.).
ABXPKG_POSTINSTALL_SCRIPTS unset Hydrates the provider-level default for postinstall_scripts on supporting providers (pip, uv, npm, pnpm, yarn, bun, deno, brew, chromewebstore, puppeteer). When unset, action execution falls back to the provider/action default.
ABXPKG_MIN_RELEASE_AGE 7 Hydrates the provider-level minimum release age (days) on supporting providers (pip, uv, npm, pnpm, yarn, bun, deno). When unset, action execution falls back to the provider/action default.
ABXPKG_BINPROVIDERS DEFAULT_PROVIDER_NAMES Comma-separated provider names to enable (and their order) for the abxpkg CLI. Defaults to DEFAULT_PROVIDER_NAMES from abxpkg.__init__. Example: env,uv,pip,apt,brew
ABXPKG_LIB_DIR <platform default abx lib dir> Centralized library root. When set, providers with abxpkg-managed install roots default to $ABXPKG_LIB_DIR/<provider name>. Accepts relative, tilde, and absolute paths. --global is a thin alias for --lib=None.