ohbin 0.1.0
Declarative GitHub-release binaries for uv projects. Declare native CLI tools in pyproject.toml; ohbin downloads them on first use, SHA256-verifies against pinned hashes, caches per host, and execs them. One dev-dependency, any number of tools — no per-tool wrapper packages to copy between repos.
Install
[dependency-groups]
dev = ["ohbin"]
[tool.uv.sources]
ohbin = { git = "https://github.com/prostomarkeloff/ohbin.git", tag = "v0.1.0" }Highlights
ohbin add owner/repo— resolves a GitHub release, matches one asset per platform (linux/darwin × x86_64/arm64), pins each SHA256 (APIdigest, else download+hash), and writes[tool.ohbin.tools.*]into your pyproject (comments preserved via tomlkit).ohbin run <tool> -- <args>— download-on-first-use, thenexecv(signals/exit codes forward transparently). Pluswhich/list, and an in-processensure()API.- Resilient — retry-with-backoff on transient network / timeout / 5xx / rate-limit / truncated-stream failures; a clean 404 is never mistaken for a transient error.
- Integrity — every download SHA256-checked before extraction; atomic install under
flock(safe under parallel CI).
Notes
- POSIX only (uses
fcntl.flock). - Requires Python ≥ 3.11.