noti

Monitor a process and trigger a notification.

  • 所有者: variadico/noti
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

noti

CircleCI
AppVeyor
Codecov

Monitor a process and trigger a notification.

Never sit and wait for some long-running process to finish. Noti can alert you
when it's done. You can receive messages on your computer or phone.

macOS Banner Notification

Services

Noti can send notifications on a number of services.

--------------------------------------
Banner, ✔, ✔, ✔
Speech, ✔, ✔, ✔
BearyChat, ✔, ✔, ✔
Keybase, ✔, ✔, ✔
Mattermost, ✔, ✔, ✔
Pushbullet, ✔, ✔, ✔
Pushover, ✔, ✔, ✔
Pushsafer, ✔, ✔, ✔
Simplepush, ✔, ✔, ✔
Slack, ✔, ✔, ✔
Telegram, ✔, ✔, ✔
Zulip, ✔, ✔, ✔

Checkout the screenshots directory to see what the notifications look like on
different platforms.

Installation

The master branch always contains the latest tagged release.

# Install the latest version on macOS.
brew install noti

If you don't want to build from source or install anything extra, just download
the latest binary.

# macOS
curl -L $(curl -s https://api.github.com/repos/variadico/noti/releases/latest, awk '/browser_download_url/ { print $2 }', grep 'darwin-amd64', sed 's/"//g'), tar -xz

# Linux
curl -L $(curl -s https://api.github.com/repos/variadico/noti/releases/latest, awk '/browser_download_url/ { print $2 }', grep 'linux-amd64', sed 's/"//g'), tar -xz

Or download with your browser from the latest release page.

From source

If you want to build from source, then build like this.

make build
# or
make install

This project uses modules with vendoring. The Makefile sets -mod=vendor
automatically. Otherwise, you'll need to pass a flag or export a var if you
don't use the Makefile.

go build -mod=vendor github.com/variadico/noti/cmd/noti
# or
export GOFLAGS="-mod=vendor"
export GO111MODULE="on"
go build github.com/variadico/noti/cmd/noti

Also, go get doesn't really work anymore starting in Go 1.12.

If you have comments about these changes, please the leave the Go team an
experience report here.

Examples

Just put noti at the beginning or end of your regular commands. For more
details, checkout the docs.

Display a notification when tar finishes compressing files.

noti tar -cjf music.tar.bz2 Music/

Add noti after a command, in case you forgot at the beginning.

clang foo.c -Wall -lm -L/usr/X11R6/lib -lX11 -o bizz; noti

If you already started a command, but forgot to use noti, then you can do
this to get notified when that process' PID disappears.

noti --pwatch 1234

You can also press ctrl+z after you started a process. This will temporarily
suspend the process, but you can resume it with noti.

$ dd if=/dev/zero of=foo bs=1M count=2000
^Z
zsh: suspended  dd if=/dev/zero of=foo bs=1M count=2000
$ fg; noti
[1]  + continued  dd if=/dev/zero of=foo bs=1M count=2000
2000+0 records in
2000+0 records out
2097152000 bytes (2.1 GB, 2.0 GiB) copied, 12 s, 175 MB/s

Additionally, noti can send a message piped from stdin with -.

$ make test 2>&1, tail --lines 5, noti -t "Test Results" -m -

主要指标

概览
名称与所有者variadico/noti
主编程语言Go
编程语言Go (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2015-04-04 19:44:49
推送于2025-05-30 22:54:24
最后一次提交
发布数25
最新版本名称3.8.0 (发布于 )
第一版名称v1.0.0 (发布于 )
用户参与
星数4.7k
关注者数47
派生数138
提交数349
已启用问题?
问题数111
打开的问题数34
拉请求数36
打开的拉请求数1
关闭的拉请求数14
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?