Silcet / notify-remote

Send notifications from a remote server to the host

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

notify-remote

Send notifications from a server to your host computer over GRPC and leverage your native notification system.

This project contains both the server and client scripts needed.

Getting started

  1. Install dependencies:

    0.1. Install Rust

    0.2. Install protobuf compiler, needed by the grpc-protobuf crate

  2. Clone, build and install the project (❤️ cargo):

    cargo install --git https://github.com/Silcet/notify-remote.git --branch main
  3. Run the server locally:

    It will be served in port 5001 if no other port is specified.

    notify-remote-server -p <port>

    This will print the current IP of the host. Note it down for later (<host-ip>).

  4. Copy the client over to your remote worker:

    Use scp for example:

    scp ~/.cargo/bin/notify-remote <user>@<remote-worker-ip>:<path>

    Remember to place the binary in a folder in the $PATH or add the placement folder to the $PATH.

  5. Run notify-remote after a long-running command:

    sleep 5; notify-remote --ip <host-ip> "Summary of the notification" "Body of the notification"

    This example will pop a notification in your host after 5 seconds with the chosen summary and body

TODO

  • Add tests
  • Add more fileds to the notification (relevance, icon, etc..)
  • Add authentication
  • Handle notification errors without panic

About

Send notifications from a remote server to the host

License:MIT License


Languages

Language:Rust 93.7%Language:Dockerfile 6.3%