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E2LjY1NiAwIDI0LjQ5NiAxMi4zNzYgMjguNjA3IDI4Ljc3NyA1LjcyMiAyMi43OCA1Ljk3NiAzOS44MTcgMCA1Ny41NzQtNS43ODUgMTcuMjUtMTEuOTcyIDI4Ljc3Ny0yOC42MDcgMjguNzc3aC04NS44djcuMjA1aDU3LjE5M3YyMS41OXoiLz48L3N2Zz4%3D 6.. _Version: https://pypi.org/project/ntfy/ 7.. |Docs| image:: http://readthedocs.org/projects/ntfy/badge/?version=latest 8.. _Docs: http://ntfy.readthedocs.org/en/stable/?badge=latest 9.. |Build| image:: https://img.shields.io/travis/dschep/ntfy/master.svg?logo=data%3Aimage/svg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSItMTQyLjUgLTE0Mi41IDMyIDE2IiB3aWR0aD0iMzIiIGhlaWdodD0iMTYiPjxjaXJjbGUgcj0iOCIgY3g9Ii0xMzQuNSIgY3k9Ii0xMzQuNSIgZmlsbD0iI2RkNDgxNCIvPjxnIGlkPSJhIiB0cmFuc2Zvcm09Im1hdHJpeCguMDU2NDYgMCAwIC4wNTY0NiAtMTM0LjUgLTEzNC41KSIgZmlsbD0iI2ZmZiI%252BPGNpcmNsZSBjeD0iLTk2LjQiIHI9IjE4LjkiLz48cGF0aCBkPSJNLTQ1LjYgNjguNGMtMTYuNi0xMS0yOS0yOC0zNC00Ny44IDYtNSA5LjgtMTIuMyA5LjgtMjAuNnMtMy44LTE1LjctOS44LTIwLjZjNS0xOS44IDE3LjQtMzYuNyAzNC00Ny44bDEzLjggMjMuMkMtNDYtMzUuMi01NS4zLTE4LjctNTUuMyAwYzAgMTguNyA5LjMgMzUuMiAyMy41IDQ1LjJ6Ii8%252BPC9nPjx1c2UgeGxpbms6aHJlZj0iI2EiIHRyYW5zZm9ybT0icm90YXRlKDEyM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image:: https://img.shields.io/appveyor/ci/dschep/ntfy/master.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHZpZXdCb3g9IjAgMCAxMjggMTI4Ij48ZyBmaWxsPSIjMUJBMUUyIiB0cmFuc2Zvcm09InNjYWxlKDgpIj48cGF0aCBkPSJNMCAyLjI2NWw2LjUzOS0uODg4LjAwMyA2LjI4OC02LjUzNi4wMzd6Ii8%2BPHBhdGggZD0iTTYuNTM2IDguMzlsLjAwNSA2LjI5My02LjUzNi0uODk2di01LjQ0eiIvPjxwYXRoIGQ9Ik03LjMyOCAxLjI2MWw4LjY3LTEuMjYxdjcuNTg1bC04LjY3LjA2OXoiLz48cGF0aCBkPSJNMTYgOC40NDlsLS4wMDIgNy41NTEtOC42Ny0xLjIyLS4wMTItNi4zNDV6Ii8%2BPC9nPjwvc3ZnPg== 12.. _WinBuild: https://ci.appveyor.com/project/dschep/ntfy 13.. |Coverage| image:: https://coveralls.io/repos/github/dschep/ntfy/badge.svg?branch=master 14.. _Coverage: https://coveralls.io/github/dschep/ntfy?brach=master 15.. |Requires| image:: https://requires.io/github/dschep/ntfy/requirements.svg?branch=master 16.. _Requires: https://requires.io/github/dschep/ntfy/requirements/?branch=master 17.. |SayThanks| image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg 18.. _SayThanks: https://saythanks.io/to/dschep 19 20 21``ntfy`` brings notification to your shell. It can automatically provide 22desktop notifications when long running commands finish or it can send 23push notifications to your phone when a specific command finishes. 24Confused? This video demonstrates some of this functionality: 25 26.. image:: https://raw.githubusercontent.com/dschep/ntfy/master/docs/demo.gif 27 28Quickstart 29---------- 30 31.. code:: shell 32 33 $ sudo pip install ntfy 34 $ ntfy send test 35 # send a notification when the command `sleep 10` finishes 36 # this sends the message '"sleep 10" succeeded in 0:10 minutes' 37 $ ntfy done sleep 10 38 $ ntfy -b pushover -o user_key t0k3n send 'Pushover test!' 39 $ ntfy -t 'ntfy' send "Here's a custom notification title!" 40 $ echo -e 'backends: ["pushover"]\npushover: {"user_key": "t0k3n"}' > ~/.ntfy.yml 41 $ ntfy send "Pushover via config file!" 42 $ ntfy done --pid 6379 # pid extra 43 $ ntfy send ":tada: ntfy supports emoji! :100:" # emoji extra 44 # Enable shell integration 45 $ echo 'eval "$(ntfy shell-integration)"' >> ~/.bashrc 46 47Install 48------- 49The install technique in the quickstart is the suggested method of installation. 50It can be installed in a virtualenv, but with some caveats: Linux notifications 51require ``--system-site-packages`` for the virtualenv and OS X notifications 52don't work at all. 53 54**:penguin: NOTE:** `Linux Desktop Notifications <#linux-desktop-notifications---linux>`_ 55require Python DBUS bindings. See `here <#linux-desktop-notifications---linux>`_ for more info. 56 57Shell integration 58~~~~~~~~~~~~~~~~~ 59``ntfy`` has support for **automatically** sending notifications when long 60running commands finish in bash and zsh. In bash it emulates zsh's preexec and 61precmd functionality with `rcaloras/bash-preexec <https://github.com/rcaloras/bash-preexec>`_. 62To enable it add the following to your ``.bashrc`` or ``.zshrc``: 63 64.. code:: shell 65 66 eval "$(ntfy shell-integration)" 67 68By default it will only send notifications for commands lasting longer than 10 69seconds and if the terminal is focused. Terminal focus works on X11(Linux) and 70with Terminal.app and iTerm2 on MacOS. Both options can be configured via the 71``--longer-than`` and ``--foreground-too`` options. 72 73To avoid unnecessary notifications when running interactive programs, programs 74listed in ``AUTO_NTFY_DONE_IGNORE`` don't generate notifications. For example: 75 76.. code:: shell 77 78 export AUTO_NTFY_DONE_IGNORE="vim screen meld" 79 80Extras 81~~~~~~ 82``ntfy`` has a few features that require extra dependencies. 83 * ``ntfy done -p $PID`` requires installing as ``pip install ntfy[pid]`` 84 * `emoji <https://en.wikipedia.org/wiki/Emoji>`_ support requires installing as ``pip install ntfy[emoji]`` 85 * `XMPP <https://xmpp.org/>`_ support requires installing as ``pip install ntfy[xmpp]`` 86 * `Telegram <https://telegram.org/>`_ support requires installing as ``pip install ntfy[telegram]`` 87 * `Instapush <https://instapush.im/>`_ support requires installing as ``pip install ntfy[instapush]`` 88 * `Slack <https://slack.com/>`_ support requires installing as ``pip install ntfy[slack]`` 89 * `Rocket.Chat <https://Rocket.Chat>`_ support requires installing as ``pip install ntfy[rocketchat]`` 90 91To install multiple extras, separate with commas: e.g., ``pip install ntfy[pid,emoji]``. 92 93Configuring ``ntfy`` 94-------------------- 95 96``ntfy`` is configured with a YAML file stored at ``~/.ntfy.yml`` or in standard platform specific locations: 97 98* Linux - ``~/.config/ntfy/ntfy.yml`` 99* macOS - ``~/Library/Application Support/ntfy/ntfy.yml`` 100* Windows - ``C:\Users\<User>\AppData\Local\dschep\ntfy.yml`` 101 102Backends 103~~~~~~~~ 104 105The backends key specifies what backends to use by default. Each backend has 106its own configuration, stored in a key of its own name. For example: 107 108.. code:: yaml 109 110 --- 111 backends: 112 - pushover 113 pushover: 114 user_key: hunter2 115 pushbullet: 116 access_token: hunter2 117 simplepush: 118 key: hunter2 119 slack: 120 token: slacktoken 121 recipient: "#slackchannel" 122 xmpp: 123 jid: "user@gmail.com" 124 password: "xxxx" 125 mtype: "chat" 126 recipient: "me@jit.si" 127 128If you want mulitple configs for the same backend type, you can specify any 129name and then specify the backend with a backend key. For example: 130 131.. code:: yaml 132 133 --- 134 pushover: 135 user_key: hunter2 136 cellphone: 137 backend: pushover 138 user_key: hunter2 139 140See the backends below for available backends and options. As of v2.6.0 ``ntfy`` also supports 141`3rd party backends <#3rd-party-backends>`_ 142 143`Pushover <https://pushover.net>`_ - ``pushover`` 144~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 145Required parameters: 146 * ``user_key`` 147 148Optional parameters: 149 * ``sound`` 150 * ``priority`` 151 * ``expire`` 152 * ``retry`` 153 * ``callback`` 154 * ``api_token`` - use your own application token 155 * ``device`` - target a device, if omitted, notification is sent to all devices 156 * ``url`` 157 * ``url_title`` 158 * ``html`` 159 160`Pushbullet <https://pushbullet.com>`_ - ``pushbullet`` 161~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 162Required parameter: 163 * ``access_token`` - Your Pushbullet access token, created at https://www.pushbullet.com/#settings/account 164 165Optional parameters: 166 * ``device_iden`` - a device identifier, if omited, notification is sent to all devices 167 * ``email`` - send notification to pushbullet user with the specified email or send an email if they aren't a pushullet user 168 169`Simplepush <https://simplepush.io>`_ - ``simplepush`` 170~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 171Required parameter: 172 * ``key`` - Your Simplepush key, created by installing the Android App (no registration required) at https://simplepush.io 173 174Optional parameters: 175 * ``event`` - sets ringtone and vibration pattern for incoming notifications (can be defined in the simplepush app) 176 177XMPP - ``xmpp`` 178~~~~~~~~~~~~~~~ 179Requires parameters: 180 * ``jid`` 181 * ``password`` 182 * ``recipient`` 183Optional parameters 184 * ``hostname`` (if not from jid) 185 * ``port`` 186 * ``path_to_certs`` 187 * ``mtype`` 188 189Requires extras, install like this: ``pip install ntfy[xmpp]``. 190 191To verify the SSL certificates offered by a server: 192path_to_certs = "path/to/ca/cert" 193 194Without dnspython library installed, you will need 195to specify the server hostname if it doesn't match the jid. 196 197Specify port if other than 5222. 198NOTE: Ignored without specified hostname 199 200NOTE: Google Hangouts doesn't support XMPP since 2017 201 202`Telegram <https://telegram.org>`_ - ``telegram`` 203~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 204Requires extras, install like this: ``pip install ntfy[telegram]``. 205 206Requires ``ntfy`` to be installed as ``ntfy[telegram]``. This backend is 207configured the first time you will try to use it: ``ntfy -b telegram send 208"Telegram configured for ntfy"``. 209 210`Pushjet <https://pushjet.io/>`_ - ``pushjet`` 211~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 212Required parameter: 213 * ``secret`` - The Pushjet service secret token, created with http://docs.pushjet.io/docs/creating-a-new-service 214 215Optional parameters: 216 * ``endpoint`` - custom Pushjet API endpoint 217 (defaults to https://api.pushjet.io) 218 * ``level`` - The importance level from 1(low) to 5(high) 219 * ``link`` 220 221`Notifico <https://n.tkte.ch/>`_ - ``notifico`` 222~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 223Required parameter: 224 * ``webhook`` - The webhook link, created at https://n.tkte.ch/ 225 (choose ``Plain Text`` service when creating the webhook) 226 227`Slack <https://slack.com>`_ - ``Slack`` 228~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 229Requires extras, install like this: ``pip install ntfy[slack]``. 230 231Required parameter: 232 * ``token`` - The Slack service secret token, either a legacy user token created at https://api.slack.com/custom-integrations/legacy-tokens or a token obtained by creating an app at https://api.slack.com/apps?new_app=1 with ``chat:write:bot`` scope and linking it to a workspace. 233 * ``recipient`` - The Slack channel or user to send notifications to. If you use the ``#`` symbol the message is send to a Slack channel and if you use the ``@`` symbol the message is send to a Slack user. 234 235`Instapush <https://instapush.im/>`_ - ``insta`` 236~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 237Requires extras, install like this ``pip install ntfy[instapush]``. 238 239Instapush does not support notification title. 240It sends template-driven notifications, so you have to setup you events on the dashboard first. 241The backend is called insta due to homonymy with the instapush python wrapper 242 243Required parameters: 244 * ``appid`` - The application id 245 * ``secret`` - The application secret 246 * ``event_name`` - The instapush event to be used 247 * ``trackers`` - The array of trakers to use 248 249Note on trackers: 250Trackers are placeholders for events (a sort of notification template). If you defined more than one tracker in your event 251you'll have to provide more messages. At the moment, the only way to do so is to separate each message with a colon (:) character. 252You can also escape the separator character: 253Example: 254 255.. code:: shell 256 257 ntfy -b insta send "message1:message2" 258 ntfy -b insta send "message1:message2\:with\:colons" 259 260`Prowl <https://www.prowlapp.com/>`_ - ``prowl`` 261~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 262Optional parameters: 263 * ``api_key`` 264 * ``provider_key`` 265 * ``priority`` 266 * ``url`` 267 268`Linux Desktop Notifications <https://developer.gnome.org/notification-spec/>`_ - ``linux`` 269~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 270Works via `dbus`, works with most DEs like Gnome, KDE, XFCE and with libnotify. 271 272The following dependecies should be installed. 273 274.. code:: shell 275 276 $ sudo apt install python-dbus # on ubuntu/debian 277 278You will need to install some font that supports emojis (in Debian `fonts-symbola` or Gentoo `media-fonts/symbola`). 279 280Optional parameters: 281 * ``icon`` - Specifies path to the notification icon, empty string for no icon. 282 * ``urgency`` - Specifies the urgency level (low, normal, critical). 283 * ``transient`` - Skip the history (exp: the Gnome message tray) (true, false). 284 * ``soundfile`` - Specifies the notification sound file (e.g. /usr/share/sounds/notif.wav). 285 * ``timeout`` - Specifies notification expiration time level (-1 - system default, 0 - never expire). 286 287Windows Desktop Notifications - ``win32`` 288~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 289Uses ``pywin32``. 290 291Mac OS X Notification Center - ``darwin`` 292~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 293Requires ``ntfy`` to be installed globally (not in a virtualenv). 294 295System log - ``systemlog`` 296~~~~~~~~~~~~~~~~~~~~~~~~~~ 297Uses the ``syslog`` core Python module, which is not available on Windows 298platforms. 299 300Optional parameters: 301 * ``prio`` - Syslog priority level. Default is ``ALERT``. Possible values 302 are: 303 304 * EMERG 305 * ALERT 306 * CRIT 307 * ERR 308 * WARNING 309 * NOTICE 310 * INFO 311 * DEBUG 312 313 * ``facility`` - Syslog facility. Default is ``LOCAL5``. Possible values 314 are: 315 316 * KERN 317 * USER 318 * MAIL 319 * DAEMON 320 * AUTH 321 * LPR 322 * NEWS 323 * UUCP 324 * CRON 325 * SYSLOG 326 * LOCAL0 327 * LOCAL1 328 * LOCAL2 329 * LOCAL3 330 * LOCAL4 331 * LOCAL5 332 * LOCAL6 333 * LOCAL7 334 335 * ``fmt`` - Format of the message to be sent to the system logger. The 336 title and the message are specified using the following placeholders: 337 338 * ``{title}`` 339 * ``{message}`` 340 341 Default is ``[{title}] {message}``. 342 343`Termux:API <https://play.google.com/store/apps/details?id=com.termux.api&hl=en>`_ - ``termux`` 344~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 345Requires the app to be install from the Play store and the CLI utility be 346installed with ``apt install termux-api``. 347 348`Pushalot <https://pushalot.com>`_ - ``pushalot`` 349~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 350Required parameter: 351 * ``auth_token`` - Your private Pushalot auth token, found here https://pushalot.com/manager/authorizations 352 353Optional parameters: 354 * ``source`` - source of the notification 355 * ``ttl`` - message expire time in minutes (time to live) 356 * ``url`` - URL to include in the notifications 357 * ``url_title`` - visible URL title (ignored if no url specified) 358 * ``image`` - URL of image included in the notifications 359 * ``important`` - mark notifications as important 360 * ``silent`` - mark notifications as silent 361 362`Rocket.Chat <https://rocket.chat>`_ - ``rocketchat`` 363~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 364Requires extras, install like this: ``pip install ntfy[rocketchat]``. 365 366Required parameters: 367 * ``url`` - URL of your Rocket.Chat instance 368 * ``username`` - login username 369 * ``password`` - login password 370 * ``room`` - room/channel name to post in 371 372`Matrix.org <https://matrix.org>`_ - ``matrix`` 373~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 374Requires extras, install like this: ``pip install ntfy[matrix]``. 375 376Required parameters: 377 * ``url`` - URL of your homeserver instance 378 * ``roomId`` - room to post in 379 * ``userId`` - login userid 380 * ``password`` - login password 381 * ``token`` - access token 382 383You must either specify ``token``, or ``userId`` and ``password``. 384 385 386`Webpush <https://github.com/dschep/ntfy-webpush>`_ - ``ntfy_webpush`` 387~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 388Webpush support is provded by an external ntfy module, install like this: ``pip install ntfy ntfy-webpush``. 389 390Required parameters: 391 * ``subscription_info`` - A `PushSubscription <https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription>`_ Object 392 * ``private_key`` - the path to private key file or anything else that works with `pywebpush <https://github.com/web-push-libs/pywebpush>`_. 393 394For more info, see _`ntfy-webpush` <https://github.com/dschep/ntfy-webpush>`_ 395 396 3973rd party backends 398~~~~~~~~~~~~~~~~~~ 399To use or implement your own backends, specify the full path of the module as your backend. The 400module needs to contain a module with a function called ``notify`` with the following signature: 401 402.. code:: python 403 404 def notify(title, message, **kwargs): 405 """ 406 kwargs contains retcode if using ntfy done or ntfy shell-integration 407 and all options in your backend's section of the config 408 """ 409 pass 410 411 412Other options 413~~~~~~~~~~~~~ 414 415Title is configurable with the `title` key in the config. Example: 416 417.. code:: yaml 418 419 --- 420 title: Customized Title 421 422 423Backends ToDo 424~~~~~~~~~~~~~ 425- `Airgram <http://www.airgramapp.com>`_ 426- `Boxcar <https://boxcar.io>`_ 427 428Testing 429------- 430 431.. code:: shell 432 433 python setup.py test 434 435Contributors 436------------ 437- `dschep <https://github.com/dschep>`_ - Maintainer & Lead Developer 438- `danryder <https://github.com/danryder>`_ - XMPP Backend & emoji support 439- `oz123 <https://github.com/oz123>`_ - Linux desktop notification improvements 440- `schwert <https://github.com/schwert>`_ - PushJet support 441- `rahiel <https://github.com/rahiel>`_ - Telegram support 442- `tymm <https://github.com/tymm>`_ - Simplepush support 443- `jungle-boogie <https://github.com/jungle-boogie>`_ - Documentation updates 444- `tjbenator <https://github.com/tjbenator>`_ - Advanced Pushover options 445- `mobiusklein <https://github.com/mobiusklein>`_ - Win32 Bugfix 446- `rcaloras <https://github.com/rcaloras>`_ - Creator of `bash-prexec`, without which there woudn't be bash shell integration for `ntfy` 447- `eightnoteight <https://github.com/eightnoteight>`_ - Notifico support 448- `juanpabloaj <https://github.com/juanpabloaj>`_ - Slack support 449- `giuseongit <https://github.com/giuseongit>`_ - Instapush support 450- `jlesage <https://github.com/jlesage>`_ - Systemlog support 451- `sambrightman <https://github.com/sambrightman>`_ - Prowl support 452- `mlesniew <https://github.com/mlesniew>`_ - Pushalot support 453- `webworxshop <https://github.com/webworxshop>`_ - Rocket.Chat support 454- `rhabbachi <https://github.com/rhabbachi>`_ - transient option in Linux desktop notifications 455- `Half-Shot <https://github.com/Half-Shot>`_ - Matrix support 456