Setup script for MT — Mosh Terminal push notifications with Claude Code.
MT uses Claude Code's Hooks to send push notifications — task completion and permission requests reach your iPhone and Apple Watch with the actual content of what Claude was doing.
curl -sL https://raw.githubusercontent.com/Jaga-Studio/mt-push-hooks/main/setup-hooks.sh | sh -s YOUR-DEVICE-SECRETReplace YOUR-DEVICE-SECRET with the value from MT → Settings → Push Notifications.
Requirements: Node.js (always available if Claude Code is installed)
The script will ask for confirmation before making changes. To skip the prompt (e.g., from in-app auto-setup), add --yes:
curl -sL https://raw.githubusercontent.com/Jaga-Studio/mt-push-hooks/main/setup-hooks.sh | sh -s YOUR-DEVICE-SECRET --yesThe script installs ~/.claude/hooks/mt-push-notify.sh and adds two hooks to ~/.claude/settings.json:
| Hook | Event | Notification Content |
|---|---|---|
| Stop | agent-done |
First 200 chars of Claude's last response |
| Notification | agent-input |
The actual permission request message |
- Shows what will be changed and asks for confirmation before proceeding
- Safely merges with your existing settings (no overwriting)
- Creates a backup before modifying (
settings.json.bak) - Automatically upgrades from older inline curl hooks
- Re-running the script refreshes the notification script without duplicating hooks
MT uses the same secret across all devices signed into the same Apple ID. Notifications are delivered to all your devices (iPhone, iPad, Apple Watch) from a single hook setup.
If you previously set up MT Push hooks, just re-run the setup command. It will automatically replace the old inline curl hooks with the new script-based version.
When your device secret changes (e.g., after iCloud sync), use --cleanup to deregister the old secret:
curl -sL https://raw.githubusercontent.com/Jaga-Studio/mt-push-hooks/main/setup-hooks.sh | sh -s NEW-SECRET --cleanup OLD-SECRETIf you prefer not to run the automated script:
- Download
mt-push-notify.shto~/.claude/hooks/ - Replace
__MT_DEVICE_SECRET__with your device secret - Make it executable:
chmod +x ~/.claude/hooks/mt-push-notify.sh - Merge
hooks-template.jsoninto~/.claude/settings.json
For the template content, see hooks-template.json.
For full setup instructions including enabling push notifications in the MT app, see the Getting Started Guide.
MIT