Skip to content

ohbin 0.1.0

Choose a tag to compare

@prostomarkeloff prostomarkeloff released this 29 May 08:00
· 13 commits to main since this release

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 (API digest, else download+hash), and writes [tool.ohbin.tools.*] into your pyproject (comments preserved via tomlkit).
  • ohbin run <tool> -- <args> — download-on-first-use, then execv (signals/exit codes forward transparently). Plus which / list, and an in-process ensure() 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.