Terminal Failure Notifier
A Visual Studio Code extension that plays a sound whenever a terminal command fails or is not recognized.
Features
- 🔊 Automatically plays a sound when terminal commands fail (non-zero exit code)
- 🚫 Detects "command not found" messages across Windows, macOS, and Linux
- 🎵 Supports custom sound files
- ⚙️ Configurable settings
- 🧪 Test command to preview the sound
Installation
From Source
- Clone or download this extension
- Open the extension folder in VS Code
- Run
npm install to install dependencies
- Run
npm run compile to compile TypeScript
- Press F5 to open a new VS Code window with the extension loaded
Using VSCE
- Install vsce:
npm install -g @vscode/vsce
- Package the extension:
vsce package
- Install the .vsix file:
code --install-extension terminal-failure-notifier-1.0.0.vsix
Configuration
Open VS Code settings and configure:
terminalFailureNotifier.enableSound: Enable/disable sound notifications (default: true)
terminalFailureNotifier.customSoundPath: Path to your custom sound file (leave empty for default)
Example settings.json:
{
"terminalFailureNotifier.enableSound": true,
"terminalFailureNotifier.customSoundPath": "C:\\Users\\YourName\\sounds\\error.mp3"
}
Usage
- Open the integrated terminal in VS Code
- Run any command that fails or is not recognized
- Hear the notification sound
Test the Sound
- Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Run: "Test Failure Sound"
- ✅ Windows
- ✅ macOS
- ✅ Linux
Requirements
- VS Code 1.75.0 or higher
- Node.js (for development)
Development
Build
npm install
npm run compile
Watch Mode
npm run watch
Package
npm install -g @vscode/vsce
vsce package
License
MIT
| |