grdev.notify-cli
0.2.3
dotnet tool install --global grdev.notify-cli --version 0.2.3
dotnet new tool-manifest
dotnet tool install --local grdev.notify-cli --version 0.2.3
#tool dotnet:?package=grdev.notify-cli&version=0.2.3
nuke :add-package grdev.notify-cli --version 0.2.3
notify-cli
notify is a command-line tool that sends a notification to multiple destinations at once —
starting with gotify and Discord.
Project page: greekdeveloper.com/tools/notify-cli
Install
dotnet tool install --global grdev.notify-cli
What it does
- Fan one message out to a profile of targets —
notify send "Backup finished" - Pick a profile —
notify send "deploy done" -P alerts(-P '*'hits every target) - Ad-hoc targets —
notify send "quick ping" -T ops-gotify - Attach links —
notify send "build failed" --urls https://ci.example/run/42 - Pipe the body in —
journalctl -u backup | tail -5 | notify send -
Targets (gotify, Discord) and profiles live in ~/.grdev.notify-cli/config.json —
notify config edit to set it up, notify targets list / notify profiles list to check it.
Configuration
notify reads a single JSON file. On Windows it lives at
%USERPROFILE%\.grdev.notify-cli\config.json; on Linux and macOS at
~/.grdev.notify-cli/config.json. Point any command at a different file with
-c/--config <path>. Run notify config path to print the resolved location, or
notify config edit to open it in $VISUAL / $EDITOR (notepad on Windows), which
writes a blank skeleton first if the file does not exist yet.
The file has exactly two top-level keys:
targets— a list of delivery endpoints. Each target is one place a message can be sent.profiles— named, ordered lists of target names. Sending to a profile fans the message out to each of its targets in turn.
A worked example
{
"targets": [
{
"name": "gotify-homelab",
"type": "gotify",
"url": "https://notifications.home.example",
"token": "AbCdEf0123456789",
"defaultTitle": "Workflow Notification",
"extras": {
"priority": "5"
}
},
{
"name": "team-discord",
"type": "discord",
"url": "https://discord.com/api/webhooks/123456789/AbCdEf-token",
"extras": {
"username": "notify"
}
}
],
"profiles": {
"default": ["gotify-homelab"],
"alerts": ["gotify-homelab", "team-discord"]
}
}
With that file:
notify send "backup done"goes togotify-homelab(thedefaultprofile).notify send "deploy failed" -P alertsgoes to both targets.notify send "quick ping" -T team-discordgoes to just that one, ignoring profiles.
Target fields
| Field | Required | Applies to | Meaning |
|---|---|---|---|
name |
yes | all | Unique identifier used by profiles and -T. Cannot be *. |
type |
yes | all | gotify or discord. |
url |
yes | all | Base server URL for gotify (e.g. https://gotify.example); the full webhook URL for discord. Must be an absolute http(s) URL. |
token |
gotify only | gotify | The gotify application token. Ignored for discord, whose auth is embedded in the webhook URL. |
defaultTitle |
no | all | Title used when --title is not passed. If both are absent, no title is sent. |
extras |
no | all | Flat string map of provider-specific knobs (see below). Unknown keys are ignored with a warning. |
extras by provider
| Provider | Key | Meaning |
|---|---|---|
| gotify | priority |
Default priority (integer 0–10 as a string). Resolved as --priority → extras.priority → 5. |
| discord | username |
Overrides the webhook's display name. |
| discord | avatar_url |
Overrides the webhook's avatar. |
Profiles
profiles maps a profile name to an ordered list of target names. The default profile is
what a bare notify send "msg" uses — without it, a bare send exits with code 2. A
profile named * is never written to the file: it always means "every configured target"
and is available automatically. A profile that lists an unknown target, lists no targets, or
is named * makes the whole config invalid.
An invalid config is rejected as a whole, with every problem reported at once, and the
command exits 2.
For contributors
Build steps, project layout, and conventions live in BRIEF.md. Agent and repository conventions live in AGENTS.md.
Versioning
Versions are computed by Nerdbank.GitVersioning
from version.json plus the git height — every commit bumps the patch
automatically. notify version reports the exact build and commit that is running.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.