Skip to content

Commit 49d4b09

Browse files
authored
Merge pull request #1 from BackendStack21/claude/trusting-cerf-cswat2
bodek: a beautiful Bubble Tea TUI for the odek agent
2 parents d0545b8 + ee68208 commit 49d4b09

38 files changed

Lines changed: 5551 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build-test:
13+
name: Build & Test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
cache: true
23+
24+
- name: Build
25+
run: go build ./...
26+
27+
- name: Vet
28+
run: go vet ./...
29+
30+
- name: Test (race + coverage)
31+
run: go test -race -coverpkg=./internal/... -coverprofile=coverage.out ./internal/...
32+
33+
- name: Coverage summary
34+
run: go tool cover -func=coverage.out | tail -1
35+
36+
- name: Upload coverage profile
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: coverage
40+
path: coverage.out
41+
42+
lint:
43+
name: Lint
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Set up Go
49+
uses: actions/setup-go@v5
50+
with:
51+
go-version-file: go.mod
52+
cache: true
53+
54+
- name: golangci-lint
55+
uses: golangci/golangci-lint-action@v7
56+
with:
57+
version: v2.5.0

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
name: GoReleaser
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version-file: go.mod
24+
cache: true
25+
26+
- name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v6
28+
with:
29+
distribution: goreleaser
30+
version: '~> v2'
31+
args: release --clean
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Build artifacts
2+
/bin/
3+
bodek
4+
5+
# Editor / OS noise
6+
.DS_Store
7+
*.swp
8+
.idea/
9+
.vscode/

.golangci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: "2"
2+
3+
run:
4+
timeout: 5m
5+
6+
linters:
7+
default: standard # errcheck, govet, ineffassign, staticcheck, unused
8+
exclusions:
9+
rules:
10+
# Test helpers freely ignore errors on HTTP test handlers and Close().
11+
- path: _test\.go
12+
linters:
13+
- errcheck
14+
15+
formatters:
16+
enable:
17+
- gofmt
18+
- goimports

.goreleaser.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version: 2
2+
3+
project_name: bodek
4+
5+
before:
6+
hooks:
7+
- go mod tidy
8+
9+
builds:
10+
- id: bodek
11+
main: ./cmd/bodek
12+
binary: bodek
13+
env:
14+
- CGO_ENABLED=0
15+
goos:
16+
- linux
17+
- darwin
18+
- windows
19+
goarch:
20+
- amd64
21+
- arm64
22+
ldflags:
23+
- -s -w
24+
25+
archives:
26+
- id: bodek
27+
formats: [tar.gz]
28+
name_template: >-
29+
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
30+
format_overrides:
31+
- goos: windows
32+
formats: [zip]
33+
34+
checksum:
35+
name_template: checksums.txt
36+
37+
snapshot:
38+
version_template: '{{ incpatch .Version }}-next'
39+
40+
changelog:
41+
sort: asc
42+
filters:
43+
exclude:
44+
- '^docs:'
45+
- '^test:'
46+
- '^ci:'
47+
- '^chore:'
48+
49+
release:
50+
draft: false
51+
prerelease: auto

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 21no.de / BackendStack21
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
BINARY := bodek
2+
PKG := ./cmd/bodek
3+
GOBIN ?= $(shell go env GOPATH)/bin
4+
5+
.PHONY: all build install run fmt vet lint test cover tidy clean
6+
7+
all: build
8+
9+
## build: compile the bodek binary into ./bin
10+
build:
11+
@mkdir -p bin
12+
go build -o bin/$(BINARY) $(PKG)
13+
14+
## install: install bodek into $GOBIN
15+
install:
16+
go install $(PKG)
17+
18+
## run: build and launch bodek (spawns `odek serve`)
19+
run: build
20+
./bin/$(BINARY)
21+
22+
## fmt: format all Go sources
23+
fmt:
24+
go fmt ./...
25+
26+
## vet: run go vet
27+
vet:
28+
go vet ./...
29+
30+
## lint: run golangci-lint if available
31+
lint:
32+
@if command -v golangci-lint >/dev/null 2>&1; then \
33+
golangci-lint run ./...; \
34+
else \
35+
echo "golangci-lint not installed; skipping (see https://golangci-lint.run)"; \
36+
fi
37+
38+
## test: run the race-enabled test suite
39+
test:
40+
go test -race ./...
41+
42+
## cover: print internal-package coverage
43+
cover:
44+
go test -coverpkg=./internal/... -coverprofile=coverage.out ./internal/...
45+
go tool cover -func=coverage.out | tail -1
46+
47+
## tidy: tidy module dependencies
48+
tidy:
49+
go mod tidy
50+
51+
## clean: remove build artifacts
52+
clean:
53+
rm -rf bin

0 commit comments

Comments
 (0)