ControlPlane

May 15, 2026 · View on GitHub

⚠️ Alpha software. ControlPlane is under active development. Expect bugs, missing features, and breaking changes between releases. It is not yet suitable for daily use.

ControlPlane is a macOS menu-bar app that automatically switches your Mac's configuration based on where you are and what's happening around you. Connect to your home Wi-Fi and your "Home" profile activates — closing apps, changing your default printer, mounting a network share. Plug in your work monitor and your "Work" profile takes over. Disconnect from both and everything reverts.

This is a modern Swift rewrite of the original ControlPlane, rebuilt from the ground up for current macOS.


How it works

Sensors observe the environment continuously — Wi-Fi networks, connected Bluetooth devices, USB peripherals, power state, screen lock status, time of day, and more.

Rules compare sensor readings against expected values. Each matching rule contributes a confidence weight toward its profile.

Profiles activate when their confidence threshold is met. A profile with a single rule and the default threshold activates as soon as that one rule matches. Multiple rules let you require more specific conditions.

Actions fire when a profile activates or deactivates — run a macOS Shortcut, execute a shell script, open or quit an application, change your desktop background, and more.

Wi-Fi SSID = "HomeNetwork"  → +1.0 confidence
Bluetooth "AirPods" connected → +1.0 confidence

                              Profile "Home" threshold: 1.0 → ACTIVE

                              Actions: mount NAS, set default printer

Sensors

SensorWhat it detects
Wi-FiConnected network SSID, BSSID, signal strength
BluetoothConnected devices, adapter power state
USBConnected devices by vendor/product ID
PowerBattery vs. AC, charging state, low power mode
Network LinkActive network interfaces
IP AddressAssigned addresses per interface
DNSServers, search domains
MonitorConnected displays, external display count
Mounted VolumeAttached disks and network shares
Active ApplicationFrontmost app
Running ApplicationWhether a specific app is running
Screen LockLocked/unlocked state
Laptop LidOpen/closed state
Audio OutputActive output device
Host AvailabilityWhether a hostname is reachable
Time of DayHour, minute, day of week
File PresenceWhether a file or directory exists

Actions

ActionWhat it does
Run ShortcutExecute a macOS Shortcut by UUID
Shell ScriptRun any script with arguments
OpenOpen a file, app, or folder
Open URLOpen a URL in the default browser
Open & HideOpen an app and immediately hide it
Quit ApplicationQuit (or force-quit) an app by bundle ID
SpeakSpeak text via the system voice
Mount VolumeMount an SMB or AFP network share
Unmount VolumeEject a volume
Desktop BackgroundChange wallpaper on one or all screens
Toggle Wi-FiTurn Wi-Fi on or off
Start Time MachineTrigger a Time Machine backup
Set Time Machine DestinationSwitch backup target
Prevent Display SleepEnable or disable display sleep prevention
Prevent System SleepEnable or disable system sleep prevention
Start Screen SaverLaunch the screen saver immediately
Lock KeychainLock the default keychain
Network LocationSwitch macOS network location
Default PrinterChange the default printer

Requirements

  • macOS 13 Ventura or later
  • Apple Silicon or Intel Mac

Building from source

Requires Xcode 15+ and Swift 5.9+.

# Build universal binaries (arm64 + x86_64)
make build

# Build, assemble app bundle, and launch
make run

cpctl

ControlPlane ships with cpctl, a command-line interface for managing profiles, rules, and actions without a GUI. On first launch the app installs it to ~/.local/bin/cpctl.

cpctl status
cpctl profiles list
cpctl rules list
cpctl sensors readings
cpctl evaluators list
cpctl --help

Status

This rewrite is alpha. The core engine is functional — sensors run, rules evaluate, profiles activate, actions fire — but the following are not yet complete:

  • No GUI beyond the menu bar icon. All configuration is done via cpctl.
  • No auto-update mechanism.
  • No code signing or notarization for distribution builds.
  • The database schema may change between versions with no migration path.

The original Objective-C ControlPlane is preserved on the master branch for reference.


License

GNU General Public License v2.0 — see LICENSE for the full text.