~bayindirh/nudge

Pushover CLI written with Go.
ce230372 — Hakan Bayindir a month ago
doc: Add RELEASE_NOTES.md file.
c0383f6e — Hakan Bayindir a month ago
docs: Update README.md
f955616c — Hakan Bayindir 2 months ago
Merge remote-tracking branch 'origin/devel'

clone

read-only
https://git.sr.ht/~bayindirh/nudge
read/write
git@git.sr.ht:~bayindirh/nudge

You can also use your local clone with git send-email.

nudge logo

#nudge - A Pushover CLI

Current state: Almost beta. Can be used reliably to send messages daily, but things may still change, esp. command line arguments.

nudge provides a small command line tool to send push notifications over Pushover. It aims to provide a simple and composable tool to send push notifications.

#Building

After cloning the repository, going to src/ folder and running go build nudge.go should do.

#Configuration

You need two keys for Nudge to function. An API key and a User key.

Important: The keys should be placed in nudge.conf file. See file contents for guidance.

The configuration file (nudge.conf) is searched in the following places, in the order given below:

  • . (Current directory where user is in)
  • ~/.config/nudge.conf
  • /etc/nudge.conf
  • $CURRENT_WORKING_DIRECTORY/conf (a conf directory where nudge binary is)
  • $CURRENT_WORKING_DIRECTORY (nudge.conf in the same directory with nudge binary)

The first found file takes precedence over the rest, even if they're present. Unless the file location is overriden via flags and no configuration file is found in any of the given locations, nudge throws an exits.

You can use src/conf/nudge.conf.example file as a template. File format is TOML.

#Running

Running nudge is simple. Considering your files are in the correct places (see nudge -help for defaults), it's simply:

nudge "Hello, world!"

Message titles are set to sender's hostname by default, but can be changed. Message will be sent to all devices registered to that user, with default sound and priority. These can be changed, too.

Current options are as follows:

-config_path string
      Define or override configuration file path.
-devices string
      List of devices to be notified. Separate multiple devices with ','. (default "all")
-dryrun
      Simulate sending a notification.
-log_level string
       Change the logging level.
-priority int
      Adjust notification priority. Between -2 and 2. (default 0)
-sound string
      Set notification sound. (default "pushover")
-title string
      Notification title. Hostname is used if omitted. (default "temple")
-url string
      An optional URL to attach to the notification.
-url_title string
      An optional title for URL to send.
-version
      Print version and exit.

#What's new in 0.2

  • Configuration file can be overloaded via command line.
  • Logging level can be configured via config file and command line.

#Known Issues

  • Logs can't be redirected to files via configuration file or command line, yet. These options are not handled in the code.
  • Configuration sanity checking doesn't check everything for acceptable values.
  • Not all features provided by Pushover is implemented (image attachments, HTML formatting, and possibly others)

#Other Details

nudge is written in Go and licensed with GNU/GPLv3 or later. The project uses Semantic Versioning and Conventional Commits.

This project is a part of Very Alpha Technologies ecosystem.