explaingit

steipete/fluegel

21SwiftAudience · developerComplexity · 4/5ActiveSetup · hard

TLDR

Mac menu-bar app that brokers macOS TCC permissions (Reminders, Contacts, Calendar) so command-line AI agents and short-lived shells can use them through a single audited whitelist.

Mindmap

mindmap
  root((fluegel))
    Inputs
      Whitelisted binaries
      CLI requests
      Auth token
    Outputs
      Permission grants
      JSONL audit log
      Tool stdout
    Use Cases
      Run rem from Codex
      Audit agent access
      Whitelist CLI tools
      Avoid per-shell prompts
    Tech Stack
      Swift
      macOS
      TCC
      Unix sockets

Things people build with this

USE CASE 1

Let a Codex or SSH-launched AI agent read and write Apple Reminders through the rem CLI without macOS blocking it

USE CASE 2

Maintain one stable TCC-permissioned app so you stop granting Reminders access to every new terminal binary

USE CASE 3

Audit every command an AI agent ran through Fluegel via the JSONL log under ~/Library/Logs/Fluegel

USE CASE 4

Whitelist a specific absolute-path CLI tool so only that exact binary can ride on Fluegel's permissions

Tech stack

SwiftmacOS

Getting it running

Difficulty · hard Time to first run · 1h+

macOS only, must be built from source with Swift, then manually copied to ~/Applications and /opt/homebrew/bin, and granted TCC permissions once.

In plain English

Fluegel is a small Mac menu-bar application written in Swift that acts as a permission broker between command-line AI agents and parts of macOS that normally lock those agents out. On modern Macs, sensitive features like Reminders, Contacts, or Calendar access are gated by a system called TCC, which grants permission to a specific app or binary. That works fine for a regular desktop user, but it breaks down when an AI coding agent might be running inside Codex, an SSH session, the Ghostty terminal, or a short-lived launchd process. Granting every one of those callers access is messy and hard to audit. Fluegel solves this by giving the permission a stable home. You install the Fluegel menu-bar app, grant it Reminders access once, and then add specific full-path command-line tools to a whitelist inside Fluegel. When an agent wants to use one of those tools, it asks Fluegel to run the command, and macOS sees the access coming from Fluegel.app, not from the agent's transient process. The first supported use case is the third-party rem tool, which exposes Apple Reminders as a command-line interface. The project ships as both a Swift app and a companion CLI binary called fluegel. You build it with swift test and a script called build-app.sh, then copy Fluegel.app into ~/Applications and the CLI binary into /opt/homebrew/bin. The CLI has subcommands for checking status, requesting permission, listing and editing the whitelist, running a whitelisted tool, and reading the audit log. The settings window inside the app shows the same three views: Permissions, Whitelist, and Audit. Security is intentionally narrow. The CLI talks to the app over a private Unix domain socket inside the application support directory, using a token the app generates. Whitelist edits require local macOS authentication. Commands are matched by their exact absolute path, and every allow or deny decision is appended to a JSON-lines audit log under ~/Library/Logs/Fluegel. The author is clear that Fluegel is a convenience boundary for trusted local automation, not a sandbox or a privilege-escalation framework, and explicitly warns against feeding it untrusted input. The README labels the project as early, with reliable Reminders automation through rem as the first practical target.

Copy-paste prompts

Prompt 1
Build Fluegel with swift test and build-app.sh, install it into ~/Applications, and grant the Reminders permission
Prompt 2
Show me how to whitelist the rem binary so my Codex agent can list and create Apple Reminders through Fluegel
Prompt 3
Walk me through the Unix-domain-socket protocol Fluegel uses between the CLI and the app, including how the auth token is rotated
Prompt 4
Add support for a new TCC-gated capability like Calendar access following the existing Reminders pattern
Prompt 5
Write a launchd plist that starts Fluegel at login and tell me how to verify the audit log is being written correctly
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.