Send desktop notifications from your terminal that can focus specific VS Code instances! This extension displays native OS notifications that appear outside of VS Code, allowing you to stay aware of important events across all your workspaces and quickly switch to the relevant project.
- π₯οΈ Native Desktop Notifications: Notifications appear in your system's notification center (macOS Notification Center, Windows Action Center, Linux notify-send)
- π― Click-to-Focus: Clicking a notification brings the exact VS Code window/workspace to the front
- π’ Multi-Workspace Aware: Each notification shows which workspace it came from with clear workspace names
- π Background Visibility: Notifications appear even when VS Code is minimized or you're working in other applications
- π Cross-Platform: Works seamlessly on macOS, Windows, and Linux
- β‘ Zero Configuration: Automatic port management handles multiple VS Code instances without conflicts
- π¨ Visual Types: Different icons for info (βΉοΈ), warning (
β οΈ ), and error (β) notifications
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "VS Code Desktop Notify"
- Click Install
After installing the extension, install the command-line tool:
# Install globally (recommended)
npm install -g vscode-notify-desktop
# Or install locally in your project
npm install vscode-notify-desktop
# Or use without installing
npx vscode-notify-desktop "Your message"Note: The command is now vscode-notify-desktop for full consistency.
# Simple info notification
vscode-notify-desktop "Build completed successfully!"
# Warning notification
vscode-notify-desktop "Low disk space detected" --type warning
# Error notification
vscode-notify-desktop "Tests failed!" --type error# After a long build process
make build && vscode-notify-desktop "β
Build completed" || vscode-notify-desktop "β Build failed" --type error
# Git hooks
git commit && vscode-notify-desktop "π Commit successful"
# Test runs
npm test && vscode-notify-desktop "β
All tests passed" || vscode-notify-desktop "β Tests failed" --type error
# Deployment notifications
deploy.sh && vscode-notify-desktop "π Deployment successful" --type info
# Long-running scripts
./long-process.sh; vscode-notify-desktop "Process finished" --type info# Target specific VS Code instance by port
vscode-notify-desktop "Custom message" --port 7532
# Broadcast to all running VS Code instances
vscode-notify-desktop "Important announcement" --all
# Show all available options
vscode-notify-desktop --helpgraph TD
A[Terminal Command] --> B[CLI Tool]
B --> C[Find VS Code Instance]
C --> D[Read .vscode/vscode-notify-port.json]
D --> E[Send HTTP Request]
E --> F[VS Code Extension]
F --> G[Desktop Notification]
G --> H[User Clicks]
H --> I[Focus VS Code Window]
- Extension Startup: When VS Code starts, the extension creates an HTTP server on an available port (7531-7540)
- Port Discovery: Port information is saved to
.vscode/vscode-notify-port.jsonin your workspace - CLI Detection: The CLI tool automatically finds the correct VS Code instance based on your current directory
- Notification Delivery: Sends notification data via HTTP POST to the extension
- Desktop Display: Extension shows native OS notification with workspace context
- Click Handling: Clicking the notification opens and focuses the specific VS Code workspace
Perfect for developers working with multiple projects simultaneously:
- Each VS Code window gets its own unique port
- CLI automatically detects which workspace you're in
- Notifications show clear workspace names in the title
# Terminal in ~/projects/frontend
cd ~/projects/frontend
vscode-notify-desktop "Frontend build complete"
# Shows: "βΉοΈ frontend - Frontend build complete"
# Terminal in ~/projects/backend
cd ~/projects/backend
vscode-notify-desktop "API tests passed" --type info
# Shows: "βΉοΈ backend - API tests passed"# Send to specific instance
vscode-notify-desktop "Message" --port 7533
# Send to all instances
vscode-notify-desktop "Server maintenance in 5 minutes" --all# Clone the repository
git clone <repository-url>
cd vscode-notify
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes during development
npm run watch
# Run tests
npm test
# Package extension
npm run packagevscode-notify-desktop/
βββ src/
β βββ extension.ts # Main extension code
βββ cli/
β βββ vscode-notify-desktop.js # Command-line interface
βββ out/ # Compiled JavaScript
βββ package.json # Extension manifest
βββ README.md # This file
- Extension: HTTP server with desktop notification integration
- CLI: Lightweight Node.js script for sending notifications
- Communication: JSON over HTTP with automatic port discovery
- Focus: Platform-specific window focusing using OS commands
Notifications not appearing:
# Check if extension is running
ls .vscode/vscode-notify-desktop-port.json
# Test with explicit port
vscode-notify-desktop "test" --port 7531
# Check VS Code developer console
# Help > Toggle Developer Tools > ConsoleWrong VS Code instance focused:
# Ensure you're in the correct directory
pwd
# Check port file contents
cat .vscode/vscode-notify-desktop-port.json
# Use specific port if needed
vscode-notify-desktop "message" --port 7532CLI not found:
# Reinstall globally
npm install -g vscode-notify-desktop
# Or use npx
npx vscode-notify-desktop "message"macOS:
- Notifications appear in Notification Center
- Requires notification permissions for VS Code
- Click-to-focus uses
opencommand
Windows:
- Notifications appear in Action Center
- Works with Windows 10/11 toast notifications
- Focus behavior may vary based on Windows version
Linux:
- Uses
notify-sendor similar notification daemon - Requires notification service to be running
- Focus behavior depends on window manager
- VS Code: Version 1.102.0 or higher
- Node.js: Version 14 or higher (for CLI tool)
- Operating System: macOS, Windows 10+, or Linux with notification support
We welcome contributions! Please see our Contributing Guide for details.
- π Improved cross-platform compatibility
- π¨ Custom notification themes
- π± Mobile integration (VS Code on tablets)
- π§ Additional CLI options
- π Documentation improvements
MIT License - see LICENSE file for details.
- Built with node-notifier for cross-platform notifications
- Inspired by the need for better developer workflow integration
- Thanks to the VS Code extension community for guidance and best practices
Made with β€οΈ for developers who love staying informed across multiple projects