Skip to content

Development ​

Building ​

Plain go build produces a binary reporting dev as its version. Use the Makefile to embed a semantic version or cross-compile releases:

bash
# TUI main binary and auth helper with the injected version
make build VERSION=v1.2.3

# Cross-compile all release binaries (macOS, Linux, Windows) to dist/ and generate SHA256SUMS
make dist VERSION=v1.2.3

# Equivalent plain builds (version reports "dev")
go build -o lazyteams .
go build -o lazyteams-auth ./cmd/auth-helper/

Check the embedded version with:

bash
./lazyteams --version
./lazyteams-auth --version

Running ​

bash
# First time: capture tokens (opens Firefox, login once)
./lazyteams-auth

# Run the TUI
./lazyteams

# Run the TUI with diagnostic mode enabled
./lazyteams --debug

# Renew tokens manually when expired
./lazyteams-auth --renew <token_type>

# View auth helper diagnostics interactively
./lazyteams-auth --renew <token_type> --show --debug

Testing ​

The project uses the standard Go testing framework with automated GitHub Actions for Continuous Integration. The CI pipeline also runs security checks:

  • govulncheck — scans dependencies and the standard library for known vulnerabilities (none found on Go 1.26.6+).
  • gitleaks — scans the full push range for accidentally committed secrets.
bash
# Run all unit tests
go test ./...

# Run code vetting
go vet ./...

Contributing ​

  1. Adhere to Single Responsibility Principle.
  2. No CGO or external dependencies unless strictly necessary.
  3. Keep UI layer separate from domain logic — use tea.Cmd for async operations.

Coding Standards ​

AreaConvention
UI State MachineChanges via Bubble Tea Update function
Input ValidationNetwork-sensitive inputs strictly validated
ANSI StylingUse lipgloss exclusively
ConcurrencyBuffered channels as semaphores for network calls
HTTP ClientAll requests through internal/graph/client.go

Dependencies ​

PackageVersionUsage
charmbracelet/bubbleteav1.3.10TUI framework (Elm Architecture)
charmbracelet/lipglossv1.1.0Terminal styles and layout
charmbracelet/bubbles(indirect)UI components (viewport, textinput)
playwright-go (mxschmitt/playwright-go)v0.6100.0Browser automation (auth helper only)

Release Process ​

Releases are tag-driven: CI builds, checksums and publishes the final binaries.

  1. Update go.mod if dependencies changed.

  2. Validate and push the release tag:

    bash
    make release VERSION=v1.2.3

    This command automatically:

    • Validates the version format (vX.Y.Z).
    • Ensures your working directory has no uncommitted changes.
    • Pushes both the current branch and the new tag to GitHub.
  3. The GitHub Actions release workflow cross-compiles all platforms via make dist, writes the SHA256SUMS, and creates the GitHub Release with auto-generated notes (attaching the cross-compiled binaries for Linux, macOS, and Windows for both amd64 and arm64 architectures).