░█▀█░█▀▀░█░░░█░▀█▀░▀█▀░█▀▀░█░█
░█▀█░▀▀█░█▄█▄█░░█░░░█░░█░░░█▀█
░▀░▀░▀▀▀░▀░▀░▀░▀▀▀░░▀░░▀▀▀░▀░▀
macOS audio output device switcher. Uses CoreAudio directly — no dependencies.
make install # installs to ~/.local/bin/aswitch
make install PREFIX=/usr/local # or system-wideEnsure ~/.local/bin is in your PATH.
aswitch # list output devices
aswitch list --json # list as JSON
aswitch get # current default device
aswitch get --json # current default as JSON
aswitch set 2 # switch by index
aswitch set airpods # switch by name (case-insensitive)
aswitch set <uid> # switch by CoreAudio UID
aswitch set --json airpods # switch with JSON confirmation
All --json output uses a consistent {index, name, uid, default} shape.
Errors go to stderr with non-zero exit.
make # show help
make build # build
make test # run tests
make validate # format + lint + build + test
make run ARGS='list --json'
Requires swift-format and swiftlint (brew install swift-format swiftlint).