BenchBar 0.3.0
The project is now BenchBar: the benchbar command line tool, plus a
native menu bar app. Built for Frappe and ERPNext on macOS; not
affiliated with Frappe Technologies.
Added
- One line installer,
install.sh: checks macOS, the Command Line
Tools and Homebrew (offering their installers), clones the CLI into
~/.local/share/benchbarwith links in~/.local/binand a PATH block
in~/.zshrc, installs the BenchBar app from the latest GitHub release
(zip checked against the release'sSHA256SUMS, unpacked withditto,
so no Gatekeeper prompt), then offersbenchbar adoptfor a bench it
finds orbenchbar install. Flags--yes,--dry-run,--no-app,
--app-only,--version vX.Y.Z,--uninstall. Re-runs say
unchanged. - The manual install steps are gone. Phase 00 sets the MariaDB root
password itself (generated, orMARIADB_ROOT_PASSWORD), applies the
secure installation steps in SQL, and keeps the password in the macOS
Keychain (benchbar-mariadb); every later step reads it from there and
passes it throughMYSQL_PWD. The utf8mb4 drop-in is a doctor check and
repair action. The patched Qt wkhtmltopdf is downloaded from the pinned
official package (config/wkhtmltopdf.tsv, sha256 checked) and
installed withinstaller; on Apple Silicon Rosetta 2 is offered first
because the package is an Intel binary, and skipping it only costs
PDFs. The/etc/hostsline sits inside# >>> benchbar >>>markers,
with a backup first. Onesudoprompt covers a whole run. benchbar adopt PATH: registers an existing bench (Procfile.lean,
runner, launchd agent, helpers, hosts line) after showing the plan and
asking. Never runsmigrate,buildorupdate.benchbar report [--print]: a redacted diagnostics zip on the Desktop
with doctor and status JSON, versions, the agent,Procfile.lean,
state.json, log tails and the key names of the site configs. Secrets
are masked by key name, paths and names are replaced by placeholders,
andREDACTIONS.txtlists what was replaced.benchbar mariadb-password: prints the Keychain password after a
confirmation.- Doctor checks
MariaDB utf8mb4andwkhtmltopdf, with repair actions. - CI (
.github/workflows/ci.yml) on pull requests and pushes to main:
shellcheck and the CLI tests on macOS (/bin/bash3.2) and Linux, an
unsigned app build and the Swift tests, andscripts/release-local.sh
whose zip, dmg andSHA256SUMSare uploaded as a workflow artifact. - Releases (
.github/workflows/release.yml): av*tag drafts a GitHub
release with the CHANGELOG section as notes. Without Developer ID
secrets the app is ad hoc signed (scripts/release-local.sh); with
them it is signed, notarized and stapled, with the Sparkle appcast and
the Homebrew cask (docs/releasing.md). docs/testing.md, a three step guide for testers, and
docs/DECISIONS.md.- BenchBar.app (
macos/, macOS 14+, Apple Silicon), built from the
command line withscripts/macos-build.shand installed with
scripts/macos-install-local.sh:- an animated menu bar runner per state (sleeping, walking, running,
stumbling, alert, question), one Core Animation keyframe animation,
tinted for light, dark and the transparent menu bar; - running speed from the CPU use of the bench's process tree (libproc,
every 2 seconds, smoothed), behind aSpeedSourceprotocol; - Reduce Motion support, and pausing on sleep, screen sleep, lock and
user switching; - a popover with state, uptime, Start, Stop, Restart, open site, logs
(Terminal) and folder, a read only doctor, a bench picker, repair
hints and keyboard shortcuts; - a Settings window: runner picker with live preview, speed toggle,
launch at login (SMAppService), notifications, CLI path; - notifications on crash, crash guard pause and recovery;
- two original built in runners (a bench and a coffee cup) and custom
runners: a folder withmanifest.jsonand PNG frames, imported from
a folder or zip with strict validation (docs/runners.md,
examples/runners/blob).
- an animated menu bar runner per state (sleeping, walking, running,
- Versioned JSON API (
schema_version: 1):benchbar list --json,
status --json,doctor --json, and<bench>/logs/.benchbar/state.json
written atomically by the runner on every transition
(docs/json-schema.md). stop_reason: "broken"for a bench that cannot start untilrepair.- Release plumbing, documented and not yet live (no Apple Developer
account): Developer ID signing, notarization, DMG, Sparkle 2 behind a
build flag, a Homebrew cask template and a guarded GitHub Actions
workflow (docs/releasing.md).
Changed
00-mac-system-deps.shexits 2 only when MariaDB already has a root
password that neither the environment nor the Keychain knows; it takes
--yes.01-install-bench-and-site.shreads the root password from
the Keychain and no longer passes it on themariadbcommand line.- The test suite runs on Linux as well as macOS (GNU stat and sed, a
unamemock), so a Linux machine gives quick feedback. - The CLI is
benchbar;frappe-macstays as a link to it. - Agents are
com.benchbar.<bench>and carry
AssociatedBundleIdentifiersso Login Items shows them under BenchBar.
benchbar repairmigratescom.frappe-mac.<bench>agents (only for
this bench), restarting the bench if it was running. Old plists move to
~/Library/LaunchAgents-disabled/<timestamp>/. up,downandrestarton a bench that still has its old agent now
say so and point atbenchbar repair, instead of "not installed".- The runner runs honcho as a child, forwards SIGTERM and records the
final state; a SIGTERM without a stop flag is a clean stop. Its
osascript crash notification stays as a fallback and is skipped while
BenchBar runs. status --json:stateis now the contract value (stopped, starting,
running, crashed, paused); launchd's word moved toagent_state.- The repository is now github.com/askysh/benchbar (the old URLs
redirect). README, AGENTS.md, the docs, the cask and the Sparkle feed use
it. - Names from before 0.3.0 move over once, on the next run or
repair:
the checkout's.frappe-local/becomes.benchbar/,
frappe-mac-run.shin the bench becomesbenchbar-run.sh(the old file
goes to the backups once no agent uses it), the# >>> frappe-mac >>>
block in the shell rc is replaced in place by# >>> benchbar >>>, and
new files carry abenchbar-template:header. Files are not rewritten
for the header word alone, so MariaDB is not restarted.
Fixed
- Reading a missing stop flag no longer prints "No such file or
directory". - Reloading the agent of a running bench (a repair after a template or
setting change,autostart on|off) could leave it stopped and unloaded:
launchctl bootoutreturns while the job is still shutting down, the
immediatebootstrapfailed, and theload -wfallback exits 0 without
loading anything. The CLI now waits until launchd has let go of the job
(up to 30 seconds), confirms the load withlaunchctl print, and fails
the step clearly instead of reporting success.
This build is not signed with an Apple Developer ID (ad hoc signature). macOS shows "Apple could not verify" on first open of the DMG: use System Settings > Privacy & Security > Open Anyway, or install with the one liner, which downloads with curl and opens without that prompt:
curl -fsSL https://raw.githubusercontent.com/askysh/benchbar/main/install.sh | bashChecksums are in SHA256SUMS.