This guide covers installing toast notifications for Windows PowerShell/CMD environments.
- ✅ Automatic Backup: Your existing
.claude/settings.jsonis backed up with a timestamp - ✅ Non-Hook Settings Preserved: Model preferences, API keys, etc. are kept
⚠️ Hooks Are Replaced: Any existing Claude Code hooks will be replaced with toast notification hooks- 📍 Backup Location:
C:\Users\[YourUsername]\.claude\settings.json.backup_YYYYMMDD_HHMMSS
- Predictable behavior - You know exactly what hooks are active
- No conflicts - Prevents duplicate or conflicting hook configurations
- Clean installation - Ensures toast notifications work optimally
- Easy troubleshooting - Clear hook configuration for debugging
- Your hooks will be backed up automatically before installation
- Toast notification hooks will replace them for optimal functionality
- To restore your old hooks: Copy from the backup file after installation
- To merge hooks manually: Edit the settings.json file after installation
-
Open PowerShell as a normal user (no admin rights required)
-
Download the installation script:
curl.exe -fsSL 'https://gist.githubusercontent.com/ChrisColeTech/1f79919c60bf210982a04bc607a1a1d7/raw/windows_toast_install.ps1' -o install_toast.ps1
-
Execute the installation script:
powershell -NoProfile -ExecutionPolicy Bypass -File install_toast.ps1
-
Wait for the "Setup complete" message
-
Close and re-open your terminal for PATH and profile changes to take effect
toast "Hello" "This is a test"If you see a Windows toast notification, the installation was successful!
- BurntToast PowerShell module - Handles creating Windows notifications
- toast.ps1 - PowerShell script in
%USERPROFILE%\bin\ - toast.cmd - CMD wrapper in
%USERPROFILE%\bin\ - PATH update - Adds
%USERPROFILE%\bin\to your user PATH - PowerShell profile - Adds
toastandtaliases
toast "Build Complete"
toast "Error" "Something went wrong"
toast "Long Running Task" "Your process has finished successfully"# Full command
toast "Title" "Body"
# Short alias
t "Quick notification"C:\Users\[YourUsername]\.claude\settings.json
{
"model": "sonnet",
"hooks": {
"SessionStart": [
{
"matcher": "startup",
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"New session started - Ready to help!\""
}
]
},
{
"matcher": "resume",
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"Session resumed - Continuing where we left off\""
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"Processing your request...\""
}
]
}
],
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"Executing bash command\""
}
]
},
{
"matcher": "Task",
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"Starting specialized task agent\""
}
]
}
],
"PostToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"File created successfully\""
}
]
},
{
"matcher": "Edit",
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"File edited successfully\""
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"⚠️ User input needed to continue\""
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"✅ Task completed successfully\""
}
]
}
],
"SubagentStop": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"🤖 Subagent task finished\""
}
]
}
]
}
}| Hook Type | When It Triggers | Purpose |
|---|---|---|
SessionStart |
New session or resume | Welcome notifications |
UserPromptSubmit |
When you send a message | Confirms input received |
PreToolUse |
Before tool execution | Shows what's about to happen |
PostToolUse |
After successful tool use | Confirms completion |
Notification |
Claude needs permission or idle timeout | Attention alerts |
Stop |
Main agent finishes responding | Task completion |
SubagentStop |
Specialized agent finishes | Subtask completion |
For a simpler setup, use just the essential hooks:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"Task complete\""
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"Input needed\""
}
]
}
]
}
}For the most important notifications, use these critical hooks:
{
"model": "sonnet",
"hooks": {
"SessionStart": [
{
"matcher": "startup",
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"New session started - Ready to help!\""
}
]
},
{
"matcher": "resume",
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"Session resumed - Continuing where we left off\""
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"⚠️ User input needed to continue\""
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"✅ Task completed successfully\""
}
]
}
],
"SubagentStop": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"🤖 Subagent task finished\""
}
]
}
],
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"📝 Compacting context to continue\""
}
]
}
]
}
}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 (PowerShell compatible on Windows)timeout: Optional timeout in secondsmatcher: Tool name pattern (exact, regex, or*wildcard)
Configuration Files (in order of precedence):
.claude/settings.local.json(local project settings).claude/settings.json(project-wide settings)C:\Users\[YourUsername]\.claude\settings.json(user-wide settings)
Temporarily Muting Hooks: To temporarily disable specific hooks:
- Comment out: Add
//before the hook entry in JSON - Rename event: Change
"PreToolUse"to"_PreToolUse" - Remove temporarily: Delete the hook entry
Example of commenting out a hook:
{
"hooks": {
// "PreToolUse": [
// {
// "matcher": "Bash",
// "hooks": [
// {
// "type": "command",
// "command": "toast \"Claude Code\" \"Executing bash command\""
// }
// ]
// }
// ],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "toast \"Claude Code\" \"Task complete\""
}
]
}
]
}
}Important: Hooks are captured at startup, so restart Claude Code after making changes.
curl.exe -fsSL 'https://gist.githubusercontent.com/ChrisColeTech/c7c8d4fb8f8e72ac01722cb5d5ce79f9/raw/windows_toast_uninstall.ps1' -o uninstall_toast.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File uninstall_toast.ps1- Remove
%USERPROFILE%\bin\toast.ps1and%USERPROFILE%\bin\toast.cmd - Remove
%USERPROFILE%\bin\from your user PATH - Remove toast functions from your PowerShell profile
- Optionally:
Uninstall-Module -Name BurntToast -Force
- Ensure PowerShell execution policy allows module installation
- Try running PowerShell as Administrator
- Manually install:
Install-Module -Name BurntToast -Scope CurrentUser
- Run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - Or use:
powershell -ExecutionPolicy Bypass -File script.ps1
- Restart your terminal for PATH changes to take effect
- Verify
%USERPROFILE%\bin\is in your PATH - Check that
toast.cmdexists in%USERPROFILE%\bin\
- Windows 10/11
- PowerShell 5.1 or later
- Internet connection for BurntToast module installation
- User-level permissions (no admin required)
- For WSL Integration: See README-WSL.md for WSL setup
- For Development: Check out the local scripts in this directory