jolicode/jolinotif

Send desktop notifications on Windows, Linux, MacOS.

Package info

github.com/jolicode/JoliNotif

pkg:composer/jolicode/jolinotif

Fund package maintenance!

Tidelift

Statistics

Installs: 12 485 468

Dependents: 47

Suggesters: 2

Stars: 1 439

Open Issues: 1

v3.3.0 2025-12-04 10:50 UTC

Requires

Requires (Dev)

Suggests

  • ext-ffi: Needed to send notifications via libnotify on Linux

Provides

None

Conflicts

None

Replaces

None

MIT 7083df4c4dc614f20bf16dc3ad53f705460bd1dd

  • Loïck Piera <pyrech.woop@gmail.com>

growlnotificationlinuxwindowsMAC


README

👁 JoliNotif

JoliNotif
Display desktop notifications from your PHP scripts.

👁 Total Downloads
👁 Latest Stable Version
👁 Latest Unstable Version


JoliNotif is a cross-platform PHP library to display desktop notifications. It works on Linux, Windows (WSL included) or macOS.

👁 JoliNotif demo

Requires PHP >= 8.2 (support for previous PHP versions was available in older releases of this library).

Note

This library can not be used in a web context (FPM or equivalent). Use it in your CLI scripts or in a CRON

Installation

Use Composer to install JoliNotif in your project:

composer require "jolicode/jolinotif"

Usage

include __DIR__.'/vendor/autoload.php';

use Joli\JoliNotif\Notification;
use Joli\JoliNotif\DefaultNotifier;

$notifier = new DefaultNotifier();

// Create your notification
$notification =
 (new Notification())
 ->setTitle('Notification title')
 ->setBody('This is the body of your notification')
 ->setIcon(__DIR__.'/path/to/your/icon.png')
 ->addOption('subtitle', 'This is a subtitle') // Only works on macOS (AppleScriptDriver)
 ->addOption('sound', 'Frog') // Only works on macOS (AppleScriptDriver & TerminalNotifierDriver)
;

// Send it
$notifier->send($notification);

A shell executable is also provided to use JoliNotif from CLI:

jolinotif --title "Hello" --body "World"

Further documentation

Discover more by reading the docs:

You can see the current and past versions using one of the following:

And finally some meta documentation:

Credits

License

JoliNotif is licensed under the MIT License - see the LICENSE file for details.



👁 JoliCode is sponsoring this project