Skip to content

Commit bc52ed9

Browse files
committed
Fix module path, version endpoint auth, and several CI/CD issues
- Rename module path from github.com/yourorg/beads_server to github.com/vector76/beads_server throughout (go.mod, all imports, ldflags in Makefile and release.yml) — the yourorg placeholder was never updated, breaking go install - Fix bs --version to contact /api/v1/version without requiring BS_TOKEN; the endpoint is unauthenticated by design and the CLI should use it that way - Add mkdir -p to Makefile platform targets so make clean && make linux no longer fails on a missing build/ directory - Add make install to README build-from-source section - Update docs: note bs --version plain-text exception to JSON-only output rule; add macOS to cross-compilation platform list
1 parent 1af95e8 commit bc52ed9

36 files changed

Lines changed: 95 additions & 66 deletions

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Build binaries
2626
run: |
2727
VERSION=${GITHUB_REF_NAME#v}
28-
LDFLAGS="-s -w -X 'github.com/yourorg/beads_server/internal/cli.version=${VERSION}'"
28+
LDFLAGS="-s -w -X 'github.com/vector76/beads_server/internal/cli.version=${VERSION}'"
2929
mkdir -p build
3030
GOOS=linux GOARCH=amd64 go build -ldflags="${LDFLAGS}" -o build/bs-linux-amd64 ./cmd/bs
3131
GOOS=windows GOARCH=amd64 go build -ldflags="${LDFLAGS}" -o build/bs-windows-amd64.exe ./cmd/bs

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ BINARY_NAME := bs
22
BUILD_DIR := build
33
SRC := ./cmd/bs
44
VERSION ?= $(patsubst v%,%,$(shell git describe --tags --always --dirty 2>/dev/null || echo "dev"))
5-
LDFLAGS := -X 'github.com/yourorg/beads_server/internal/cli.version=$(VERSION)'
5+
LDFLAGS := -X 'github.com/vector76/beads_server/internal/cli.version=$(VERSION)'
66

7-
.PHONY: all build test clean linux windows darwin-arm64 darwin-amd64
7+
.PHONY: all build test clean install linux windows darwin-arm64 darwin-amd64
88

99
all: test build
1010

@@ -14,16 +14,23 @@ test:
1414
go test ./...
1515

1616
linux:
17+
@mkdir -p $(BUILD_DIR)
1718
GOOS=linux GOARCH=amd64 go build -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-linux-amd64 $(SRC)
1819

1920
windows:
21+
@mkdir -p $(BUILD_DIR)
2022
GOOS=windows GOARCH=amd64 go build -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-windows-amd64.exe $(SRC)
2123

2224
darwin-arm64:
25+
@mkdir -p $(BUILD_DIR)
2326
GOOS=darwin GOARCH=arm64 go build -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-darwin-arm64 $(SRC)
2427

2528
darwin-amd64:
29+
@mkdir -p $(BUILD_DIR)
2630
GOOS=darwin GOARCH=amd64 go build -ldflags="$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME)-darwin-amd64 $(SRC)
2731

32+
install: linux
33+
install -m 0755 $(BUILD_DIR)/$(BINARY_NAME)-linux-amd64 $(shell go env GOPATH)/bin/$(BINARY_NAME)
34+
2835
clean:
2936
rm -rf $(BUILD_DIR)

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ An agent-first issue tracker. A single executable (`bs`) that runs as either an
88

99
Pre-built binaries are available on the [Releases page](https://github.com/vector76/beads_server/releases/latest).
1010

11+
**Via go install (any platform, no root required)**
12+
```bash
13+
go install github.com/vector76/beads_server/cmd/bs@latest
14+
```
15+
Installs to `$GOPATH/bin` (typically `~/go/bin`). The version is embedded automatically.
16+
1117
**Linux (amd64)**
1218
```bash
1319
curl -L https://github.com/vector76/beads_server/releases/latest/download/bs-linux-amd64 -o bs
@@ -55,6 +61,7 @@ Or use the Makefile for cross-compiled binaries:
5561

5662
```bash
5763
make build # produces build/bs-linux-amd64, build/bs-windows-amd64.exe, build/bs-darwin-arm64, build/bs-darwin-amd64
64+
make install # builds linux/amd64 and installs to $GOPATH/bin/bs (Linux only)
5865
```
5966

6067
### Start the server

cmd/bs/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"os"
55

6-
"github.com/yourorg/beads_server/internal/cli"
6+
"github.com/vector76/beads_server/internal/cli"
77
)
88

99
func main() {

cmd/bs/main_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ func TestBinaryVersionFlag(t *testing.T) {
4242
t.Fatalf("binary exited with error: %v\n%s", err, out)
4343
}
4444

45-
output := strings.TrimSpace(string(out))
46-
if !strings.HasPrefix(output, "bs version ") {
47-
t.Errorf("expected output to start with 'bs version ', got: %q", output)
45+
output := string(out)
46+
if !strings.Contains(output, "client: ") {
47+
t.Errorf("expected output to contain 'client: ', got: %q", output)
48+
}
49+
if !strings.Contains(output, "server: ") {
50+
t.Errorf("expected output to contain 'server: ', got: %q", output)
4851
}
4952
}
5053

docs/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ go test ./e2e/...
113113

114114
**Single binary, two modes.** The `bs` binary is both server and CLI client. `bs serve` starts the HTTP server; every other command is a client that talks to the server via HTTP. This avoids separate installs and keeps deployment simple.
115115

116-
**JSON-only output.** All CLI output is pretty-printed JSON. No tables, no colors, no human-oriented formatting. Agents parse JSON natively; humans can pipe through `jq`. This eliminates an entire class of formatting/parsing bugs.
116+
**JSON-only output.** All CLI output is pretty-printed JSON except `bs --version`, which outputs plain text for human readability. No tables, no colors, no human-oriented formatting for command output. Agents parse JSON natively; humans can pipe through `jq`. This eliminates an entire class of formatting/parsing bugs.
117117

118118
**Chi for routing, cobra for CLI.** Both are lightweight, widely used Go libraries. Chi adds path parameters and middleware grouping on top of `net/http`. Cobra provides flag parsing, help text, and command grouping. Neither imposes architectural constraints.
119119

docs/design-goals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ An issue tracker optimized for coding agent use. A single executable (`bs`) that
99
1. **Agent-first**: All output is JSON (pretty-printed). Agents parse JSON; humans can read it directly or pipe through `jq`
1010
2. **Simple and focused**: Only issue tracking. No git sync, no plugins, no bloat
1111
3. **Client-server**: Server is the single source of truth. Works across worktrees, containers, and remote hosts
12-
4. **Easy to run**: Single binary, minimal configuration. Cross-compiled for Linux and Windows
12+
4. **Easy to run**: Single binary, minimal configuration. Cross-compiled for Linux, Windows, and macOS
1313
5. **Multi-agent**: Multiple agents can share one tracker, claim work items, and resume aborted tasks
1414

1515
## Out of Scope

e2e/e2e_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ import (
1111
"strings"
1212
"testing"
1313

14-
"github.com/yourorg/beads_server/internal/cli"
15-
"github.com/yourorg/beads_server/internal/model"
16-
"github.com/yourorg/beads_server/internal/server"
17-
"github.com/yourorg/beads_server/internal/store"
14+
"github.com/vector76/beads_server/internal/cli"
15+
"github.com/vector76/beads_server/internal/model"
16+
"github.com/vector76/beads_server/internal/server"
17+
"github.com/vector76/beads_server/internal/store"
1818
)
1919

2020
const testToken = "e2e-test-secret"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/yourorg/beads_server
1+
module github.com/vector76/beads_server
22

33
go 1.25.5
44

internal/cli/commands_query_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"os"
66
"testing"
77

8-
"github.com/yourorg/beads_server/internal/model"
9-
"github.com/yourorg/beads_server/internal/store"
8+
"github.com/vector76/beads_server/internal/model"
9+
"github.com/vector76/beads_server/internal/store"
1010
)
1111

1212
func TestList_Default(t *testing.T) {

0 commit comments

Comments
 (0)