Skip to content

Commit 529d010

Browse files
authored
docs: install squad-oc from GitHub Releases without Go (#9)
Lead README, get-started, and the workshop with tagged binaries. Add Scoop bucket, Homebrew formula, and a winget singleton that pin xeaser/squad-opencode v0.4.0 assets. go build stays under Develop.
1 parent 8deef3d commit 529d010

9 files changed

Lines changed: 235 additions & 23 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Do not force-push to the default branch. Do not rewrite published tags.
5050
```
5151

5252
4. The release workflow checks the tag is on `origin/main`, waits for `ci`, then GoReleaser publishes.
53+
5. Refresh `Formula/squad-oc.rb`, `bucket/squad-oc.json`, and `packaging/winget/` from that tag's `checksums.txt` so package managers pin the new assets.
5354

5455
`go build` (and CI's compile job) report `dev`. GoReleaser injects the tag into `version.Version`, so `squad-oc version` on a release binary matches the tag. Do not edit `internal/version/version.go` to bump the version.
5556

‎Formula/squad-oc.rb‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
class SquadOc < Formula
2+
desc "Human-led AI agent teams for OpenCode"
3+
homepage "https://github.com/xeaser/squad-opencode"
4+
version "0.4.0"
5+
license "MIT"
6+
7+
on_macos do
8+
if Hardware::CPU.arm?
9+
url "https://github.com/xeaser/squad-opencode/releases/download/v0.4.0/squad-oc_0.4.0_darwin_arm64.tar.gz"
10+
sha256 "e2c662e3895a7b937aa0539b354fc6705dd56fdb833cd7222d63d07d4afb546b"
11+
else
12+
url "https://github.com/xeaser/squad-opencode/releases/download/v0.4.0/squad-oc_0.4.0_darwin_amd64.tar.gz"
13+
sha256 "ee6f9417b71e96904c8522299f8243d46a785b724b66d31c869051d734fd7777"
14+
end
15+
end
16+
17+
on_linux do
18+
if Hardware::CPU.arm?
19+
url "https://github.com/xeaser/squad-opencode/releases/download/v0.4.0/squad-oc_0.4.0_linux_arm64.tar.gz"
20+
sha256 "e8fa3657fb9b270fc87ef3f24c2236fa751664597245d2976124541933abaf21"
21+
else
22+
url "https://github.com/xeaser/squad-opencode/releases/download/v0.4.0/squad-oc_0.4.0_linux_amd64.tar.gz"
23+
sha256 "c54df6f427bc97b3fbf7a337fe9806e0a29bc69864f9c36133879d24e65a7c0a"
24+
end
25+
end
26+
27+
def install
28+
bin.install "squad-oc"
29+
end
30+
31+
test do
32+
assert_match version.to_s, shell_output("#{bin}/squad-oc version")
33+
end
34+
end

‎README.md‎

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,36 @@ One binary scaffolds a persistent team in your repo (`.squad/`) and OpenCode age
1010
> Inspired by [bradygaster/squad](https://github.com/bradygaster/squad) (MIT). OpenCode-native port — not a Copilot fork.
1111
> Host API client: official [opencode-sdk-go](https://github.com/anomalyco/opencode-sdk-go) (`github.com/sst/opencode-sdk-go`).
1212
13+
## Install
14+
15+
No Go toolchain. Download the archive for your OS from [GitHub Releases](https://github.com/xeaser/squad-opencode/releases/latest) and put `squad-oc` on your `PATH`. Assets are `squad-oc_<version>_<os>_<arch>.zip` (Windows) or `.tar.gz` (macOS/Linux).
16+
17+
```bash
18+
# Scoop
19+
scoop bucket add squad https://github.com/xeaser/squad-opencode
20+
scoop install squad-oc
21+
22+
# Homebrew
23+
brew tap xeaser/squad-opencode https://github.com/xeaser/squad-opencode
24+
brew install squad-oc
25+
26+
# winget (from a clone of this repo)
27+
winget install --manifest packaging/winget
28+
```
29+
30+
`squad-oc upgrade --self` replaces the binary from the latest release.
31+
1332
## Quick start
1433

1534
```bash
1635
# 1. Install OpenCode + /connect a provider — https://opencode.ai/docs/
1736

18-
# 2. Build squad-oc
19-
git clone <this-repo> && cd squad-opencode
20-
go build -o squad-oc ./cmd/squad-oc
21-
# optional: move squad-oc onto your PATH
37+
# 2. Install squad-oc from GitHub Releases (see Install above)
2238

2339
# 3. In your project
2440
mkdir my-app && cd my-app && git init
25-
/path/to/squad-oc init --preset default
26-
/path/to/squad-oc doctor
41+
squad-oc init --preset default
42+
squad-oc doctor
2743

2844
# Interactive TUI (does not listen on :4096)
2945
opencode

‎bucket/squad-oc.json‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": "0.4.0",
3+
"description": "Human-led AI agent teams for OpenCode",
4+
"homepage": "https://github.com/xeaser/squad-opencode",
5+
"license": "MIT",
6+
"architecture": {
7+
"64bit": {
8+
"url": "https://github.com/xeaser/squad-opencode/releases/download/v0.4.0/squad-oc_0.4.0_windows_amd64.zip",
9+
"hash": "7efffa39f33820db229cf5a7a2b1a5ff887b83b0c55df0553625aa0ecd5cc0d8"
10+
}
11+
},
12+
"bin": "squad-oc.exe",
13+
"checkver": "github",
14+
"autoupdate": {
15+
"architecture": {
16+
"64bit": {
17+
"url": "https://github.com/xeaser/squad-opencode/releases/download/v$version/squad-oc_$version_windows_amd64.zip"
18+
}
19+
},
20+
"hash": {
21+
"url": "https://github.com/xeaser/squad-opencode/releases/download/v$version/checksums.txt"
22+
}
23+
}
24+
}

‎docs/get-started.md‎

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Zero to first team. You do **not** need GitHub Copilot, Node, or the original Sq
1111
| Need | Why |
1212
|------|-----|
1313
| Terminal | Install and run tools |
14-
| **Go 1.26.6+** (to build `squad-oc`) | Or a prebuilt binary when published |
1514
| Git | Project + recommended for real work |
1615
| An LLM provider | OpenCode talks to a model |
1716

@@ -69,16 +68,31 @@ git commit -m "chore: initial commit"
6968

7069
---
7170

72-
## 4. Build and install `squad-oc`
71+
## 4. Install `squad-oc`
7372

74-
From this repository:
73+
You do **not** need Go. Download the archive for your OS from [GitHub Releases](https://github.com/xeaser/squad-opencode/releases/latest) and put `squad-oc` (`squad-oc.exe` on Windows) on your `PATH`. Assets are `squad-oc_<version>_<os>_<arch>.zip` (Windows) or `.tar.gz` (macOS/Linux).
74+
75+
**Scoop**
76+
77+
```powershell
78+
scoop bucket add squad https://github.com/xeaser/squad-opencode
79+
scoop install squad-oc
80+
```
81+
82+
**Homebrew**
7583

7684
```bash
77-
cd /path/to/squad-opencode
78-
go build -o squad-oc ./cmd/squad-oc
85+
brew tap xeaser/squad-opencode https://github.com/xeaser/squad-opencode
86+
brew install squad-oc
87+
```
88+
89+
**winget** (from a clone of this repo)
90+
91+
```powershell
92+
winget install --manifest packaging/winget
7993
```
8094

81-
Put the binary on your `PATH`, or call it with a full path.
95+
Update later with `squad-oc upgrade --self`.
8296

8397
Check:
8498

@@ -121,7 +135,6 @@ To refresh OpenCode agents/skills after a `squad-oc` update (team files stay put
121135
```bash
122136
squad-oc upgrade --dry-run
123137
squad-oc upgrade
124-
squad-oc upgrade --self
125138
```
126139

127140
Validate:
@@ -252,7 +265,7 @@ squad-oc status
252265
| No **squad** agent | `squad-oc init --preset default` in project root |
253266
| `Not initialized` | `squad-oc init --preset default` |
254267
| Server probe FAIL only | Soft check — run `opencode serve` for the HTTP API on :4096 |
255-
| Build fails | `go version` ≥ 1.26.6; `go mod tidy` |
268+
| `squad-oc: command not found` | Download a release binary; fix PATH |
256269

257270
---
258271

‎docs/use-cases.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Each original-Squad ease row is a **squad-oc command** you already ran, a **late
7070

7171
| Original ease | Mapping |
7272
|---------------|---------|
73-
| `npm i -g @bradygaster/squad-cli` | `go build -o squad-oc ./cmd/squad-oc` (put it on `PATH`) |
73+
| `npm i -g @bradygaster/squad-cli` | GitHub Releases / Scoop / Homebrew / winget (put `squad-oc` on `PATH`) |
7474
| `squad init` / `npx squad init` | `squad-oc init --preset default` |
7575
| `squad init` with a blurb | `squad-oc init --preset default --description "…"` |
7676
| Personal / global team | `squad-oc init --global` |

‎docs/workshop/README.md‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ Modeled on [Tamir's original-Squad workshop](https://github.com/tamirdresher/squ
3232
| Need | Why |
3333
|------|-----|
3434
| Terminal | Run tools |
35-
| **Go 1.26.6+** (to build `squad-oc`) | Or a prebuilt binary when published |
3635
| Git | Project + recommended for real work |
3736
| [OpenCode](https://opencode.ai) | Host TUI and `opencode serve` |
3837
| An LLM provider | OpenCode talks to a model |
@@ -74,16 +73,24 @@ Inside OpenCode:
7473
3. Paste your API key
7574
4. Quit when done
7675

77-
### Build `squad-oc` and put it on `PATH`
76+
### Install `squad-oc` and put it on `PATH`
7877

79-
From this repository:
78+
You do **not** need Go. Download the archive for your OS from [GitHub Releases](https://github.com/xeaser/squad-opencode/releases/latest) and put `squad-oc` (`squad-oc.exe` on Windows) on your `PATH`. Assets are `squad-oc_<version>_<os>_<arch>.zip` (Windows) or `.tar.gz` (macOS/Linux).
8079

8180
```bash
82-
cd /path/to/squad-opencode
83-
go build -o squad-oc ./cmd/squad-oc
81+
# Scoop
82+
scoop bucket add squad https://github.com/xeaser/squad-opencode
83+
scoop install squad-oc
84+
85+
# Homebrew
86+
brew tap xeaser/squad-opencode https://github.com/xeaser/squad-opencode
87+
brew install squad-oc
88+
89+
# winget (from a clone of this repo)
90+
winget install --manifest packaging/winget
8491
```
8592

86-
Put the binary on your `PATH`, or call it with a full path. On Windows the file is `squad-oc.exe`.
93+
Later: `squad-oc upgrade --self`.
8794

8895
### Try it
8996

@@ -671,7 +678,7 @@ Each original ease row is a **squad-oc command** you already ran, a **later** co
671678

672679
| Original ease | squad-oc |
673680
|---------------|----------|
674-
| `npm i -g @bradygaster/squad-cli` | `go build` / put `squad-oc` on `PATH` |
681+
| `npm i -g @bradygaster/squad-cli` | GitHub Releases / Scoop / Homebrew / winget |
675682
| `squad init` | `squad-oc init --preset default` |
676683
| `copilot --agent squad` | `opencode` → Tab → **squad** |
677684
| `squad status` | `squad-oc status` |
@@ -696,7 +703,7 @@ Each original ease row is a **squad-oc command** you already ran, a **later** co
696703

697704
| Problem | Try |
698705
|---------|-----|
699-
| `squad-oc: command not found` | Build from this repo; fix `PATH` |
706+
| `squad-oc: command not found` | Install from GitHub Releases; fix `PATH` |
700707
| `opencode: command not found` | Install OpenCode; fix `PATH` |
701708
| No **squad** agent | `squad-oc init --preset default` in the project root |
702709
| `Not initialized` | `squad-oc init --preset default` |

‎internal/version/packaging_test.go‎

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
package version
2+
3+
import (
4+
"encoding/json"
5+
"os"
6+
"path/filepath"
7+
"regexp"
8+
"strings"
9+
"testing"
10+
)
11+
12+
func TestPackagingPinsReleaseRepo(t *testing.T) {
13+
root := repoRoot(t)
14+
files := []string{
15+
filepath.Join("bucket", "squad-oc.json"),
16+
filepath.Join("Formula", "squad-oc.rb"),
17+
filepath.Join("packaging", "winget", "xeaser.squad-oc.yaml"),
18+
}
19+
repoURL := "https://github.com/" + Repo
20+
asset := regexp.MustCompile(Name + `_\d+\.\d+\.\d+_(windows_amd64\.zip|darwin_(amd64|arm64)\.tar\.gz|linux_(amd64|arm64)\.tar\.gz)`)
21+
for _, rel := range files {
22+
body, err := os.ReadFile(filepath.Join(root, rel))
23+
if err != nil {
24+
t.Fatalf("%s: %v", rel, err)
25+
}
26+
s := string(body)
27+
if !strings.Contains(s, Repo) {
28+
t.Errorf("%s: missing repo %q", rel, Repo)
29+
}
30+
if !strings.Contains(s, repoURL) {
31+
t.Errorf("%s: missing %s", rel, repoURL)
32+
}
33+
if !asset.MatchString(s) {
34+
t.Errorf("%s: missing goreleaser asset name", rel)
35+
}
36+
}
37+
38+
raw, err := os.ReadFile(filepath.Join(root, "bucket", "squad-oc.json"))
39+
if err != nil {
40+
t.Fatal(err)
41+
}
42+
var scoop struct {
43+
Checkver string `json:"checkver"`
44+
Autoupdate struct {
45+
Hash struct {
46+
URL string `json:"url"`
47+
} `json:"hash"`
48+
} `json:"autoupdate"`
49+
}
50+
if err := json.Unmarshal(raw, &scoop); err != nil {
51+
t.Fatalf("scoop manifest: %v", err)
52+
}
53+
if scoop.Checkver != "github" {
54+
t.Fatalf("scoop checkver = %q, want github", scoop.Checkver)
55+
}
56+
if !strings.Contains(scoop.Autoupdate.Hash.URL, Repo+"/releases/download/") || !strings.HasSuffix(scoop.Autoupdate.Hash.URL, "checksums.txt") {
57+
t.Fatalf("scoop autoupdate hash url = %q", scoop.Autoupdate.Hash.URL)
58+
}
59+
}
60+
61+
func TestUserDocsDoNotLeadWithGoBuild(t *testing.T) {
62+
root := repoRoot(t)
63+
for _, rel := range []string{
64+
filepath.Join("docs", "get-started.md"),
65+
filepath.Join("docs", "workshop", "README.md"),
66+
} {
67+
body, err := os.ReadFile(filepath.Join(root, rel))
68+
if err != nil {
69+
t.Fatal(err)
70+
}
71+
if strings.Contains(string(body), "go build") {
72+
t.Errorf("%s: go build belongs in Develop/CONTRIBUTING only", rel)
73+
}
74+
}
75+
readme, err := os.ReadFile(filepath.Join(root, "README.md"))
76+
if err != nil {
77+
t.Fatal(err)
78+
}
79+
s := string(readme)
80+
dev := strings.Index(s, "## Develop")
81+
if dev < 0 {
82+
t.Fatal("README missing ## Develop")
83+
}
84+
if strings.Contains(s[:dev], "go build") {
85+
t.Error("README leads with go build")
86+
}
87+
if !strings.Contains(s[dev:], "go build") {
88+
t.Error("README Develop should keep go build")
89+
}
90+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# yaml-language-server: $schema=https://aka.ms/winget-manifest.singleton.1.6.0.schema.json
2+
PackageIdentifier: xeaser.squad-oc
3+
PackageVersion: 0.4.0
4+
PackageLocale: en-US
5+
Publisher: xeaser
6+
PublisherUrl: https://github.com/xeaser
7+
PackageName: squad-oc
8+
PackageUrl: https://github.com/xeaser/squad-opencode
9+
License: MIT
10+
LicenseUrl: https://github.com/xeaser/squad-opencode/blob/main/LICENSE
11+
ShortDescription: Human-led AI agent teams for OpenCode
12+
Moniker: squad-oc
13+
Tags:
14+
- opencode
15+
- squad
16+
ReleaseNotesUrl: https://github.com/xeaser/squad-opencode/releases/tag/v0.4.0
17+
Installers:
18+
- Architecture: x64
19+
InstallerType: zip
20+
NestedInstallerType: portable
21+
NestedInstallerFiles:
22+
- RelativeFilePath: squad-oc.exe
23+
PortableCommandAlias: squad-oc
24+
InstallerUrl: https://github.com/xeaser/squad-opencode/releases/download/v0.4.0/squad-oc_0.4.0_windows_amd64.zip
25+
InstallerSha256: 7EFFFA39F33820DB229CF5A7A2B1A5FF887B83B0C55DF0553625AA0ECD5CC0D8
26+
ManifestType: singleton
27+
ManifestVersion: 1.6.0

0 commit comments

Comments
 (0)