Command reference
ed audio-devices
ed audio-devices controls the Audio Devices extension: which output and
microphone are in use, favorite outputs for the switcher, device priority and
per-app output. Running it without a subcommand is the same as
ed audio-devices status. Per-app volume belongs to ed audio.
| Command | What it does |
|---|---|
ed audio-devices status |
List outputs, inputs, favorites, priority and per-app routes |
ed audio-devices use |
Switch the output or microphone in use |
ed audio-devices next |
Switch to the next favorite output |
ed audio-devices favorite |
Add or remove a favorite output |
ed audio-devices priority |
Show or set the output or microphone priority order |
ed audio-devices route |
Send one app to its own output, or stop |
ed audio-devices input-level |
Set the level of the microphone in use |
A device is named by its id (from --json), its full name, or a unique part of
its name. A name that matches more than one device exits 2 and lists the matches.
Every command needs Audio Devices to be enabled; a stopped extension exits 4.
Settings
The rest of Audio Devices lives in its settings, so ed config reads and
writes it:
| Key | Values | What it does |
|---|---|---|
audioDevicesShowHUD |
true, false |
Show the overlay after a switch or a volume key |
audioDevicesAutoSwitchOutput |
true, false |
Use the highest connected output when a device connects or disconnects |
audioDevicesAutoSwitchInput |
true, false |
The same for microphones |
audioDevicesHeadphonesAction |
off, lowerVolume, pause, lowerAndPause |
What happens when headphones disconnect |
audioDevicesHeadphonesVolume |
0 to 100 | The level lowerVolume lowers to |
audioDevicesVolumeSteps |
standard, half, quarter |
How far each volume key press moves |
audioDevicesBlockMusicLaunch |
true, false |
Close Music when the play key opens it and no player was running |
Half and quarter volume steps and Music blocking need Accessibility. Per-app output needs audio access and macOS 14.4 or later.
Worker operations
Every action is also an ed invoke operation. Each one
takes a JSON object and returns the same status object as
ed audio-devices status --json. An error exits non-zero with a JSON error
message on stderr.
| Operation | Input | What it does |
|---|---|---|
audioDevices.status |
{} |
Read the status |
audioDevices.select |
{"uid":"…","scope":"output"} |
Use a device; scope is output or input |
audioDevices.cycle |
{} |
Switch to the next favorite output |
audioDevices.favorite |
{"uid":"…","favorite":true} |
Add or remove a favorite |
audioDevices.favorites |
{"uids":["…"]} |
Replace the favorites in order |
audioDevices.priority |
{"scope":"output","uids":["…"]} |
Replace a priority order |
audioDevices.priority.add |
{"scope":"input","uid":"…"} |
Add a device at the end of a priority order |
audioDevices.priority.remove |
{"scope":"output","uid":"…"} |
Remove a device from a priority order |
audioDevices.priority.move |
{"scope":"output","uid":"…","offset":-1} |
Move a device up (negative) or down |
audioDevices.route |
{"bundleID":"com.apple.Music","deviceUID":"…"} |
Send an app to an output |
audioDevices.route.clear |
{"bundleID":"com.apple.Music"} |
Let the app follow the system output again |
audioDevices.routes.retry |
{} |
Retry routes that failed, for example after allowing audio access |
audioDevices.inputLevel |
{"level":0.7} |
Set the microphone level from 0 to 1 |
audioDevices.accessibility |
{} |
Ask macOS for Accessibility for the volume and play keys |
ed invoke audioDevices audioDevices.select --json '{"uid":"synthetic-display"}'ed invoke audioDevices audioDevices.route --json '{"bundleID":"com.apple.Music","deviceUID":"synthetic-display"}'