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LjQ5NiAxMi4zNzYgMjguNjA3IDI4Ljc3NyA1LjcyMiAyMi43OCA1Ljk3NiAzOS44MTcgMCA1Ny41NzQtNS43ODUgMTcuMjUtMTEuOTcyIDI4Ljc3Ny0yOC42MDcgMjguNzc3aC04NS44djcuMjA1aDU3LjE5M3YyMS41OXoiLz48L3N2Zz4%3D .. _Version: https://pypi.org/project/ntfy/ .. |Docs| image:: http://readthedocs.org/projects/ntfy/badge/?version=latest .. _Docs: http://ntfy.readthedocs.org/en/stable/?badge=latest .. |Build| image:: https://img.shields.io/travis/dschep/ntfy/master.svg?logo=data%3Aimage/svg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSItMTQyLjUgLTE0Mi41IDMyIDE2IiB3aWR0aD0iMzIiIGhlaWdodD0iMTYiPjxjaXJjbGUgcj0iOCIgY3g9Ii0xMzQuNSIgY3k9Ii0xMzQuNSIgZmlsbD0iI2RkNDgxNCIvPjxnIGlkPSJhIiB0cmFuc2Zvcm09Im1hdHJpeCguMDU2NDYgMCAwIC4wNTY0NiAtMTM0LjUgLTEzNC41KSIgZmlsbD0iI2ZmZiI%252BPGNpcmNsZSBjeD0iLTk2LjQiIHI9IjE4LjkiLz48cGF0aCBkPSJNLTQ1LjYgNjguNGMtMTYuNi0xMS0yOS0yOC0zNC00Ny44IDYtNSA5LjgtMTIuMyA5LjgtMjAuNnMtMy44LTE1LjctOS44LTIwLjZjNS0xOS44IDE3LjQtMzYuNyAzNC00Ny44bDEzLjggMjMuMkMtNDYtMzUuMi01NS4zLTE4LjctNTUuMyAwYzAgMTguNyA5LjMgMzUuMiAyMy41IDQ1LjJ6Ii8%252BPC9nPjx1c2UgeGxpbms6aHJlZj0iI2EiIHRyYW5zZm9ybT0icm90YXRlKDEyMCAtMTM0LjUgLTEzNC41KSIg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fy/master.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHZpZXdCb3g9IjAgMCAxMjggMTI4Ij48ZyBmaWxsPSIjMUJBMUUyIiB0cmFuc2Zvcm09InNjYWxlKDgpIj48cGF0aCBkPSJNMCAyLjI2NWw2LjUzOS0uODg4LjAwMyA2LjI4OC02LjUzNi4wMzd6Ii8%2BPHBhdGggZD0iTTYuNTM2IDguMzlsLjAwNSA2LjI5My02LjUzNi0uODk2di01LjQ0eiIvPjxwYXRoIGQ9Ik03LjMyOCAxLjI2MWw4LjY3LTEuMjYxdjcuNTg1bC04LjY3LjA2OXoiLz48cGF0aCBkPSJNMTYgOC40NDlsLS4wMDIgNy41NTEtOC42Ny0xLjIyLS4wMTItNi4zNDV6Ii8%2BPC9nPjwvc3ZnPg== .. _WinBuild: https://ci.appveyor.com/project/dschep/ntfy .. |Coverage| image:: https://coveralls.io/repos/github/dschep/ntfy/badge.svg?branch=master .. _Coverage: https://coveralls.io/github/dschep/ntfy?brach=master .. |Requires| image:: https://requires.io/github/dschep/ntfy/requirements.svg?branch=master .. _Requires: https://requires.io/github/dschep/ntfy/requirements/?branch=master .. |SayThanks| image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg .. _SayThanks: https://saythanks.io/to/dschep
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:
.. image:: https://raw.githubusercontent.com/dschep/ntfy/master/docs/demo.gif
Quickstart
.. code:: shell
$ sudo pip install ntfy
$ ntfy send test
# send a notification when the command `sleep 10` finishes
# this sends the message '"sleep 10" succeeded in 0:10 minutes'
$ ntfy done sleep 10
$ ntfy -b pushover -o user_key t0k3n send 'Pushover test!'
$ ntfy -t 'ntfy' send "Here's a custom notification title!"
$ echo -e 'backends: ["pushover"]\npushover: {"user_key": "t0k3n"}' > ~/.ntfy.yml
$ ntfy send "Pushover via config file!"
$ ntfy done --pid 6379 # pid extra
$ ntfy send ":tada: ntfy supports emoji! :100:" # emoji extra
# Enable shell integration
$ echo 'eval "$(ntfy shell-integration)"' >> ~/.bashrc
Install
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 <#linux-desktop-notifications---linux>
_
require Python DBUS bindings. See here <#linux-desktop-notifications---linux>
_ 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