Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

796 B
Raw Blame
#!/bin/bash
# Patches the Electron binary's Info.plist to show "PostHog (Development)" in the macOS menu bar

set -e

# Resolve by path: git rev-parse --show-toplevel returns the monorepo root,
# which has no electron install.
REPO_ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
PLIST_FILE="$REPO_ROOT/node_modules/electron/dist/Electron.app/Contents/Info.plist"

if [ ! -f "$PLIST_FILE" ]; then
  exit 0
fi

if /usr/libexec/PlistBuddy -c "Print :CFBundleName" "$PLIST_FILE" | grep -q "PostHog (Development)"; then
  exit 0
fi

/usr/libexec/PlistBuddy -c "Set :CFBundleName 'PostHog (Development)'" "$PLIST_FILE"
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName 'PostHog (Development)'" "$PLIST_FILE"
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier 'com.posthog.array.dev'" "$PLIST_FILE"