Send hipchat notifications from the command line
curl
on the commandlinegetopts
support in your shell
bash
version 3.2
Create a directory to hold your personal shell scripts:
cd ~
mkdir -p scripts
Then clone this repo there
cd ~/scripts
git clone https://github.com/josegonzalez/bash-hipchat.git
Then add this directory to your PATH
within your .bashrc
or .bash_profile
:
export PATH=${PATH}:${HOME}/scripts/hipchat
Run the following command:
hipchat -h
To get usage instructions:
hipchat
usage:
-h - This help screen
-a AUTH_TOKEN - Authentication token (no default)
-c COLOR - Color of notification (default: yellow)
-f FROM - Who to send from (default: Nobody)
-m MESSAGE_FORMAT - Message format (default: html)
-n NOTIFY - Whether to notify channel users (default: 0)
-r ROOM_ID - Room id (default: 31226)
- Some sort of unit testing
- Fallback for installations without
curl
-wget
? - Proper exit code based on curl response
MIT License