# How to Vibe Code Your Own Bartender (and Stop Paying for It)

> Take control of your Menu bar

- Site: https://macbartender.com
- Category: Desktop Utility
- Platforms: macOS app
- Verdict: **Serious undertaking** (45/100 vibecodeable)
- Estimated effort: 4-6 weeks of systems-level Swift debugging and polish

## Verdict

Build a core subset for personal use if you have deep Swift experience, but expect persistent maintenance pain with every macOS update.

Bartender is a low-level utility tightly coupled with undocumented or semi-private macOS window server APIs. While an AI agent can scaffold a basic Swift menu bar application using standard AppKit status items (`NSStatusItem`), intercepting, hiding, and repositioning items belonging to *other* running processes requires navigating macOS Accessibility APIs, permissions prompts, and brittle window layout hacks. Furthermore, every major macOS release (Sequoia, Tahoe) breaks internal rendering assumptions, meaning your personal build will demand manual debugging year after year. Since Bartender costs around $20 outright, paying for it is rationally superior unless you are treating this as an intensive systems-programming learning project.

### What you can't replicate

- Resilience against annual macOS window server and private API changes
- Flawless out-of-process menu item interception without triggering security sandbox violations
- Decade-refined edge case handling for diverse multi-monitor and notch configurations

## What it does

Award-winning utility app for macOS that allows users to hide, rearrange, group, and style menu bar items with advanced search, triggers, and notch management.

### Core features

- Menu bar item hiding and quick-reveal (hover, swipe, scroll, click)
- Secondary overflow 'Bartender Bar' window beneath the menu bar
- MacBook notch collision handling and auto-hiding layout
- Custom styling (tints, gradients, rounded bars, borders, shadows)
- Grouping related menu bar items into customizable aggregate icons
- Context-shifting automation presets based on Wi-Fi, battery, time, or location
- Quick keyword search overlay to find and activate menu bar items
- No-code custom widgets triggered by user actions

## The business

### Pricing

- Bartender 6: ~$20 — One-time purchase for new users, includes all updates to version 6.
- Bartender Pro: Yearly subscription — Includes everything in Bartender 6 plus the Top Shelf suite and future pro tools.
- Mega Supporter: ~$60 — Lifetime access including Bartender Pro and all future major versions.

Founded 2011.
Team size: Small indie-to-corporate acquisition scale.

## The hard parts

- Low-level macOS accessibility API integration to intercept and reposition menu bar status items outside standard app sandbox bounds
- Window-server layout metrics calculation to dynamically reflow items around the hardware notch across different MacBook displays
- OS fragility and maintenance burden: reverse-engineering semi-private macOS window server APIs that break annually with major OS updates (Sequoia, Tahoe)
- Achieving buttery-smooth native AppKit/SwiftUI animations for hover states, dragging, and sliding menu bar drawers

## How to vibe code Bartender

### Prerequisites

- Mac with Apple Silicon (Owned hardware): Required for compiling and testing native macOS system extensions and window server interactions.
- Xcode (Free): Official IDE for building native Swift and AppKit applications.
- GitHub (Free): Version control and repository management for your Swift project.

### Recommended AI tools

- Claude Code: Terminal agent best suited for managing multi-file Swift project structures, generating boilerplate AppKit code, and iteratively debugging build errors.
- Cursor: Ideal for fine-tuning SwiftUI views, window animations, and panel layouts with tight visual feedback loops.

### Stack

- Frontend: Swift / SwiftUI / AppKit (Native macOS)
- Backend: Local macOS background daemon (Swift Foundation)
- Database: Local SQLite (SwiftData / CoreData)
- Auth: None (Local single-user utility)
- Payments: None (Personal use clone)
- Other: Accessibility APIs (AXUIElement), CoreGraphics / WindowServer wrappers

### Hosting

- Local execution (Runs directly on your local macOS environment as a background utility app.): $0/mo

### Build guide

1. **Scaffold Native macOS Menu Bar Application** — Initialize a native Swift project configured as an LSUIElement (accessory app with no dock icon) featuring a primary status item in the system menu bar.

```
Create a new Swift project structure for a native macOS utility application using SwiftUI and AppKit lifecycle. Configure the Info.plist with `LSUIElement = true` so the app runs exclusively as a menu bar extra without appearing in the Dock or Cmd+Tab switcher. Implement a foundational `AppDelegate` and an `NSStatusItem` controller that places a clean icon in the top right system menu bar. Ensure the app requests Accessibility permissions on first launch using `AXIsProcessTrustedWithOptions`, prompting the user gracefully if permissions are missing. Provide unit tests for the permissions check wrapper and confirm the app builds successfully using Swift Package Manager or an Xcode project template.
```

2. **Implement Menu Bar Item Enumeration & Hiding** — Use macOS Accessibility APIs (`AXUIElement`) to discover active menu bar status items, read their frames, and toggle their visibility.

```
Write a Swift service class utilizing macOS Accessibility APIs (`AXUIElementCopyAttributeValue` and related system element queries) to locate the status item container window managed by the system WindowServer. Implement methods to scan all active menu bar extra elements, retrieve their bounding boxes, and construct an internal model representing each visible menu bar icon. Add functionality to programmatically hide specific status items by adjusting their accessibility attributes or repositioning them off-screen or into an internal tracking array. Handle edge cases where system apps restart or crash, ensuring safe error recovery without causing system menu bar lockups.
```

3. **Build the 'Bartender Bar' Overflow Panel** — Create a secondary floating HUD window that appears directly beneath the menu bar to house hidden status items.

```
Design and implement a floating secondary panel in SwiftUI, styled to match native macOS dark/light mode appearance with rounded corners, backdrop blur (`NSVisualEffectView`), and subtle shadows. This panel acts as the 'Bartender Bar' and should appear immediately beneath the system menu bar when the user clicks the primary Bartender trigger icon or performs a designated hover/scroll gesture. Populate this panel with buttons representing the items hidden in step 2, maintaining correct interactive hit-testing so users can click them just as they would in the primary menu bar. Ensure the window positioning dynamically follows the primary display's menu bar height and screen coordinate bounds.
```

4. **Add Quick Reveal Gestures (Hover, Scroll, Click)** — Intercept mouse tracking events on the menu bar area to instantly reveal hidden items via gestures.

```
Implement global and local event monitors (`NSEvent.addGlobalMonitorForEvents` and local equivalent) to capture mouse hovering, scrolling, and clicking gestures across the main menu bar region. When a user hovers over or scrolls down on the designated trigger zone, trigger a smooth slide animation that temporarily reveals hidden status items or opens the Bartender Bar. Ensure the gesture handling does not interfere with normal third-party app menu item clicks or native macOS control center actions. Add user preference toggles for adjusting activation sensitivity and choosing between hover, click, or scroll activation modes.
```

5. **Notch Collision Detection & Layout Management** — Calculate screen geometry around the MacBook hardware notch to auto-hide overflow items when space runs tight.

```
Write a screen metrics utility in Swift that detects whether the active display features a hardware notch (using `NSScreen.main?.auxiliaryTopLeftArea` and related geometric APIs). Calculate the available horizontal pixel width between the leading system menu items and the trailing system tray icons. Implement automatic collision detection: when active items exceed available width due to the notch, seamlessly hide excess items into the Bartender Bar overflow container. Test layout reflowing across different MacBook Pro and Air screen resolutions.
```

6. **Presets, Triggers, and Quick Search Overlay** — Build automated context-shifting presets based on conditions and a Spotlight-style quick search overlay for menu bar items.

```
Build an automation engine and Quick Search overlay for your macOS menu bar clone. First, create a preference storage model (using SwiftData or JSON) allowing users to define 'Presets' that dictate which items are shown or hidden. Implement trigger monitors for Wi-Fi network changes, battery percentage thresholds, and time schedules that automatically apply matching presets. Second, build a Spotlight-style HUD search window triggered by a global keyboard shortcut (e.g., Cmd+Shift+B). The search box should index all active and hidden menu bar item names, allowing users to instantly filter items by keyword and press Enter to activate them.
```

### Cost vs paying

**Starting costs (one-time):**

- Apple Developer Account (optional for personal distribution without notarization): $99/yr
- AI Coding Assistant Subscriptions: $20
- Total: ~$119 one-time (or $20 if sideloading locally)

**Ongoing costs (monthly):**

- Hosting & Infrastructure: $0/mo
- Total: $0/mo

- Paying for the SaaS instead: ~$2/mo ($20 one-time / ~10 months)
- Build time: 40-60 hours
- AI tool credits: $20 (Claude Pro / Cursor Pro)
- Break-even: Never (purely for learning and personal customization)

## Sources

- [Bartender 6 Official Website](https://macbartender.com)
- [Bartender 6 Purchase & Pricing Portal](https://www.macbartender.com/Bartender6/purchase.html)
- [TidBITS: Bartender Developer Explains Acquisition](https://tidbits.com/2024/06/05/bartender-developer-explains-and-apologizes-for-quiet-acquisition/)