🔔 Ntfy Command Notifier
Wrap any Linux command so you get a push notification via
ntfy when it finishes — with the full output and exit code. Perfect for long-running jobs.
How it works: your command runs normally and you still see its output live in the terminal (tee). The output is also saved to a temp log; when the command exits, curl pushes the log and exit code to your ntfy topic, then the temp file is removed.
Notes: requires bash (uses PIPESTATUS to get the real exit code through the pipe). On ntfy.sh, bodies over ~4 KB are delivered as a .txt attachment automatically. For long jobs, run it inside screen or tmux so it survives SSH disconnects. Anyone who knows your topic name can read it — use a hard-to-guess topic.