Terminal Faah
A VS Code extension that plays an audio clip whenever a terminal command fails (exits with a non-zero code).
How It Works
- You run a command in the VS Code integrated terminal
- If the command fails (exit code is not 0), a "Faah!" sound plays immediately
- Successful commands are silent
The extension uses VS Code's built-in Shell Integration to detect command exit codes. No extra setup is needed — it works out of the box.
Features
- Plays a sound on any terminal command failure
- Cross-platform support: works on macOS, Windows, and Linux
- Custom sound file support (MP3 or WAV)
- Enable/disable toggle without uninstalling
- Debounced playback — rapid consecutive failures only trigger one sound
- Zero runtime dependencies
Settings
Open VS Code Settings and search for "Terminal Faah":
| Setting |
Type |
Default |
Description |
terminalFaah.enabled |
boolean |
true |
Enable or disable the error sound |
terminalFaah.customErrorSoundPath |
string |
"" |
Absolute path to a custom sound file (MP3/WAV). Leave empty to use the bundled sound |
Custom Sound File Example
{
"terminalFaah.customErrorSoundPath": "/home/user/sounds/error.wav"
}
On Windows:
{
"terminalFaah.customErrorSoundPath": "C:\\Users\\user\\sounds\\error.wav"
}
Paths starting with ~ are expanded to your home directory automatically.
Requirements
- VS Code 1.93 or later
- Shell Integration must be enabled in the terminal (it is on by default)
If the extension does not seem to trigger, check that shell integration is active by looking for the command decoration icons (colored circles) next to commands in your terminal.
The extension uses native OS audio tools — no npm packages with native bindings are needed:
- macOS: Uses
afplay (built-in, supports MP3 and WAV)
- Windows: Uses PowerShell with
System.Windows.Media.MediaPlayer (supports MP3 and WAV)
- Linux: Uses
ffplay from the ffmpeg package (supports MP3 and WAV)
On Linux, if audio does not play, install ffmpeg:
# Ubuntu/Debian
sudo apt install ffmpeg
# Fedora
sudo dnf install ffmpeg
# Arch
sudo pacman -S ffmpeg
Known Limitations
- Only fires on commands run in the integrated terminal (not tasks or external terminals)
- Exit code must be explicitly reported by the shell — some shells or sub-shells may not report it
- Pressing Ctrl+C or hitting Enter on an empty line does not trigger the sound (by design)
License
MIT