{"id":20204205,"url":"https://github.com/openbridge/ob_hipchat","last_synced_at":"2025-06-16T13:08:13.275Z","repository":{"id":73272224,"uuid":"73232212","full_name":"openbridge/ob_hipchat","owner":"openbridge","description":"Hippy is a Bash script to send messages to HipChat.","archived":false,"fork":false,"pushed_at":"2017-01-17T20:10:12.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-01-13T20:30:51.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.openbridge.com","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openbridge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-08T22:19:47.000Z","updated_at":"2017-02-21T22:08:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"6360d3f8-f128-4630-83a5-99e640ad5dc7","html_url":"https://github.com/openbridge/ob_hipchat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbridge%2Fob_hipchat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbridge%2Fob_hipchat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbridge%2Fob_hipchat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbridge%2Fob_hipchat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openbridge","download_url":"https://codeload.github.com/openbridge/ob_hipchat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241637595,"owners_count":19995004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T05:09:07.357Z","updated_at":"2025-03-03T09:21:01.438Z","avatar_url":"https://github.com/openbridge.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Hippy](https://github.com/openbridge/ob_hipchat/blob/master/images/hipchat.png)\n\nHippy: A Bash Hipchat Client\n===========\n\n**Hippy** is Bash script to send messages to [HipChat][hc]. **Hippy** is perfect for those looking to create clean, minimal Docker containers.\n\n## Why Hippy?\n**Hippy** does not require any special packages or libraries (other than Bash). This makes it a perfect companion for minimal Docker containers.\n\nThe **Hippy** `hipchat` script is approximately `8KB`. A python Hipchat client may use approximately `10MB+` once all the supporting python packages, dependencies and libraries were installed. On alpine linux, bash is about `618KB`, so the overall footptint at `\u003c 650KB` is pretty small.\n\n*One caveat*: If you already are using Python and have the packages, dependencies and libraries required for a Python based HipChat client, that might be the way to go! The same is true for Java, Go, PHP or whatever your preference is.\n\n## How Does It Work?\n\nOnce you have it installed and configured sending a message is as simple as:\n\n```bash\nhipchat -i \"hello hipchat world\"\n```\n\n[hc]: http://www.hipchat.com\n\n### Commands\n\nCommand-line options are passed into Hippy. A list of options is available by executing ```hipchat -h```.\n```bash\n-h Show this message\n-C Path to config file\n-t API token\n-r Room ID\n-f From name\n-c Message color (yellow, red, green, purple or random - default: yellow)\n-m Message format (html or text - default: html)\n-i Message to send to room, allows you to specify input via command line instead of stdin\n-l Message status (critical, warning, unknown, ok, down, up)\n-n Trigger notification for people in the room (default: True)\n-o API host (api.hipchat.com)\n-v API version (default: v2)\n```\n\nHere is an example:\n```bash\nhipchat -t 123123213131231lj3l1 -r devops -f server-o1 -i \"System is at 90% capcity\" -l critical -n True\n```\n\n## Configuration\n\nPlace `hipchat` into `/usr/bin` or whatever location best suits you.\n\nThe default install for me is typically `/usr/bin` but you can do whatever works for you. If you place the script into a location like `/usr/local/bin/hipchat` you need to adjust any examples provided in the README accordingly.\n\n### Environment\n`hipchat` can be configured in command line mode, with environment variables, a config file or combination of all three.\n\n* Command-line options\n* Environment variables\n* Configuration file\n\n\n#### Command-line\nYou can pass the values into the script:\n```bash\ncat message.txt | HIPCHAT_TOKEN=\u003ctoken\u003e HIPCHAT_ROOM_ID=\u003croom id\u003e hipchat -f \"System\"\n```\nHere is another example passing variables to Hippy:\n```bash\nhipchat -t 292932932921989108301938 -r pizza -f deliverybot -i \"Your pizza is almost ready\"\n```\n\n#### Environment variables\n\nAll options available as command-line options can be passed in as environment variables.\n\nEnvironment variable | Description\n-------------------- | -----------\nHIPCHAT_TOKEN        | API token\nHIPCHAT_ROOM_ID      | Room ID\nHIPCHAT_FROM         | Who sent the message\nHIPCHAT_COLOR        | Message color (yellow, red, green, purple or random - default: gray)\nHIPCHAT_FORMAT       | Message format (html or text - default: html)\nHIPCHAT_NOTIFY       | Trigger notification for people in the room (default: True)\nHIPCHAT_HOST         | API host (api.hipchat.com)\nHIPCHAT_LEVEL        | Message state (i.e., critical, warning, unknown, ok)\nHIPCHAT_API          | API version (only v2 is supported)\n\nYou will likely NOT want to edit `HIPCHAT_HOST`, `HIPCHAT_API` or `HIPCHAT_FORMAT` from defaults unless you have specific use cases to do so.\n\n#### Setting Environment Variables\n\nYou can set the environment variables in a Docker run command:\n```bash\ndocker run -it -v /mnt:/mnt alpine\n-e HIPCHAT_ROOM_ID=\u003croomid\u003e\n-e HIPCHAT_TOKEN=\u003ctoken\u003e\nbash\n```\nYou can simply export the variables on the command line:\n```bash\nexport HIPCHAT_ROOM_ID=\u003croomid\u003e\nexport HIPCHAT_TOKEN=\u003ctoken\u003e\n```\n\nOnce you have the variables set, you can send a message:\n```bash\nhipchat -i \"Ok: We love pizza!\"\n```\n\nYou can also use other variables when sending a message: For example, below `${TAG}` is a variable that defines the current user. This will sent the FROM message to originate from `${TAG}`. The mesage also has set notifications `-n` to `True` and `-l` to `OK`.\n ```bash\nhipchat -f ${TAG} -n True -i \"Hello World, Im Ok\" -l OK\n```\n\n### Using A Configuration file\n\nAll environment variables can be specified in a configuration file. There may be cases where a configuration file is preferred.  If this is your preferred path, you can create a configuration file and place it in a location like this: ```/etc/hipchat.conf```\n\n#### Format\n\nLets assume your configuration is located here ```/etc/hipchat.conf```. The contents of that file should look like this:\n\n```bash\nTOKEN=${HIPCHAT_TOKEN:-\u003cinserttoken\u003e}\nROOM_ID=${HIPCHAT_ROOM_ID:-\u003cinsertroom\u003e}\nFROM=${HIPCHAT_FROM:-\u003cinsertfrom\u003e}\nCOLOR=${HIPCHAT_COLOR:-\u003cinsertcolor\u003e}\nFORMAT=${HIPCHAT_FORMAT:-html}\nMESSAGE=${HIPCHAT_MESSAGE:-html}\nNOTIFY=${HIPCHAT_NOTIFY:-\u003cinsertnotify\u003e}\nHOST=${HIPCHAT_HOST:-api.hipchat.com}\nLEVEL=${HIPCHAT_LEVEL:-\u003cinsertlevel\u003e}\nAPI=${HIPCHAT_API:-v2}\n```\nWith your config setup, it would end up looking like this:\n```bash\nTOKEN=${HIPCHAT_TOKEN:-213910239AS0123i123213jl123jl}\nROOM_ID=${HIPCHAT_ROOM_ID:-general}\nFROM=${HIPCHAT_FROM:-pizzalover}\nCOLOR=${HIPCHAT_COLOR:-green}\nFORMAT=${HIPCHAT_FORMAT:-html}\nMESSAGE=${HIPCHAT_MESSAGE:-html}\nNOTIFY=${HIPCHAT_NOTIFY:-0}\nHOST=${HIPCHAT_HOST:-api.hipchat.com}\nLEVEL=${HIPCHAT_LEVEL:-OK}\nAPI=${HIPCHAT_API:-v2}\n```\n\n### Importing Your Config File\nTo use your configuration file, you need to set the `-C` and provide the path to the file:\n```bash\n$ hipchat -C \"/etc/hipchat.conf\" -i \"Ok: We love pizza!\"\n```\n\nif your configuration file was located someplace other than `/etc/hipchat.conf`, then you simply pass the location to the script:\n```bash\n$ hipchat -C \"/opt/usr/hipchat.conf\" -i \"Ok: We love pizza!\"\n```\n\n## Reference\n**Hippy** is based off of the Hipchat CLI client\nhttps://github.com/hipchat/hipchat-cli\n\n## License\n\nThe MIT License (MIT) Copyright (c)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbridge%2Fob_hipchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenbridge%2Fob_hipchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbridge%2Fob_hipchat/lists"}