Skip to content

Development

nerdr is written in Go, a single static binary with no runtime dependencies.

Terminal window
git clone https://github.com/nerdr-dev/nerdr && cd nerdr
make build # ./nerdr
make install # into $(go env GOPATH)/bin
make all # binaries for Linux and macOS, amd64 and arm64, in dist/
Terminal window
make test # unit tests, with the race detector
make e2e # the real binary in a pseudo-terminal with a fake agent:
# setup, worktrees, status lights, review panel, herdr
# integration, quit, resume and close
make vet
make fmt

To start the real Claude in a test tab and print its screen without sending it a task:

Terminal window
NERDR_E2E_CLAUDE=1 go test -tags e2e ./internal/e2e -run TestRealClaude -v

This site lives in docs/ and is built with Starlight. Each page is a file in docs/src/content/docs/, and the sidebar is set in docs/astro.config.mjs.

Terminal window
cd docs
npm ci
npm run dev # http://localhost:4321/nerdr/, reloads as you edit
npm run build # checks every link, writes dist/

A push to main that changes docs/ publishes the site to GitHub Pages.

Push a tag to release:

Terminal window
git tag v0.1.0
git push origin v0.1.0

The Release workflow runs the tests, then GoReleaser (.goreleaser.yaml) builds the four binaries with the tag as nerdr version, puts them on a GitHub release as nerdr-<os>-<arch>.tar.gz with checksums.txt, and updates the cask in nerdr-dev/homebrew-tap. The archive names carry no version, so releases/latest/download/ always finds the newest; the install script, docs/public/install.sh, depends on that.

The tap needs a repository secret, HOMEBREW_TAP_TOKEN: a fine-grained token with write access to the contents of nerdr-dev/homebrew-tap. Without it the release is made and the tap is left alone.

To try a release build without publishing anything:

Terminal window
goreleaser release --snapshot --clean # writes dist/