{ notify-cli }

| #cli #dotnet #automation #homelab

notify-cli

Send one notification to every place you want it — gotify, Discord — in a single command.

What it's for

notify sends a message to several destinations at once — gotify and Discord to begin with. It's the piece that tells you a long job finished without you having to wire a webhook into every script that needs one.

notify send "Backup finished"

Targets and profiles live in one config file, so a script names what it wants to tell you and the config decides where that goes. Point a message at a profile (-P alerts, or -P '*' for everything), at an ad-hoc target (-T ops-gotify), or attach links with --urls.

It reads standard input too, which is where it earns its place in a cron line — the tail of a log becomes the body of the notification:

journalctl -u backup | tail -5 | notify send -

Install

dotnet tool install --global grdev.notify-cli

Published on NuGet as grdev.notify-cli.

Run notify config edit to set up targets and profiles; notify targets list and notify profiles list show what is configured.

Source

github.com/greek-developer/notify-cli — currently a private repository.