Skip to content

Repository files navigation

sheep

A native macOS client for Herdr, built with Swift, AppKit, and Ghostty.

Requirements

  • macOS 13 or newer
  • Xcode
  • Herdr 0.7.5 or newer using protocol 17 or 18
  • Zig 0.16.0 (for the pinned Ghostty dependency)

Development

Initialize the pinned Herdr and Ghostty source snapshots, then build Ghostty's universal XCFramework:

git submodule update --init --recursive
Scripts/bootstrap-ghostty.sh

Sheep uses an installed Herdr executable by default. To develop against the pinned Herdr source instead:

cargo build --release --manifest-path .repos/herdr/Cargo.toml
HERDR_BIN_PATH="$PWD/.repos/herdr/target/release/herdr" \
  /path/to/sheep.app/Contents/MacOS/sheep

The generated GhosttyKit.xcframework is cached locally but intentionally not committed. Generate the Xcode project, build, and test:

xcodegen generate
xcodebuild \
  -project Sheep.xcodeproj \
  -scheme Sheep \
  -configuration Debug \
  build test

HerdrSDK

Sheep is built on the in-repository HerdrSDK Swift package. It provides the complete Herdr protocol-18 API with protocol-17 compatibility, typed events, per-symbol runtime availability, reconnecting session observation, local server supervision, and direct terminal attachment configuration.

Regenerate its public protocol models after updating the pinned Herdr source:

npm ci --prefix Tools/HerdrSDKGenerator
node Tools/HerdrSDKGenerator/generate.mjs
Scripts/check-herdr-sdk-generation.sh
Scripts/check-herdr-sdk-coverage.sh

Generated Swift sources are committed so applications consuming the package do not need Node, Rust, or the Herdr source tree. The coverage gate requires 100% line coverage for handwritten HerdrSDK and HerdrSDKLocal production code; generated schema models are covered by the deterministic generation drift check.

Build a release app containing both Apple Silicon and Intel slices with:

Scripts/build-universal-macos.sh

Xcode 27 beta's archive tools require 8-byte member alignment while Zig emits valid 2-byte-aligned Darwin archives. The Ghostty bootstrap automatically uses Scripts/repack-darwin-archive.mjs while aggregating its static libraries. Stable Xcode versions do not require this compatibility step.

License

Apache-2.0. See LICENSE.

About

Native macOS client for Herdr

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages