For a quick success-only cue in Terminal, append && afplay and a local sound file to the command you already intended to run. macOS includes afplay; no additional sound app is required.
Try a harmless example
This waits one second and then plays the system Glass sound if that file is present:
sleep 1 && afplay /System/Library/Sounds/Glass.aiff
Start with a modest output volume. Replace sleep 1 with your known command only after confirming the sound and selected output.
Choose the condition deliberately
&& runs the sound only when the first command exits successfully. A command followed by ; afplay ... plays after either outcome, so the same sound can no longer tell you success from failure.
The final shell status can also become the player’s status. For scripts or CI, save and return the original command status rather than letting a missing sound file change the result. The two-outcome example demonstrates that pattern.
Know where it runs
A command entered over SSH runs on the remote machine. Its sound player will not automatically use your local Mac’s speakers. Cloud jobs need an appropriate completion channel of their own.
For supported local coding agents, TapNoise’s integration avoids appending a player to each turn. A finished command is still only an exit event, so read its output before treating the task as complete.
Sources: macOS afplay -h and shell conditional-command behaviour; TapNoise agent guide.
TapNoise