brainrot-errors
v1.0.4
Published
Plays a sound whenever a terminal command outputs an error
Readme
brainrot-errors
Plays a sound whenever a terminal command outputs an error. Because why stare at your terminal when you can HEAR your failures? 🎵
Installation
npm install -g brainrot-errorsOr use without installing:
npx brainrot-errors <command>Quick Start
# Wrap any command - plays sound on error
brainrot tsc --watch
brainrot next dev
brainrot npm run build
# Show help
brainrot --helpCLI Commands
| Command | Description |
|---------|-------------|
| brainrot <command> | Run any command and watch for errors |
| brainrot --sounds | List available sound files |
| brainrot --set-sound <filename> | Set which sound plays on error |
| brainrot --config | Show config directory path |
| brainrot --uninstall | Show clean uninstall instructions |
| brainrot --help | Show help message |
Examples
TypeScript Watch Mode
brainrot tsc --watch
# Plays sound when TypeScript errors occurNext.js Development
brainrot next dev
# Plays sound on build errorsnpm scripts
brainrot npm run build
brainrot npm run devPython
brainrot python main.py
# Plays sound on Python exceptions/tracebacksRust
brainrot cargo build
# Plays sound on Rust compile errorsSound Files
Where to put sounds
User custom sounds (recommended):
~/.config/brainrot-errors/sounds/Bundled sounds (in package):
./sounds/
Supported formats
.mp3.wav
Sound selection modes
random- plays a random sound from available files (default)- Specific filename - plays that exact file
# Set to random (default)
brainrot --set-sound random
# Set to specific sound
brainrot --set-sound explosion.wavAdding sounds
# Create sounds directory
mkdir -p ~/.config/brainrot-errors/sounds
# Copy your sound files there
cp mysound.mp3 ~/.config/brainrot-errors/sounds/
# List available sounds
brainrot --soundsError Detection
The package detects errors from:
- TypeScript:
error TS2345:,error TS2304:, etc. - Next.js/Vite/webpack: Build failures, compilation errors
- Node.js: TypeError, ReferenceError, SyntaxError, etc.
- Python: Tracebacks, exceptions
- Rust: Compile errors
- Go: Compile errors
- General: "error:", "failed", "build failed", "cannot find module"
Ignored patterns (false positives)
- "0 errors"
- "compiled successfully"
- "no errors"
- "errorHandler" (variable names)
Configuration
Config is stored at: ~/.config/brainrot-errors/config.json
{
"sound": "random",
"volume": 1
}Volume control
Edit the config file directly to adjust volume (0.0 to 1.0):
{
"sound": "random",
"volume": 0.5
}Clean Uninstall
# Remove the global package
npm uninstall -g brainrot-errors
# Remove config and custom sounds
rm -rf ~/.config/brainrot-errorsThat's it! Nothing else is left behind.
How it works
- Wraps your command and runs it
- Watches both stdout and stderr for error patterns
- Plays a sound file when an error is detected
- Falls back to terminal bell (
\x07) if no sound file found
License
MIT
