Download the PHP package soloterm/notify without Composer

On this page you can find all versions of the php package soloterm/notify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package notify

Notify

Latest Version on Packagist Total Downloads

A PHP library for sending desktop notifications via OSC escape sequences in terminal applications.

This library was built to support Solo, your all-in-one Laravel command to tame local development.

OSC Notifications (Ghostty) OSC Notifications (iTerm2)
macOS Fallback Fireworks (iTerm2)
Progress Bars (Ghostty) Progress Bars (iTerm2)

Why Use This Library?

Building CLI applications often requires notifying users when long-running tasks complete:

Instead of relying on external tools like notify-send or osascript, this library uses OSC (Operating System Command) escape sequences that modern terminal emulators interpret directly. No dependencies, no shell commands, just pure PHP.

When OSC isn't supported, the library automatically falls back to system notification tools (notify-send on Linux, osascript on macOS, PowerShell on Windows).

Installation

Usage

Real-World Examples

Terminal Compatibility

Terminal Support Protocol Notes
iTerm2 ✅ OSC 9 macOS
Kitty ✅ OSC 99 Cross-platform, full-featured
WezTerm ✅ OSC 777 Cross-platform
Ghostty ✅ OSC 777 Cross-platform
Foot ✅ OSC 777 Wayland
tmux ✅ Passthrough Requires allow-passthrough on
GNU Screen ✅ Passthrough Automatic wrapping
Alacritty ⚠️ Fallback Uses system notifications
Terminal.app ⚠️ Fallback Uses system notifications
VS Code ⚠️ Fallback Uses system notifications
Windows Terminal ⚠️ Fallback Uses system notifications

tmux Configuration

For notifications to work inside tmux, add this to your ~/.tmux.conf:

Then reload your tmux configuration:

OSC Protocols

This library supports three notification protocols:

OSC 9 (iTerm2)

Simple message-only notifications. Widely supported.

OSC 777 (rxvt-unicode)

Supports separate title and body. Used by WezTerm, Ghostty, and VTE-based terminals.

OSC 99 (Kitty)

The most feature-rich protocol with support for urgency levels, notification IDs, and more.

Advanced Usage

Urgency Levels (Kitty/OSC 99 only)

Notification IDs (Kitty/OSC 99 only)

Update or dismiss existing notifications using IDs - perfect for progress indicators:

External Fallback

When OSC notifications aren't supported, the library can fall back to system tools:

Bell Fallback

Check Capabilities

Force a Specific Protocol

Check Multiplexer Status

Reset State

Progress Bars (OSC 9;4)

Display progress in your terminal's tab or taskbar:

Supported terminals: Windows Terminal, Ghostty 1.2+, iTerm2 3.6.6+, ConEmu, Mintty

Hyperlinks (OSC 8)

Create clickable links in terminal output:

Request Attention (iTerm2 only)

How It Works

  1. Terminal Detection: The library checks environment variables like KITTY_WINDOW_ID, ITERM_SESSION_ID, WEZTERM_PANE, and TERM_PROGRAM to identify the terminal.

  2. Protocol Selection: Based on the detected terminal, the optimal OSC protocol is selected.

  3. Sequence Building: The notification message is sanitized and formatted according to the protocol.

  4. Multiplexer Passthrough: If running inside tmux or GNU Screen, the sequence is wrapped in a DCS (Device Control String) passthrough.

  5. Output: The escape sequence is written directly to STDOUT, which the terminal interprets and displays as a desktop notification.

  6. Fallback: If OSC isn't supported, the library automatically tries system notification tools.

Requirements

Testing

Contributing

Contributions are welcome! Please feel free to submit a pull request.

License

The MIT License (MIT).

Support

This is free! If you want to support me:

Credits

Solo was developed by Aaron Francis. If you like it, please let me know!

Related Projects


All versions of notify with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package soloterm/notify contains the following files

Loading the files please wait ...