Adjust the volume from the command line on macOS.
Using Homebrew:
brew tap dukecat0/taps
brew install dukecat0/taps/volumeUsing Mint:
mint install dukecat0/volume@v0.1.0Quick install (requires sudo for /usr/local/bin):
curl -sL https://raw.githubusercontent.com/dukecat0/volume/main/install.sh | shInstall manually — download the binary from the release page and add it to your PATH.
OVERVIEW: Adjust the volume from the terminal.
USAGE: volume [--input] [--alert] [--all] [--device <name>] [--list-devices] <up|down|value>
ARGUMENTS:
<up|down|value> Use up or down to increase or decrease the volume.
Input a value(0-100) to adjust the volume.
Default to output volume.
OPTIONS:
-i, --input Set input volume.
-a, --alert Set alert volume.
--all Set all volumes to the same level.
Including output, input and alert volume.
-d, --device <name> Set volume for a specific audio device by name.
-l, --list-devices List available audio output devices.
--version Show the version.
-h, --help Show help information.Increase the output volume:
$ volume upDecrease the output volume:
$ volume downSet the output volume to 10:
$ volume 10Set the input volume to 60:
$ volume --input 60Set the alert volume to 100:
$ volume --alert 100Set all volume(including output, input and alert volume) to 50:
$ volume --all 50If you want to adjust the volume from the command line faster, using alias would be a good choice:
alias vol="volume"