Skip to content

Commit b64638a

Browse files
committed
Add Homebrew install path
Publishes an oss-back2base formula into the existing back2base/homebrew-back2base tap, so users can install via: brew install back2base/back2base/oss-back2base - .goreleaser.yml: new brews stanza writing the formula on tag push, with skip_upload templated on HOMEBREW_TAP_GITHUB_TOKEN so a missing PAT skips only the formula publish (binaries + .deb still ship). Caveats walk first-run users through pre-pulling the base image and seeding ~/.config/back2base/env. - release.yml: pass HOMEBREW_TAP_GITHUB_TOKEN through to goreleaser. - README: new Install section listing Homebrew, .deb, pre-built binary, and from-source paths in that order. Quickstart drops the ./ prefix on the binary (users on PATH get `oss-back2base` directly). Verified via `goreleaser release --snapshot --clean --skip=publish`: formula renders cleanly with the correct download URLs, sha256s, arch gating, docker dependency, and a `version` smoke test. NOTE: requires HOMEBREW_TAP_GITHUB_TOKEN repo secret (PAT with `repo` scope on back2base/homebrew-back2base) for the next tag push to publish the formula. Without it, the brew step is skipped silently.
1 parent fffe311 commit b64638a

3 files changed

Lines changed: 72 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ jobs:
2929
args: release --clean
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
# PAT with `repo` scope on back2base/homebrew-back2base.
33+
# When absent, goreleaser skips the brew publish via the
34+
# disable: condition in .goreleaser.yml; binaries still ship.
35+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,44 @@ archives:
2626
formats: ['tar.gz']
2727
name_template: "oss-back2base_{{ .Os }}_{{ .Arch }}"
2828

29+
brews:
30+
- name: oss-back2base
31+
# Publish into the shared back2base tap. Lives alongside the
32+
# proprietary `back2base` formula; users install with
33+
# brew install back2base/back2base/oss-back2base
34+
repository:
35+
owner: back2base
36+
name: homebrew-back2base
37+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
38+
directory: Formula
39+
homepage: "https://github.com/back2base/oss-back2base"
40+
description: "Containerized Claude Code with a configurable MCP server registry (OSS)"
41+
license: "MIT"
42+
# Skip the formula push when the tap PAT isn't configured (e.g.
43+
# community forks releasing under their own tap or local snapshot
44+
# builds). Binaries + .deb still publish.
45+
skip_upload: "{{ if eq .Env.HOMEBREW_TAP_GITHUB_TOKEN \"\" }}true{{ else }}false{{ end }}"
46+
install: |
47+
bin.install "oss-back2base"
48+
caveats: |
49+
oss-back2base launches a containerized Claude Code session.
50+
51+
First run extracts the embedded container payload to
52+
~/.local/share/back2base and builds the image (~500 MB pull
53+
plus a thin local layer). To pre-fetch the base image:
54+
55+
docker pull ramseymcgrath/back2base-base:latest
56+
oss-back2base build
57+
58+
Drop your Anthropic credentials into ~/.config/back2base/env
59+
before the first launch. See env.example in the repo for the
60+
full catalog.
61+
test: |
62+
system "#{bin}/oss-back2base", "version"
63+
dependencies:
64+
- name: docker
65+
type: optional
66+
2967
nfpms:
3068
- id: oss-back2base
3169
package_name: oss-back2base

README.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,52 @@ This repository is the open-source slice: the Go CLI, the Docker container paylo
2424
## Requirements
2525

2626
- Docker (Desktop, Colima, or any compatible daemon)
27-
- Go 1.23+ (only needed to build from source; release binaries are available on the [Releases page](https://github.com/back2base/oss-back2base/releases))
2827
- An Anthropic credential — either a Claude Code OAuth token (uses your subscription) or an `ANTHROPIC_API_KEY`
2928

30-
## Quickstart
29+
## Install
30+
31+
### Homebrew (macOS / Linux)
3132

3233
```bash
33-
# 1. Build (or download a release binary from the Releases page)
34-
go build -o oss-back2base .
34+
brew install back2base/back2base/oss-back2base
35+
```
36+
37+
### Debian / Ubuntu
38+
39+
Download `oss-back2base_<version>_linux_<arch>.deb` from the [Releases page](https://github.com/back2base/oss-back2base/releases) and install it:
40+
41+
```bash
42+
sudo dpkg -i oss-back2base_*_linux_amd64.deb
43+
```
44+
45+
### Pre-built binary
3546

36-
# 2. Authenticate. Either:
47+
Grab the matching tarball from the [Releases page](https://github.com/back2base/oss-back2base/releases), extract `oss-back2base`, and move it onto your `$PATH`.
48+
49+
### From source
50+
51+
```bash
52+
go build -o oss-back2base . # requires Go 1.23+
53+
```
54+
55+
## Quickstart
56+
57+
```bash
58+
# 1. Authenticate. Either:
3759
claude setup-token # OAuth, uses your Claude subscription
3860
# …or grab an Anthropic API key from https://console.anthropic.com
3961

40-
# 3. Drop the credential into the env file
62+
# 2. Drop the credential into the env file
4163
mkdir -p ~/.config/back2base
4264
cat > ~/.config/back2base/env <<'EOF'
4365
BACK2BASE_CLAUDE_CODE_OAUTH_TOKEN=<paste-token-here>
4466
# or, if using an API key instead:
4567
# BACK2BASE_ANTHROPIC_API_KEY=sk-ant-...
4668
EOF
4769

48-
# 4. Launch. First run extracts the container payload to ~/.local/share/back2base
70+
# 3. Launch. First run extracts the container payload to ~/.local/share/back2base
4971
# and builds the image (~500 MB pull + a thin local layer).
50-
./oss-back2base
72+
oss-back2base
5173
```
5274

5375
Other useful entry points:

0 commit comments

Comments
 (0)