ntfy brings notification to your shell. It can automatically provide desktop notifications when long running commands finish or it can send push notifications to your phone when a specific command finishes. Confused? This video demonstrates some of this functionality:

The install technique in the quickstart is the suggested method of installation. It can be installed in a virtualenv, but with some caveats: Linux notifications require --system-site-packages for the virtualenv and OS X notifications don’t work at all.

:penguin: NOTE: Linux Desktop Notifications require Python DBUS bindings. See here for more info.

Shell integration¶ ntfy has support for automatically sending notifications when long running commands finish in bash and zsh. In bash it emulates zsh’s preexec and precmd functionality with rcaloras/bash-preexec. To enable it add the following to your .bashrc or .zshrc : eval "$(ntfy shell-integration)" By default it will only send notifications for commands lasting longer than 10 seconds and if the terminal is focused. Terminal focus works on X11(Linux) and with Terminal.app and iTerm2 on MacOS. Both options can be configured via the --longer-than and --foreground-too options. To avoid unnecessary notifications when running interactive programs, programs listed in AUTO_NTFY_DONE_IGNORE don’t generate notifications. For example: export AUTO_NTFY_DONE_IGNORE = "vim screen meld"