abxpkg is the binary/package provider library and CLI for resolving, installing, updating, running, and inspecting runtime dependencies. Keep this repo on main.
- Use
uvanduv runfor Python commands. Do not use systempython, direct.venv/bin/python, orpipcommands. - Prefer existing repo patterns, helper APIs, fixtures, scripts, and command surfaces.
- Keep edits focused and minimal. Do not add wrappers, shims, aliases, or extra abstraction layers unless the current code path requires them.
- Do not weaken assertions, skip tests, xfail tests, or accept flaky behavior.
- No mocks, monkeypatches, fakes, simulated handlers, fake binaries, fake providers, fake install processes, or direct shortcuts around user-facing flows.
- Tests and verification should use real CLI commands, real providers, real installs, real subprocesses, real package metadata, real files, and existing fixtures.
- Assertions must verify real correctness: exit codes, binary paths, versions, provider state, installed metadata, filesystem contents, env output, and side effects.
- Start behavior fixes with a red failing test when a test is requested or practical.
- Trace root causes from observed behavior. Do not paper over failures with retries, wider timeouts, broad fallbacks, or looser assertions.
- Read
README.mdfor the full provider, CLI, Python API, config, and release surface. - Before changing
env, path resolution or caching, read the provider cache design. It records the ownership, runtime and invalidation boundaries that previous fixes established.
uv sync
uv run abxpkg --help
uv run abxpkg versionuv tool install abxpkg
abxpkg versionuv run abxpkg load wget
uv run abxpkg install yt-dlp
uv run abxpkg run wget --version
uv run abxpkg env yt-dlp
uv run abxpkg search chromium
uv run abx yt-dlp --helpPython API:
from abxpkg import Binary, env, apt, brew
wget = env.load("wget") or apt.install("wget") or brew.install("wget")
binary = Binary(name="wget", binproviders=[env, apt, brew]).install()
print(binary.abspath, binary.version, binary.is_valid)Use targeted tests and real providers with uv run pytest tests/test_cli.py -q,
and run formatting, lint, and type checks with uv run prek run --all-files.
Keep test and lint invocations inline in documentation. Executable documentation blocks exercise product usage; invoking pytest or prek inside them recursively duplicates the discovered tests and checks without adding product coverage.
Provider-specific logic belongs in provider classes. Shared provider infrastructure should stay provider-agnostic.