# Install switchaudio-osx with Homebrew, MacPorts, Nix

Change macOS audio source from the command-line. Version 1.2.2 via Homebrew; verified from local package data. Also installable with nix: nix profile install nixpkgs#switchaudio-osx.

## Install

```sh
sudo av install brew:switchaudio-osx
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install switchaudio-osx
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install switchaudio-osx
```

  Evidence: MacPorts ports tree: audio/switchaudio-osx/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#switchaudio-osx
```

  Evidence: nixpkgs package indexes: pkgs/by-name/sw/switchaudio-osx/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:switchaudio-osx
- **Package manager:** Homebrew
- **Version:** 1.2.2
- **Source summary:** Change macOS audio source from the command-line
- **Homepage:** <https://github.com/deweller/switchaudio-osx/>
- **Repository:** <https://github.com/deweller/switchaudio-osx>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- SwitchAudioSource (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.2.2
## Project history and usage

SwitchAudioSource is a macOS command-line utility for switching the system audio source without opening the graphical sound settings. Its appeal is narrow but durable: shell users, automation users, and hotkey-tool users can script audio input, output, system device, mute, and cycling behavior.

### Project history

The upstream README describes a command-line-only utility for Mac OS X, tested across OS X 10.7 through macOS 11.2. The license and README credit Devon Weller beginning in 2008 and Christian Zuckschwerdt for migrating the project to GitHub and adding the next-device option.

### Adoption history

The README explicitly documents Homebrew installation, and the input package facts show the same utility distributed through Homebrew, MacPorts, and Nix. That spread is typical for small macOS-native command-line tools that remain useful because they wrap a missing shell affordance.

### How it is used

Users run SwitchAudioSource to list devices, print the current device, set a device by name, id, or uid, choose input/output/system device type, select human/CLI/JSON output, or toggle mute status for input or output devices. The README gives microphone muting as a hotkey-oriented use case.

### Why package nerds care

Package nerds care because this is exactly the kind of tiny Mac utility package managers preserve: a single-purpose CLI that exposes system behavior to scripts, dotfiles, launchers, and keyboard automation.

### Timeline

- 2008: Copyright attribution begins for Devon Weller in the upstream license/README.
- 2011: Copyright attribution begins for Christian Zuckschwerdt in the upstream README.
- Homebrew era: The README documents brew install switchaudio-osx.
- macOS 11.2 era: The README states the utility was tested through OS 11.2.

### Related projects

- The project is related to macOS automation, hotkey managers, and dotfile scripts that need to select audio devices without GUI interaction.

### Sources

- <https://github.com/deweller/switchaudio-osx>
- <https://github.com/deweller/switchaudio-osx#readme>
- source_facts.executables
- source_facts.package-manager


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Other Package-Manager Records

- Nix - switchaudio-osx: normalized package name match | nixpkgs package indexes: pkgs/by-name/sw/switchaudio-osx/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - switchaudio-osx: normalized package name match | MacPorts ports tree: audio/switchaudio-osx/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/switchaudio-osx.yml](https://github.com/mxcl/pkgdb/blob/main/combined/switchaudio-osx.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
