Introduction to noti
Noti is a helpful tool designed to keep track of lengthy processes on a computer and alert users once they are finished. This can be particularly useful when running long-running commands or scripts, allowing users to stay informed without having to constantly check the terminal. It can notify users on their computers or directly to their phones, ensuring they receive updates no matter where they are.
Notification Services
Noti provides extensive support for various notification services, making it versatile and adaptable to different user needs. It works seamlessly across macOS, Linux, and Windows platforms. The supported services include:
- Banner notifications
- Speech alerts
- Messaging platforms like BearyChat, Keybase, Mattermost, Slack, Telegram, and Zulip
- Notification services like Pushbullet, Pushover, Pushsafer, Simplepush
- Services for sending SMS messages like Twilio
- Communication tools like Google Chat and Chanify
With this diverse range of services, users can choose their preferred method of receiving notifications, whether it's on a desktop or via mobile applications.
Installation
Installing noti is straightforward, especially for those familiar with command-line tools. Here are the installation methods for different operating systems:
macOS
Users can install noti using Brew or download the necessary files with curl
commands:
# Install with Brew
brew install noti
# Install with curl
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
Similarly, Linux users can install noti via curl
:
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
Additionally, users can download the latest release directly from the internet.
Building from Source
For those who prefer building from the source, noti provides clear instructions:
# Build binary
make build
# Build binary and move to Go bin directory
make install
Usage Examples
Noti is designed to be easy and intuitive to use. By simply appending noti
at the beginning or end of regular command-line operations, users can receive notifications when tasks are completed.
Here are some typical use cases:
-
Compressing Files: To receive a notification after compressing files, use:
noti tar -cjf music.tar.bz2 Music/
-
Post-compilation Notification: If users forget to prepend
noti
, they can append it:clang foo.c -Wall -lm -L/usr/X11R6/lib -lX11 -o bizz; noti
-
Monitoring a Running Process: If a command is already running, and a notification is desired later, users can watch for the process' PID:
noti --pwatch 1234
-
Suspend and Resume Processes: Users can also utilize
ctrl+z
to suspend ongoing processes and continue them withnoti
:$ 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
-
Piped Message Notifications: Messages can be sent through stdin using the
-
flag:$ make test 2>&1 | tail --lines 5 | noti -t "Test Results" -m -
Noti is a versatile and powerful tool that simplifies workflow by notifying users of completed tasks, freeing them from the need to constantly check tasks' progress manually.