ntf
brings notification to your shell. This project was inspired by ntfy.
Compared to ntfy, it has the following advantages
- Works in a single binary
- lightweight
- No need to install additional plug-ins
However, support for the backend type is poorer than ntfy.
$ sudo curl -L https://github.com/hrntknr/ntf/releases/download/v0.1.2/ntf-linux-amd64 -o /usr/local/bin/ntf
$ sudo chmod +x /usr/local/bin/ntf
$ echo -e 'backends: ["pushover"]\npushover: {"user_key": "t0k3n"}' > ~/.ntf.yml
$ # If you want to use slack, you can do the following
$ # echo -e 'backends: ["slack"]\nslack: {"webhook: "https://hooks.slack.com/services/hogehoge"}' > ~/.ntf.yml
$
$ # send message: "test"
$ ntf send test
$
$ # exec command: `sleep 1` and send result
$ ntf done sleep 1
$
$ # Enable shell integration
$ echo 'AUTO_NTF_DONE_LONGER_THAN=10' >> ~/.bashrc
$ echo 'eval "$(ntf shell-integration)"' >> ~/.bashrc
~/.ntf.yml
example:
backends:
- slack
slack:
webhook: 'https://hooks.slack.com/services/****'
~/.ntf.yml
example:
backends:
- slack
slack:
webhook: 'https://discordapp.com/api/webhooks/****/****/slack'
color: '#ff0000' #option
~/.ntf.yml
example:
backends:
- pushbullet
pushbullet:
token: '********************'
~/.ntf.yml
example:
backends:
- pushover
pushover:
user_key: '********************'
priority: 'emergency' #option (emergency|high|normal|low|lowest)
retry: 30 #option
expire: 3600 #option
~/.ntf.yml
example:
backends:
- line
line:
token: '********************'