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.
$ # for linux
$ sudo curl -L https://github.com/hrntknr/ntf/releases/download/v0.1.9/ntf-x86_64-unknown-linux-gnu -o /usr/local/bin/ntf
$ # for mac
$ # sudo curl -L https://github.com/hrntknr/ntf/releases/download/v0.1.9/ntf-x86_64-apple-darwin -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
$ # override default setting
$ ntf send test --pushover.priority emergency --pushover.retry 60 --pushover.expire 3000
$
$ # exec command: `sleep 1` and send result
$ ntf done sleep 1
$
$ # Enable shell integration
$ echo 'export 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/****'
color: '#ff0000' #option
~/.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: '********************'
~/.ntf.yml
example:
backends:
- syslog
syslog:
facility: 'user' #option
severity: 'emerg' #option