🚀 Simple command line-client to send messages to Rocket.Chat
1.3K
🚀 rocket-notify🚀 Simple command-line client to send messages to Rocket.Chat
rocket-notify can be installed via the homebrew package manager on macOS and linux
brew tap ianmclinden/extras
brew install rocket-notify
curl -L https://github.com/ianmclinden/rocket-notify/releases/latest/download/rocket-notify-x86_64-unknown-linux-gnu.tar.gz | tar zx
sudo install -t /usr/local/bin rocket-notify
Binaries for linux/arm64 and linux/arm are also available from the releases page.
curl -L https://github.com/ianmclinden/rocket-notify/releases/latest/download/rocket-notify-x86_64-apple-darwin.tar.gz | tar zx
sudo cp rocket-notify /usr/local/bin/
Binaries for darwin/arm64 (Apple Silicon) are also available from the releases page.
A rocket-notify.exe for windows/amd64 is available as a tarball from the releases page.
In order for Rocket.Chat to receive webhooks, a valid webhook URL must be provisioned by a Rocket.Chat admin. The URL is associated with permissions that restricts what users can send and recieve messages.
Once a webhook URL is acquired, it can be added to the environment as ROCKET_NOTIFY_URL. To do this automatically (in bash), add the following to ~/.bashrc, or ~/.bash_profile, or /etc/environment.
export ROCKET_NOTIFY_URL=https://{webhookURL}
rocket-notify [options] <channel> <message>
For example
rocket-notify --icon ":tada:" --alias "Project Builder" @myusername "Build Finished!"
For a full list of options
rocket-notify --help
The cli can also be invoked via a Docker container. In this case, parameters can be passed via the environment, for example:
docker run \
-e ROCKET_NOTIFY_URL="https://{webhookURL}" \
-e ROCKET_NOTIFY_ALIAS="Project Builder" \
-e ROCKET_NOTIFY_ICON=":tada:" \
-e ROCKET_NOTIFY_CHANNEL="@myusername" \
-e ROCKET_NOTIFY_MESSAGE="Build Finished!" \
--rm ijmclinden/rocket-notify:latest
ROCKET_NOTIFY_URL (Required)Rocket.Chat webhook URL
ROCKET_NOTIFY_CHANNEL (Required)Channel to which the mesage will be sent, like '#general' or '@eric'
ROCKET_NOTIFY_MESSAGE (Required)Message to send
ROCKET_NOTIFY_ALIASAlias for the message sender
Default <hostname>
ROCKET_NOTIFY_AVATARSet the sender's icon to the provided URL. Supercedes ROCKET_NOTIFY_ICON
ROCKET_NOTIFY_COLORColor of the message header
Default darkgrey
ROCKET_NOTIFY_ICONSet the sender's icon to an emoji
Default :computer:
ROCKET_NOTIFY_MINIMIZESend with message block collapsed
ROCKET_NOTIFY_TITLETitle of the message
Content type
Image
Digest
sha256:9366211be…
Size
4.8 MB
Last updated
4 months ago
docker pull ijmclinden/rocket-notify