A macOS control CLI built with Zig. Control audio, display, appearance, Bluetooth, input method, Finder, Dock, and more — all from your terminal.
zig build -Doptimize=ReleaseFast
cp zig-out/bin/macc /usr/local/bin/Requires macOS and Zig >= 0.16.0.
Switch default input/output audio devices.
macc audio output list # List output devices (* = current)
macc audio output get # Show current default
macc audio output set "MacBook Pro Speakers"
macc audio input list
macc audio input get
macc audio input set "MacBook Pro Microphone"Control system volume.
macc volume get # 0-100
macc volume set 50
macc volume up # +5 (default step)
macc volume up 10 # +10
macc volume down # -5
macc volume down 10 # -10
macc volume mute
macc volume unmute
macc volume toggle # Toggle muteManage displays — resolution, primary display, and layout save/restore. Display names, UUIDs, and current modes are shown in the list.
macc display list # List all displays (name, ID, UUID, mode, position)
macc display mode list # Available modes for all displays
macc display mode list <id> # Available modes for a display
macc display mode list <id> --hidpi # HiDPI modes only
macc display mode list <id> --no-hidpi # Non-HiDPI modes only
macc display mode list <id> --hz 144 # 144Hz modes only
macc display mode list <id> --ratio 16:9 # 16:9 only (also 16:10, 4:3, 21:9, 32:9)
macc display mode list <id> --hidpi --hz 120 --ratio 16:9 # Combine filters
macc display mode get <id> # Current mode
macc display mode set <id> 2560x1440
macc display mode set <id> 1920x1080 --hz 144
macc display mode set <id> 1920x1080 --hidpi # Prefer HiDPI mode
macc display primary get # Show current primary display
macc display primary set <id> # Set primary (moves Dock & menu bar)
macc display layout get # Print current layout (pipe-friendly)
macc display layout apply <entry>... # Restore a saved layoutDisplay IDs accept numeric IDs, full UUIDs, or UUID prefixes:
macc display mode get 6
macc display mode get 1092 # UUID prefix (unambiguous)
macc display mode get 10921E9E-FC76-40F2-9E0E-E2DB6D3D3BEASidecar, AirPlay, and other virtual displays are automatically identified by name.
Save and restore display layouts:
# Save
macc display layout get > ~/work.layout
# Restore
cat ~/work.layout | xargs macc display layout applySwitch keyboard input methods.
macc ime list # List input sources (* = current)
macc ime get # Current input source ID
macc ime set com.apple.keylayout.ABC
macc ime next # Cycle to next input sourceToggle Finder settings.
macc finder hidden on|off|toggle|get # Hidden files
macc finder extensions on|off|toggle|get # File extensions
macc finder pathbar on|off|toggle|get # Path bar
macc finder statusbar on|off|toggle|get # Status bar
macc finder desktop on|off|toggle|get # Desktop icons
macc finder close # Close all Finder windowsControl Dock appearance and behavior.
macc dock hide on|off|toggle|get # Auto-hide
macc dock position get|set left|bottom|right
macc dock size get|set <16-128> # Icon size in pixels
macc dock mag on|off|toggle|get # Magnificationmacc menubar hide on|off|toggle|getControl dark mode and accent color.
macc appearance get # "dark" or "light"
macc appearance dark # Enable dark mode
macc appearance light # Enable light mode
macc appearance toggle # Toggle dark/light
macc appearance accent get # Current accent color name
macc appearance accent set blue # Set accent color
# Colors: multicolor, blue, purple, pink, red, orange, yellow, green, graphiteControl Bluetooth power and manage paired devices.
macc bt power on|off|toggle|get
macc bt list # List paired devices (* = connected)
macc bt connect "AirPods Pro" # Connect by name (prefix match)
macc bt disconnect "AirPods Pro"macc/
├── src/
│ ├── main.zig # CLI app definition
│ ├── root.zig # Business logic (macc module)
│ └── cmd/ # Command handlers
│ ├── audio.zig
│ ├── volume.zig
│ ├── display.zig
│ ├── ime.zig
│ ├── finder.zig
│ ├── dock.zig
│ ├── menubar.zig
│ ├── appearance.zig
│ └── bluetooth.zig
├── pkg/
│ ├── cli/ # Comptime CLI framework
│ └── macos/ # macOS framework bindings
│ └── src/
│ ├── coreaudio/
│ ├── corefoundation/
│ ├── coregraphics/
│ └── hitoolbox/
└── ref/ # Reference implementations
MIT