This tap ships the Hive contribute app as a one-command install:
brew install hivecommons/hive/contribute
hive-contributeIt exists so that contributing to a Hive does not require cloning a repository
first. The formula wraps the published ghcr.io/hivecommons/hive-contributor
container image, converted to a self-contained Apptainer
SIF for Linux, with documented Docker/Podman/Lima fallbacks for platforms where
Apptainer is not native.
The two open Phase 2 inputs from hivecommons/hive#6635 are resolved
for this tap:
- Binary name: formula
contribute(brew install hivecommons/hive/contribute) installshive-contribute. The ClankeR nickname is intentionally not part of the installed command. - Channel policy:
contributetracks thestableimage channel, resolved to an immutable digest when the formula is generated. The conversion workflow can also generatecontribute-candidate, installinghive-contribute-candidate, from thecandidatechannel; it is labelled as pre-release and is not the default install path.
This tap is the downstream half of a two-repo split ratified in
hivecommons/hive → docs/contribute-distribution-roadmap.md:
| Repo | Owns |
|---|---|
hivecommons/hive |
the contributor OCI image ghcr.io/hivecommons/hive-contributor, published multi-arch by digest with immutable short-SHA tags plus stable, candidate, and latest channels; its size and reproducibility; documentation of the install path |
| this repo | the Apptainer conversion, the generated formulae, and the release automation that publishes them |
Upstream's only contract to this tap is a stable image reference and
tag/digest discipline. That precondition is satisfied, so the tap workflow can
pin stable by digest and convert that exact image.
The practical consequence: Formula/ is generated output. If a formula is
wrong, fix scripts/generate-formula.py or .github/workflows/convert.yml, not
the generated artifact.
- Linux: Apptainer runs natively on Linux. Homebrew-on-Linux has an
apptainerformula, andFormula/contribute.rbdepends on it. The wrapper runs the generated SIF withapptainer run --containall --writable-tmpfs, binds a workspace plus Hive/CLI credential directories, and forwards Hive, GitHub, and backend provider environment variables. - macOS: Apptainer is not native; it needs a Linux VM. Lima has an
Apptainer template (
limactl create --name=apptainer --mount-writable template://apptainer). The wrapper defaults to Docker or Podman if available and supportsHIVE_CONTRIBUTE_RUNTIME=limafor operators who have created a Lima Apptainer VM. Caveat: the Lima path runs the pinned OCI image reference inside the VM rather than the local SIF asset unless the user shares the Homebrew Cellar into Lima. It forwards the same environment (including the HTTPS git credential helper) and honours the sameHIVE_CONTRIBUTE_MOUNT_*opt-ins as the Linux Apptainer path. This requires Lima to share your home directory into the VM at the same path writable: Lima's default home share is read-only, so create the VM with--mount-writable(or setmounts: - location: "~"/writable: truein the instance config); otherwise the workspace and state binds are read-only inside the VM. - Windows: use WSL2 and the Linux path (
brewon Linux + Apptainer), or run Docker/Podman manually with the pinned image digest from the formula caveats. - KVM/gVisor: the earlier roadmap wording overstated this. Apptainer's
normal SIF runtime does not auto-detect KVM or switch to gVisor. gVisor is
available only through an OCI runtime such as Docker/Podman configured with
runsc; setHIVE_CONTRIBUTE_RUNTIME=gvisorto ask the wrapper to pass--runtime=runsc. Any KVM/platform choice is controlled by the host's gVisor configuration, not by this tap. The fallback is Apptainer on Linux, then Docker/Podman/Lima on macOS.
The wrapper forwards the inputs the contributor relay needs:
- Hive registration and routing:
HIVE_HUB,HIVE_REGISTRATION_TOKEN,HIVE_SESSION,HIVE_AGENT_ROLE, and otherHIVE_*variables. - Backend choice:
AGENT_BACKEND,AGENT_MODEL,AGENT_REASONING_EFFORT, andCONTRIBUTOR_MODE. - GitHub auth:
GH_TOKEN(orGITHUB_TOKEN, copied toGH_TOKENwhen needed) and read-only~/.gitconfigwhen present. Git inside the container uses HTTPS with the forwarded token through an env-configured credential helper (GIT_CONFIG_*); without a token, authenticated clones and pushes fail and the wrapper warns on stderr.~/.sshand~/.config/ghare not mounted by default; opt in withHIVE_CONTRIBUTE_MOUNT_SSH=1(read-only~/.ssh) and/orHIVE_CONTRIBUTE_MOUNT_GH=1(~/.config/gh). A~/.gitconfiginsteadOfrule that rewriteshttps://github.com/to SSH bypasses the helper and needsHIVE_CONTRIBUTE_MOUNT_SSH=1. - Backend credentials/config: Claude, Copilot, Codex, Goose, Muse, Bob, OMP, Pi,
Kilo, Gemini/Google, OpenAI, Anthropic, Azure, AWS, LiteLLM, Ollama, Groq, and
xAI environment variables matching the wrapper allow-list, plus the common
credential directories under
$HOME. - Workspace:
${HIVE_WORKSPACE_DIR:-$PWD}is bound read-write to/home/dev/workspaceand exported asHIVE_WORKSPACE_DIRinside the container. Because that bind would carry every credential directory under$HOMEinto the container, the wrapper refuses to start (exit 2) when the workspace resolves to$HOME, an ancestor of it, or/— for example when run from your home directory, or via.,..or a symlink that lands there. Run it from a project directory or setHIVE_WORKSPACE_DIR;HIVE_CONTRIBUTE_ALLOW_HOME_WORKSPACE=1overrides.
The wrapper creates these host directories as needed and mounts them read-write across container runs (Apptainer, Docker/Podman, and Lima):
| Host override | Default | Container path |
|---|---|---|
HIVE_CONTRIBUTOR_CONFIG_DIR |
~/.config/hive |
/home/dev/.config/hive (re-exported as HIVE_CONTRIBUTOR_CONFIG_DIR inside the container) |
HIVE_CONTRIBUTE_STATE_DIR |
~/.local/state/hive/contribute |
home/ → /home/dev/.local/state/hive; metrics/ → /var/run/hive-metrics |
For example, to keep a separate contributor profile:
HIVE_CONTRIBUTOR_CONFIG_DIR="$HOME/.config/hive-profile" \
HIVE_CONTRIBUTE_STATE_DIR="$HOME/.local/state/hive/profile" \
hive-contributeFor Lima, these paths must also be shared into the VM at the same path and be
writable. Lima temporarily stores a mode-0600 lima-env.* file containing the
forwarded environment in the state directory and removes it when limactl exits.
These diagnostic flags do not launch the relay; pass each as the first argument:
hive-contribute --wrapper-versionprints the wrapper version, channel, and pinned image reference, then exits. The version is<YYYYMMDD>.<HHMMSS>.<digest12>: the UTC time the formula was generated, then the first 12 hex characters of the image digest. The time prefix makes every regeneration sort above the previous one, sobrew upgradealso picks up wrapper changes published under an unchanged image digest.hive-contribute --wrapper-print-runtimeprints the selected runtime, ornonewith exit status 1 when none is found. This is a selection diagnostic, not a runtime health check: Linux's automatic selection reportsapptainerwithout checking that it is installed. It still creates the directories above.hive-contribute --help(or-h) prints wrapper usage.
.github/workflows/convert.yml runs every six hours, on manual dispatch, on
repository dispatch from upstream promotion automation, and on pushes to main
that change the generator inputs (scripts/generate-formula.py,
scripts/contribute-wrapper.sh.in, or the workflow itself), so formula changes
are regenerated without waiting for the cron. Push runs behave like force:
they rebuild and republish the current stable release. It:
- resolves
ghcr.io/hivecommons/hive-contributor:<channel>to an immutable digest; - exits when the release for that digest already exists;
- builds
amd64andarm64SIF assets on native GitHub runners; - refuses assets at or above GitHub's 2 GB release-asset limit;
- publishes a
contribute-<digest>release (orcontribute-candidate-<digest>); - regenerates the formula with per-arch URLs and SHA-256 values;
- validates the generated formula with the same commands as
Tap CI(brew style,brew audit --strict --new,brew install --build-from-source,brew test) against the just-published release; - opens a PR for the generated formula.
The workflow pins third-party GitHub Actions by full commit SHA and uses only
contents: write / pull-requests: write permissions.
scripts/test_generate_formula.py renders the formula with fixed inputs and
runs the embedded hive-contribute wrapper against stub apptainer, docker,
podman and limactl binaries; a stub uname reporting Darwin drives the
macOS auto dispatch (docker → podman → Lima) on Linux. It needs only Python 3
(the ruby -c case is skipped when Ruby is absent):
python3 -m unittest discover -s scripts -p 'test_*.py' -v- Do not edit
Formula/contribute.rbby hand; it is generated. Changescripts/generate-formula.py,scripts/contribute-wrapper.sh.in, or.github/workflows/convert.ymlinstead, and run the generator tests (see Testing the generator) before opening a PR. - Sign off every commit (
git commit -s) to satisfy the Developer Certificate of Origin check. - Generated formula PRs (
generated/contribute-*branches) are opened by the conversion workflow; review them, do not push to them.
If a generated formula installs a bad image, follow
runbooks/rollback.md. If new upstream images are not
reaching the tap, follow runbooks/convert-stalled.md.
After either incident, record it with
runbooks/postmortem-template.md.
Use the from-source flow documented in the hive README (just contribute-hive). It remains supported after this tap lands — the tap is an
additional on-ramp, not a replacement.