This package provides cross-platform toast notification functionality for Windows and WSL (Windows Subsystem for Linux). Perfect for Claude Code hooks and other automation tasks.
- π Native Windows toast notifications using BurntToast PowerShell module
- π§ WSL integration with simple
toastcommand - π§ Easy installation with automatic dependency handling
- β¨ Works great with Claude Code hooks
- π― Supports both title and body text
Choose your installation method:
For Windows PowerShell/CMD environments
π Windows Installation Guide
Quick install:
Invoke-WebRequest 'https://gist.githubusercontent.com/ChrisColeTech/46928a028d372a0453d743de02c0a2f8/raw/6c15441bd22ad0635181e5cb27c92010bac06af7/windows_toast_install.ps1' -OutFile $env:USERPROFILE\Downloads\install_toast.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File $env:USERPROFILE\Downloads\install_toast.ps1For WSL/Linux environments (automatically handles Windows dependency)
Quick install:
curl -fsSL 'https://gist.githubusercontent.com/ChrisColeTech/e621bf196dedc59276385c4f7d73c3aa/raw/c62c384d3302d76a710c04c3a6433e69bf370ef0/wsl_toast_install.sh' -o ~/install_toast_wsl.sh && bash ~/install_toast_wsl.shFor macOS environments (uses native AppleScript - no additional installs needed)
Quick install:
curl -fsSL 'https://gist.githubusercontent.com/ChrisColeTech/[macos-install-script-url]' -o ~/install_toast_macos.sh && bash ~/install_toast_macos.shAfter installation, test with:
toast "Hello" "World"toast "Build Complete"
toast "Error" "Something went wrong"
toast "Long Running Task" "Your process has finished successfully"Perfect for Claude Code hooks! Add toast notifications to your Claude Code settings file to get notified of:
- Session starts/resumes
- Task completions
- Tool usage
- Errors requiring attention
See the installation guides for complete Claude Code configuration examples.
Hooks are configured in JSON files with this structure:
{
"hooks": {
"EventName": [
{
"matcher": "ToolPattern",
"hooks": [
{
"type": "command",
"command": "toast 'Title' 'Message'",
"timeout": 60
}
]
}
]
}
}Available Hook Events:
PreToolUse- Before tool executionPostToolUse- After tool executionNotification- For notificationsUserPromptSubmit- When user submits promptsStop- When sessions stopSubagentStop- When subagents stopPreCompact- Before context compactionSessionStart- When sessions begin
Configuration Parameters:
type: "command" (only supported type)command: Command to execute (e.g.,toast "Title" "Message")timeout: Optional timeout in secondsmatcher: Tool name pattern (exact, regex, or*wildcard)
Configuration Files:
~/.claude/settings.json(user-wide settings).claude/settings.json(project-wide settings).claude/settings.local.json(local project settings)
Temporarily Muting Hooks: To temporarily disable a specific hook:
- Comment out the hook entry with
//in the JSON file - Rename the event key (e.g.,
"PreToolUse"β"_PreToolUse") - Remove the hook entry temporarily
Note: Hooks are captured at startup, so restart Claude Code after making changes.
windows-notifications/
βββ README.md # Main overview (this file)
βββ README-Windows.md # Windows-specific installation guide
βββ README-WSL.md # WSL-specific installation guide
βββ README-macOS.md # macOS-specific installation guide
βββ windows_toast_install.ps1 # Local Windows installation script
βββ windows_toast_uninstall.ps1 # Local Windows uninstallation script
βββ wsl_toast_install.sh # Local WSL installation script (with auto-dependency handling)
βββ wsl_toast_uninstall.sh # Local WSL uninstallation script
βββ macos_toast_install.sh # Local macOS installation script (native AppleScript)
βββ macos_toast_uninstall.sh # Local macOS uninstallation script
- Uses BurntToast PowerShell module for native Windows notifications
- Creates
toast.ps1andtoast.cmdin user bin directory - Adds PowerShell aliases for easy access
- Automatically detects Windows username and installation
- Downloads and installs Windows dependency if needed
- Creates bash/zsh function that calls Windows PowerShell script
- Seamless integration between WSL and Windows notification system
- Uses native AppleScript (
osascript) - no additional installs required - Optional enhanced features with terminal-notifier or alerter
- Creates bash/zsh function for cross-platform compatibility
- Native macOS notification center integration
- Windows 10/11
- PowerShell 5.1+
- Internet connection (for BurntToast module)
- Windows 10/11 with WSL installed
- Internet connection (for downloading dependencies)
- macOS 10.9+ (any reasonably recent version)
- No additional software required (uses built-in AppleScript)
For issues or questions: