Notifly for a regular user
Notifly is useful not only for admins and developers. Any Linux, macOS or Windows user can set up:
- a message when the laptop is low on battery or is plugged in,
- an alert that the VPN has disconnected,
- a push when a download/conversion is finished,
- a notification when the internet goes down (from a home NAS),
- smart reminders via
ator Pomodoro timers.
Where to start
Section titled “Where to start”- Reminders and Pomodoro — a one-off reminder with a single
atcommand, a recurring one with a cron line. Set up thenotifly-sendwrapper once (it is further down this page); on Windows, theSend-Notiflyfunction. - Download complete — add
&& notifly-send …after ayt-dlp,wgetorffmpegcommand, and a push arrives when it finishes. - Price and stock — no scripts: a content monitor loads the page itself and tells you when the price or status changes. A variant with your own script and cron is in the price and stock watching recipe.
Available recipes
Section titled “Available recipes”| Scenario | When it helps |
|---|---|
| Laptop battery | To avoid missing a battery drain while working with a second monitor |
| VPN | To notice a dropped VPN before it disrupts a meeting |
| Download complete | yt-dlp, wget, curl, video conversion |
| Network loss | Push from a backup channel (LTE modem) when the main one fails |
| Reminders & Pomodoro | A flexible alternative to phone reminders |
| CPU/GPU overheating | Before throttling and emergency shutdown |
| Render complete | ffmpeg, Blender, video export, make |
| Price & stock watch | Track a price and back-in-stock |
| USB plugged in | Someone plugged in a flash drive while you’re away |
| Smart home events | Home Assistant, MQTT, sensors |
Principles
Section titled “Principles”- All scripts — in
~/bin/or/usr/local/bin/, token — in~/.notifly.env(chmod 600). - We use the same
notifly-sendshell-wrapper as in the section for sysadmins.
export NOTIFLY_URL="https://api.notifly.ru"export NOTIFLY_TOKEN="AGdjfk_L.dKe8q"# ~/bin/notifly-send "title" "message" [priority]#!/usr/bin/env bashset -eu; set -a; source ~/.notifly.env; set +aT="${1:?title}"; M="${2:?message}"; P="${3:-5}"curl -fsS -X POST "$NOTIFLY_URL/message?token=$NOTIFLY_TOKEN" \ -H "Content-Type: application/json" \ --data "$(jq -n --arg t "$T" --arg m "$M" --argjson p "$P" \ '{title:$t, message:$m, priority:$p}')" >/dev/nullFor Windows users
Section titled “For Windows users”In the Windows version, a PowerShell function Send-Notifly is used.
Set it up once:
# 1. Put the config in the user's profile@{ url = "https://api.notifly.ru" token = "AGdjfk_L.dKe8q"} | ConvertTo-Json | Set-Content "$env:USERPROFILE\.notifly.json"
# 2. Place the function next to it and load it at PowerShell startup$fn = @'function Send-Notifly { param([Parameter(Mandatory)][string]$Title, [string]$Message="", [int]$Priority=5) $cfg = Get-Content "$env:USERPROFILE\.notifly.json" -Raw | ConvertFrom-Json $body = @{ title=$Title; message=$Message; priority=$Priority } | ConvertTo-Json -Compress Invoke-RestMethod -Method Post -Uri "$($cfg.url)/message?token=$($cfg.token)" ` -ContentType "application/json; charset=utf-8" ` -Body ([Text.Encoding]::UTF8.GetBytes($body)) -TimeoutSec 10 | Out-Null}'@New-Item -ItemType Directory -Path "$env:USERPROFILE\Documents\WindowsPowerShell" -Force | Out-Null$fn | Set-Content "$env:USERPROFILE\Documents\WindowsPowerShell\Notifly.ps1"
# 3. Load on startup — add to $PROFILEAdd-Content $PROFILE ". `$env:USERPROFILE\Documents\WindowsPowerShell\Notifly.ps1"Test:
Send-Notifly -Title "Test" -Message "Hello from $env:COMPUTERNAME" -Priority 5From now on, all recipes in this section call this function and are scheduled through Task Scheduler.