MicGuard

Prevents Bluetooth audio devices from hijacking the default macOS microphone

View the Project on GitHub pszypowicz/MicGuard

CLI Reference

MicGuard doubles as a CLI tool. The mic-guard binary is symlinked to /usr/local/bin on install.

Home · Debugging · Integrations · Notifications · Releasing

Exit codes

Code Meaning
0 Success
1 Error (invalid arguments, device not found, etc.)

Commands

mic-guard list

List all input devices.

$ mic-guard list
MacBook Pro Microphone
External USB Mic
AirPods Pro

mic-guard current

Print the current default input device.

$ mic-guard current
External USB Mic

mic-guard set <name>

Set the default input device by name. Also updates the preferred-mic config file.

$ mic-guard set "External USB Mic"

mic-guard volume <0-100>

Set the input volume directly via CoreAudio. Runs without the daemon.

$ mic-guard volume 50

mic-guard mute

Toggle mute on the current input device. Posts a notification to the running daemon, which handles the toggle (using native mute if the device supports it, or soft-mute via volume otherwise). Requires the MicGuard daemon to be running.

$ mic-guard mute

mic-guard enable

Enable MicGuard. It will revert the default input device whenever it changes away from your preferred mic.

mic-guard disable

Disable MicGuard. The default input device can change freely.

mic-guard status

Print whether MicGuard is enabled or disabled.

$ mic-guard status
enabled

mic-guard ping

Ask the running MicGuard daemon to re-broadcast its current status. Posts a com.pszypowicz.MicGuard.requestStatus notification, which causes the daemon to respond with com.pszypowicz.MicGuard.statusChanged.

$ mic-guard ping

mic-guard version

Print the version. Also accepts --version and -v.

$ mic-guard version
mic-guard <version>

mic-guard help

Show usage information. Also accepts --help and -h.