jolicode/jolinotif
JoliNotif is a cross-platform PHP library for displaying desktop notifications from CLI scripts and CRON jobs on Linux, Windows (including WSL), and macOS. Install via Composer and send customizable notifications with title, body, icon, and driver-specific options. Requires PHP 8.3 or newer.
DefaultNotifier + Notification API, so the decision becomes "adopt an 8-year-old MIT library" instead of "own four shell integrations forever."artisan command finishes, when a queue worker exhausts retries, when a nightly cron/backup/import completes or fails, or when a local CI agent goes green. This is a cheap DX win with visible, tactile payoff for the team.notify-send driver, cross-user tampering with extracted PHAR resources, and script injection via Unicode quotes in the PowerShell driver. That's healthy security response, but it also tells you the package shells out with user-influenced strings — relevant if any notification title/body could originate from untrusted input.Adopt when all of the following hold:
Look elsewhere when:
url) → the option surface is thin and per-driver, and most advanced options only work on one OS.symfony/process, a PHP OS-helper package, and (for the PHAR path) extracted binaries. For a single internal script, invoking notify-send/osascript yourself may be a better trade.symfony/notifier first for consolidation, accepting you'll still do OS-level plumbing for desktop.One-liner: A small, MIT-licensed, actively maintained PHP library that sends native desktop notifications from CLI scripts and cron jobs on macOS, Linux, Windows, and WSL — so our long-running commands tell people when they're done instead of people watching terminals.
To executives: This is a low-cost developer-productivity purchase, not a product feature. It's free, MIT, one Composer dependency, and has been maintained for ~8 years with current PHP/Symfony support and prompt security patches. Expected effort is a spike plus a thin internal wrapper — days, not a sprint. It does not touch customer-facing notification channels, so no vendor contracts, deliverability, or compliance exposure. Success is measured informally: fewer "is the import done yet?" pings and faster feedback loops on background jobs.
To engineering: New public API is DefaultNotifier::send(Notification) — drivers are internal, so OS branching lives behind one call. It requires PHP 8.3+ and only works on CLI SAPI, so wrap it in our own Notifier service with a config flag and a no-op fallback for CI/containers. Log every notification through PSR-3 so we retain a record when the desktop path is unavailable. Treat title/body as potentially untrusted and sanitize at the call site — recent releases fixed injection issues in the shell-based drivers, so we should not pass raw user input. Pin the major version and watch for PHP-minor drops in release notes.
Known risks to state up front: CLI-only scope; no delivery guarantee or reporting; best-effort driver selection that degrades silently when the OS binary is absent; a runtime floor that moves with the project's support policy; and a security surface inherited from shelling out to native notifiers — acceptable for internal tooling, not for anything privileged.
How can I help you explore Laravel packages today?