Send Notification CLI

Command Line Interpreter to send notifications

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

fr.jcgay.send-notification
ArtifactId

ArtifactId

send-notification-cli
Last Version

Last Version

0.16.0
Release Date

Release Date

Type

Type

jar
Description

Description

Send Notification CLI
Command Line Interpreter to send notifications

Download send-notification-cli

How to add to project

<!-- https://jarcasting.com/artifacts/fr.jcgay.send-notification/send-notification-cli/ -->
<dependency>
    <groupId>fr.jcgay.send-notification</groupId>
    <artifactId>send-notification-cli</artifactId>
    <version>0.16.0</version>
</dependency>
// https://jarcasting.com/artifacts/fr.jcgay.send-notification/send-notification-cli/
implementation 'fr.jcgay.send-notification:send-notification-cli:0.16.0'
// https://jarcasting.com/artifacts/fr.jcgay.send-notification/send-notification-cli/
implementation ("fr.jcgay.send-notification:send-notification-cli:0.16.0")
'fr.jcgay.send-notification:send-notification-cli:jar:0.16.0'
<dependency org="fr.jcgay.send-notification" name="send-notification-cli" rev="0.16.0">
  <artifact name="send-notification-cli" type="jar" />
</dependency>
@Grapes(
@Grab(group='fr.jcgay.send-notification', module='send-notification-cli', version='0.16.0')
)
libraryDependencies += "fr.jcgay.send-notification" % "send-notification-cli" % "0.16.0"
[fr.jcgay.send-notification/send-notification-cli "0.16.0"]

Dependencies

compile (2)

Group / Artifact Type Version
fr.jcgay.send-notification : send-notification jar 0.16.0
com.beust : jcommander jar 1.72

runtime (1)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.2.3

Project Modules

There are no modules declared in this project.

send-notification

A toolbox in Java to send notifications.

Usage

Add dependency with your favorite build tool.

Example with Maven:

    <dependencies>
     [...]
        <dependency>
            <groupId>fr.jcgay.send-notification</groupId>
            <artifactId>send-notification</artifactId>
            <version>0.16.0</version>
        </dependency>
     [...]
    </dependencies>

Get a notifier:

    Notifier notifier = new SendNotification()
        .setApplication(application)
        .initNotifier();

The application is not mandatory, you'll get a default one if it's not set.

Then send notification:

    try {
        notifier.send(notification);
    } finally {
        notifier.close;
    }

CLI

Download bundle, extract it, add the bin directory to your $PATH.
For OS X users, you can use a brew formula here.

> send-notification -h

Usage: <main class> [options] notifier(s)
  Options:
    -h, --help
       show help
       Default: false
  * -i, --icon
       notification icon
    -l, --level
       notification level (INFO, WARNING, ERROR)
  * -m, --message
       notification message
    -s, --subtitle
       notification subtitle
  * -t, --title
       notification title
    -v, --version
       show version
       Default: false

(*) are mandatory parameters.

Example:

send-notification notifysend -m "Build success !" -t "maven-notifier" -i "success.png"

Available notifiers

Go to Wiki to read full configuration guide for each notifier.

Notifier Screenshot
Growl, for Windows and OS X. Growl
Snarl, for Windows Snarl
terminal-notifier, OS X terminal-notifier
notification center OS X (since Mavericks) notification-center
notify-send for Linux notify-send
SystemTray since Java 6 System Tray
Pushbullet pushbullet
Kdialog for KDE Kdialog
notifu for Windows notifu
AnyBar for OS X and Linux anybar
Toaster for Windows 8 toaster
Notify since Java 6 Notify
BurntToast for Windows 10 (NB must be enabled manually) BurntToast
Slack Slack

Build status

Build Status Coverage Status Quality Gate

Build

You will need Maven and a JDK 8. If your default JDK is higher than 8, Maven will use a configured toolchains.

mvn verify

Multiple VMs are available in vm for Windows, Linux and macOS to integrate with the various notifiers.

Release

mvn -B release:prepare release:perform

Versions

Version
0.16.0
0.15.1
0.15.0
0.14.0
0.13.0
0.12.0
0.11.0
0.10.2
0.10.1
0.10
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1