noti

repository·github·Indexed 26 days ago

https://github.com/variadico/noti

A CLI tool for notifications that can wrap commands to trigger alerts upon completion or monitor running processes by PID. It supports various notification services including Slack, Pushover, ntfy, Twilio, Google Chat, Keybase, Pushbullet, Pushsafer, Simplepush, Chanify, and BearyChat. Configuration can be managed via YAML files, environment variables with the NOTI_ prefix, or command-line flags.

Tokens
5.5K
Snippets
16
Records
40
Agent score
84%

What's inside noti

  1. Set up Twilio notifications

    github

    Retrieve your credentials from the [Twilio] Project info tab. Set the following keys:

    • twilio.accountsid: Your ACCOUNT SID.
    • twilio.authtoken: Your AUTH TOKEN.
    • twilio.numberto: The destination phone number.
    • twilio.numberfrom: The sender phone number.
  2. Locate the noti configuration file

    github

    If you do not explicitly specify a configuration file using the --file flag, noti searches for noti.yaml in the following locations, in order:

    1. ./.noti.yaml (current working directory)
    2. $XDG_CONFIG_HOME/noti/noti.yaml

    If $XDG_CONFIG_HOME is not set, it defaults to $HOME/.config/noti/noti.yaml.

  3. Monitor a process with noti

    github

    Use noti to wrap a command. It will execute the command and trigger a notification once the process completes. You can customize the notification title with -t or --title and the message with -m or --message.

    noti tar -cjf music.tar.bz2 Music/
  4. Download noti binaries

    github

    If you prefer not to build from source, you can download the latest pre-compiled binaries for macOS or Linux using curl.

    # macOS
    curl -L $(curl -s https://api.github.com/repos/variadico/noti/releases/latest | awk '/browser_download_url/ { print $2 }' | grep 'darwin-amd64' | sed 's/"//g') | tar -xz
    
    # Linux
    curl -L $(curl -s https://api.github.com/repos/variadico/noti/releases/latest | awk '/browser_download_url/ { print $2 }' | grep 'linux-amd64' | sed 's/"//g') | tar -xz
  5. Set up Telegram notifications

    github

    To use Telegram, create a bot using @BotFather via the /newbot command. Use the resulting bot token in your configuration.

    Set the following keys:

    • telegram.token: Your bot token.
    • telegram.chatId: The chat ID to send to.
    • telegram.topic: (Optional) The topic ID.
  6. Set up Slack notifications

    github

    To use Slack, create an OAuth token via the Slack [OAuth Tokens for Testing and Development] page.

    Set the following keys in your config:

    • slack.token: Your OAuth token.
    • slack.channel: The target channel (e.g., #general) or a username (e.g., @jaime).
    • slack.username: The name displayed for the notification bot.