{"id":17443074,"url":"https://github.com/adrianrudnik/pushover-cli","last_synced_at":"2025-03-01T20:31:02.265Z","repository":{"id":57651748,"uuid":"270075118","full_name":"adrianrudnik/pushover-cli","owner":"adrianrudnik","description":"Unofficial CLI to send messages with https://pushover.net on Windows, Linux and macOS.","archived":false,"fork":false,"pushed_at":"2022-10-03T13:25:30.000Z","size":1347,"stargazers_count":13,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T22:11:15.043Z","etag":null,"topics":["golang","pushover","pushover-cli","pushover-notifications"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adrianrudnik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-06T18:57:52.000Z","updated_at":"2024-10-05T15:40:52.000Z","dependencies_parsed_at":"2023-01-19T03:00:35.283Z","dependency_job_id":null,"html_url":"https://github.com/adrianrudnik/pushover-cli","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianrudnik%2Fpushover-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianrudnik%2Fpushover-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianrudnik%2Fpushover-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianrudnik%2Fpushover-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianrudnik","download_url":"https://codeload.github.com/adrianrudnik/pushover-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241421043,"owners_count":19960213,"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":["golang","pushover","pushover-cli","pushover-notifications"],"created_at":"2024-10-17T16:43:19.466Z","updated_at":"2025-03-01T20:31:01.986Z","avatar_url":"https://github.com/adrianrudnik.png","language":"Go","readme":"# pushover-cli\n\n- [Installation](#installation)\n  - [Download](#download)\n  - [Snap](#snap)\n  - [Build it from sources](#build-it-from-sources)\n- [Configuration](#configuration)\n  - [Environment variables](#environment-variables)\n  - [Configuration files](#configuration-files)\n- [Usage](#usage)\n  - [Getting help](#getting-help)\n  - [Push messages](#push-messages)\n  - [Rate limits](#rate-limits)\n  - [Sending text via images](#sending-text-via-images)\n- [Related documentations](#related-documentations)\n\nUnofficial CLI to send messages with [pushover.net](https://pushover.net/) on Windows, Linux and macOS.\n\n## Installation\n\nThe following installation channels are available:\n\n### Download\n\nDownload a package directly from the [release page](https://github.com/adrianrudnik/pushover-cli/releases).\n\n### Snap\n\n```bash\nsnap install pushover-cli\n```\n\nThere are some  small limitations to using file configurations with snaps.:\n\n- You can still use `pushover-cli config setup` to create a configuration file, but you cannot use any other location as a fallback, as this snap is operating in `strict` mode.\n- Attaching files is not easily done as the snap does not have access to paths inside home.\n\nIf unsure, I would recommend to use environment variables instead when operating outside the confined snap home.\n\n### Build it from sources\n\nDownload or clone the sources and build it with:\n\n```bash\ngo build -mod=vendor .\n./pushover --version\n```\n\n## Configuration\n\nThere are two ways to pass on your pushover credentials: Environment variables or a configuration file.\n\n### Environment variables\n\nThe setup for environment variables is pretty straightforward, set the following ones, and they will be picked up by this tool.\n\n| Variable          | Description |\n| ----------------- | ----------- |\n| PUSHOVER_CLI_USER | User key    |\n| PUSHOVER_CLI_API  | API token   |\n\n### Configuration files\n\nA configuration file can be easily be configured.\n\nThere is a small wizard to help you create a valid configuration file in your current user profile folder.\n\n```bash\npushover-cli config setup\n\n# \u003e Enter user key: someuser\n# \u003e Enter API token: somekey\n# \u003e 2020-06-07T12:36:48+02:00 INF Config saved path=/home/adrian/.config/pushover-cli/config.json\n```\n\nThe `config.json` will be picked up in different locations, to get a list of all recognized, see all available use the following command:\n\n```bash\npushover-cli config paths\n\n# \u003e 2020-06-07T12:39:13+02:00 INF Collecting paths that will be used for config.json lookup\n# \u003e 2020-06-07T12:39:13+02:00 INF Folder found path=/home/adrian/.config/pushover-cli\n# \u003e 2020-06-07T12:39:13+02:00 INF Folder found path=/etc/xdg/xdg-plasma/pushover-cli\n```\n\nTo remove the nearest configuration use:\n\n```bash\npushover-cli config clear\n\n# \u003e 2020-06-07T12:43:03+02:00 INF Config cleared file=/home/adrian/.config/pushover-cli/config.json\n```\n\n## Usage\n\n### Getting help\n\nThere are several ways to get help to specific commands:\n\n```bash\npushover-cli help\npushover-cli --help\npushover-cli config --help\npushover-cli help config\n```\n\n### Push messages\n\nTo get an overview of all possible flags, see `pushover-cli help send` or read through the overview here:\n\n```\nFlags:\n  -e, --api-endpoint string   API endpoint for message submission (default \"https://api.pushover.net/1/messages.json\")\n  -a, --attachment string     path to image attachment (max size 2.5mb)\n  -d, --devices strings       devices to limit the push to (comma-separated)\n  -h, --help                  help for push\n      --link-label string     title for the supplementary URL (max. 100 characters)\n      --link-url string       supplementary URL (max. 512 characters)\n  -p, --priority string       message priority [none, quiet, normal, high, confirm] (default \"normal\")\n  -s, --sound string          playback sound [see https://pushover.net/api#sounds] (default \"pushover\")\n      --timestamp int         message date and time override as unix timestamp\n  -t, --title string          message title (max. 250 characters)\n\nGlobal Flags:\n  -v, --verbose   print debug information\n```\n\nAll flags are optional, so a simple\n\n```bash\npushover-cli push \"hello\"\n\n# \u003e 2020-06-07T13:59:47+02:00 INF Message pushed request=a9ee72c0-1e76-476a-bfa5-d421dcd6acca status=1\n# \u003e 2020-06-07T13:58:53+02:00 INF Rate limit information requests-per-month=7500 requests-remaining=7468 reset-at=2020-07-01T05:00:00Z\n```\n\nwill work. Here is a more complex example on how to use it:\n\n```bash\npushover-cli \\\n    --devices=mobile,workpc \\\n    --link-url https://localhost/report.html \\\n    -p quiet \\\n    -s cashregister \\\n    \"Generated report available now\"\n```\n\nSending attachments can be done with:\n\n```bash\npushover-cli --attachment image.jpg \"some message\"\n```\n\n### Rate limits\n\nThe following command can be used to request the current rate limits:\n\n```bash\npushover-cli limits\n\n# \u003e 2020-06-07T17:28:51+02:00 INF Rate limit information requests-per-month=7500 requests-remaining=7461 reset-at=2020-07-01T05:00:00Z\n```\n\n### Sending text via images\n\nPush messages are limited to 1024 characters. A way to transport a longer or preformatted text is to send it as an image.\n\nThis example is based on ImageMagick on Linux, but should be easily adaptable to other operating systems.\n\nFirst, ensure that you have ImageMagick installed via `convert --version` and that your desired files are allowed to convert by checking a policy *like* this exists in your `/etc/ImageMagick-{version}/policy.xml`:\n\n```xml\n\u003cpolicy domain=\"path\" rights=\"all\" pattern=\"@*.log\" /\u003e\n```\n\nPlease understand that this might be considered a security risk, as anyone could use the same technique to do simple text to image conversions, that then might leave the system.\n\nAfter that we can try to convert a text-snipped into an image:\n\n```bash\nconvert \\\n  -size 4000x4000 xc:white \\\n  -font \"FreeMono\" \\\n  -pointsize 12 \\\n  -fill black \\\n  -annotate +15+30 \"@your.log\" \\\n  -trim \\\n  -bordercolor \"#FFF\" \\\n  -border 10 \\\n  +repage \\\n  result.png\n\npushover-cli push --attachment result.png \"daily report\"\n```\n\nPlease be graceful with the maximum size of the image, the given example of `4000x4000` is just the maximum that could be reached, the final `+repage` will reduce the image size to the actual content while still respecting the maximum size.\n\n## Related documentations\n\nhttps://pushover.net/api\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianrudnik%2Fpushover-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianrudnik%2Fpushover-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianrudnik%2Fpushover-cli/lists"}