Commit 69052d22ed

69052d22edeb8730fcbda8dff80e6e5028e573e5

parent: c8ff0dad77

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-04 17:32 UTC

ambient-companions 1.2.0

Layout: unified · split

Formula/ambient-companions.rb +26 −2
@@ -2,8 +2,8 @@ class AmbientCompanions < Formula
22 desc "Ambient system companions over one privacy-preserving signal daemon"
33 homepage "https://gitbay.org/krz/ambient-companions"
44 url "https://gitbay.org/krz/ambient-companions.git",
5 tag: "v1.1.0",
6 revision: "7bf3941d56f48fc226a46d7b2f26f05b512c321b"
5 tag: "v1.2.0",
6 revision: "5358b7a0828e4b77a1b7e2eb438b14449ad1aa8e"
77 license "0BSD"
88 head "https://gitbay.org/krz/ambient-companions.git", branch: "main"
99
@@ -16,6 +16,7 @@ class AmbientCompanions < Formula
1616 system "cargo", "install", *std_cargo_args(path: "crates/signald")
1717 system "cargo", "install", *std_cargo_args(path: "crates/terminal-garden")
1818 system "cargo", "install", *std_cargo_args(path: "crates/terminal-pet")
19 system "cargo", "install", *std_cargo_args(path: "crates/pet-life")
1920
2021 # The IOKit collector runs out of process as a child of signald.
2122 # --disable-sandbox: SwiftPM sandboxes its own manifest compile, and that
@@ -26,6 +27,18 @@ class AmbientCompanions < Formula
2627 "--scratch-path", buildpath/"swift-build"
2728 bin.install buildpath/"swift-build/release/macos-collector"
2829
30 # The menu-bar face. SwiftPM cannot emit a .app, so the repo's own script
31 # assembles the bundle; installing it into the prefix rather than shipping
32 # a cask keeps this build-from-source, which also means Gatekeeper never
33 # quarantines it.
34 system "swift", "build", "-c", "release", "--disable-sandbox",
35 "--package-path", "menubar-pet",
36 "--scratch-path", buildpath/"menubar-build"
37 system "menubar-pet/scripts/bundle.sh",
38 buildpath/"menubar-build/release/menubar-pet", prefix
39 # pet-life sits beside the app binary so the bundle finds it without PATH.
40 (prefix/"menubar-pet.app/Contents/MacOS").install_symlink bin/"pet-life"
41
2942 # Sourced from the user's .zshrc; see the README install section.
3043 pkgshare.install "shell-hooks/signald-hooks.zsh"
3144 # The launchd template, for a manual install. `brew services` uses the
@@ -52,6 +65,11 @@ class AmbientCompanions < Formula
5265
5366 Then source the terminal collector hooks from your .zshrc:
5467 source "#{opt_pkgshare}/signald-hooks.zsh"
68
69 The menu-bar pet is an app, not a service. Launch it with:
70 open "#{opt_prefix}/menubar-pet.app"
71 and add it under System Settings > General > Login Items to keep it.
72 It has one life: neglect it for a week and it dies for good.
5573 EOS
5674 end
5775
@@ -59,6 +77,12 @@ class AmbientCompanions < Formula
5977 assert_match version.to_s, shell_output("#{bin}/signald --version")
6078 assert_match version.to_s, shell_output("#{bin}/terminal-garden --version")
6179 assert_match version.to_s, shell_output("#{bin}/terminal-pet --version")
80 assert_match version.to_s, shell_output("#{bin}/pet-life --version")
81 # The app is only an app if the bundle is intact.
82 assert_path_exists prefix/"menubar-pet.app/Contents/MacOS/menubar-pet"
83 assert_match "true",
84 shell_output("plutil -extract LSUIElement raw " \
85 "#{prefix}/menubar-pet.app/Contents/Info.plist")
6286 # Unknown options exit 2 rather than being taken for a repository path.
6387 shell_output("#{bin}/signald --nonexistent-option 2>&1", 2)
6488 # One real IOKit read, no root. --once writes raw wire frames to stdout and