Giter Site home page Giter Site logo

node-notifier-cli's Introduction

node-notifier CLI

Separate package for node-notifier CLI.

Install

npm i [-g] node-notifier-cli

or try it out with npx

npx -p node-notifier-cli notify -t 'Hello' -m 'My message'

usage

notify -h
# notify
## Options

    * --help (alias -h)

    * --title (alias -t)
    * --subtitle (alias -st; not available on Windows OS)
    * --message (alias -m)
    * --icon (alias -i)
    * --sound (alias -s; use none to disable default sound notification)
    * --open (alias -o)
    * --port (alias -p)
    * --host
    * --failsafe (alias -x; time in milliseconds)

## Example

   $ notify -t "Hello" -m "My Message" -s --open http://github.com
   $ notify -t "Agent Coulson" --icon https://raw.githubusercontent.com/mikaelbr/node-notifier/master/example/coulson.jpg
   $ notify -m "My Message" -s Glass
   $ echo "My Message" | notify -t "Hello"

node-notifier-cli's People

Contributors

dependabot[bot] avatar jkrehm avatar louisiv avatar microchipq avatar mikaelbr avatar piotr-cz avatar shadiakiki1986 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-notifier-cli's Issues

Keeping this repo up to date

Hi, came across Node Notifier and I'm glad that this CLI version exists but it seems that it's a bit out of date. Do you plan to regularly keep this updated to the latest version? Is it as easy as updating the version in package.json?

Terminal hangs for like 10 seconds

Was hoping to send a notification, and carry on with some other tasks, but found that this hangs in the terminal. It used to work how I was hoping from v1.1.2 and earlier though, so I'll use that for now.

Input:

notify --title "Doing stuff" --message "Hang on"

Output after 10 seconds or so:

timeout

Notifying using Nodemon

I'm trying to add node-notifier-cli in development build script, however as a script, it does not work:

package.json

{
  "scripts": {
    "notify": "notify -t \"Development\" -m \"Build complete.\""
  }
}

nodemon.json

Does not work

{
  "events": {
    "restart": "npm run build && npm run notify"
  }
}

Works

{
  "events": {
    "restart": "npm run build && osascript -e 'display notification \"app restarted\" with title \"nodemon\"'"
  }
}

Example doesn't work without message

The example:

   $ notify -t "Agent Coulson" --icon https://raw.githubusercontent.com/mikaelbr/node-notifier/master/example/coulson.jpg

doesn't work unless a message is also included:

   $ notify -t "Agent Coulson" -m "It's a magical place" --icon https://raw.githubusercontent.com/mikaelbr/node-notifier/master/example/coulson.jpg

Add ability to show emoji as icon

I would like emoji to be shown as main notification image. Something like that: notify -t 'Hello' -m 'My message' -i '๐Ÿ‘'. Would it be possible?

I've discovered, that base64 image string works perfectly, but text of encoded image in base64 is very long. So, I've also tried to find any other cli tool which could convert emoji symbol to base64 image, so I could pass that into notify, but I haven't found any :(

How to remove "timeout" after popup is shown?

After the "notify" shows the popup, it hangs for several seconds and only then exists logging a message "timeout".

Is there a way to reduce or remove that timeout?

I'm on mac in case that matters.

Add a license

Hi, I've experienced a few bugs with node-notifier-cli and want to make some changes. Can you add a license for this repository so I can fork and change it? I saw that on your node-notifier repository you use the MIT license. It'd be great if you could add it to this repository as well. Thanks!

Suggestions for why parallelshell breaks node-notifier?

mikaelbr/node-notifier#109

From original Issue:


I've been able to get multiple people on multiple operating systems (OSX and Windows) to reproduce some unexpected behavior with the following package:

{
  "dependencies": {
    "node-notifier": "^4.5.0",
    "parallelshell": "^2.0.0"
  },
  "scripts": {
    "works": "npm run notify",
    "broken": "parallelshell \"npm run notify\"",
    "notify": "notify -t \"Some Title\" -m \"Some Message\" || echo 'failed'"
  }
}

For some reason when notify is called behind something run with parallelshell it will just hang. I'd love to try and figure out how I can get this unstuck but I'm not sure if it is a problem with parallelshell or node-notifier. :( Any ideas?

I've also opened an issue on parallelshel here: darkguy2008/parallelshell#52

Displaying CLI errors with Notifier CLI

It's not clear to me how to properly format an error message with this tool. The README.md gives examples of static messages but not for dynamic.

For example, I'm running Node Sass using a NPM watch script. When a syntax error shows up in my terminal, there's no clear way to display it in the notifier. I'm not sure how to build a use error handling to pipe the error into the Notifier notification.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.