{"id":13581677,"url":"https://github.com/gotify/cli","last_synced_at":"2025-05-15T12:04:15.613Z","repository":{"id":45479078,"uuid":"158287235","full_name":"gotify/cli","owner":"gotify","description":"A command line interface for pushing messages to gotify/server.","archived":false,"fork":false,"pushed_at":"2025-03-14T14:50:39.000Z","size":497,"stargazers_count":484,"open_issues_count":11,"forks_count":60,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-14T22:18:34.855Z","etag":null,"topics":["cli","golang","gotify","push-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/gotify.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-11-19T20:40:54.000Z","updated_at":"2025-04-13T22:41:37.000Z","dependencies_parsed_at":"2024-06-18T21:12:11.932Z","dependency_job_id":"32822894-f3c4-48fd-bbf4-f1c5808e1593","html_url":"https://github.com/gotify/cli","commit_stats":{"total_commits":45,"total_committers":11,"mean_commits":4.090909090909091,"dds":0.4222222222222223,"last_synced_commit":"8714a52b4d20b18fee62bdb1dd8fd7e3a367a493"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotify%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotify%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotify%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotify%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gotify","download_url":"https://codeload.github.com/gotify/cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254337612,"owners_count":22054253,"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":["cli","golang","gotify","push-notifications"],"created_at":"2024-08-01T15:02:10.221Z","updated_at":"2025-05-15T12:04:10.603Z","avatar_url":"https://github.com/gotify.png","language":"Go","readme":"# Gotify-CLI [![travus-badge][travis-badge]][travis] [![badge-release][badge-release]][release]\n\nGotify-CLI is a command line client for pushing messages to [gotify/server][gotify/server]. It is **not** required to push messages. See [alternatives](#alternatives).\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"gotify_cli.gif\"/\u003e\n\u003c/p\u003e\n\n## Features\n\n* stores token/url in a config file\n* initialization wizard\n* piping support (`echo message | gotify push`)\n* simple to use\n* watch and push script result changes (`gotify watch \"curl http://example.com/api | jq '.data'\"`)\n\n## Alternatives\n\nYou can simply use [curl](https://curl.haxx.se/), [HTTPie](https://httpie.org/) or any other http-client to push messages.\n\n```bash\n$ curl -X POST \"https://push.example.de/message?token=\u003capptoken\u003e\" -F \"title=my title\" -F \"message=my message\"\n$ http -f POST \"https://push.example.de/message?token=\u003capptoken\u003e\" title=\"my title\" message=\"my message\"\n```\n\n## Installation\n\n### Manually\n\nDownload the [latest release][release] for your os: (this example uses version `v2.2.0`)\n\n```bash\n$ wget -O gotify https://github.com/gotify/cli/releases/download/v2.2.0/gotify-cli-linux-amd64\n# or\n$ curl -Lo gotify https://github.com/gotify/cli/releases/download/v2.2.0/gotify-cli-linux-amd64\n```\n\nMake `gotify` executable:\n\n```bash\n$ chmod +x gotify\n```\n\nTest if the Gotify-CLI works: *(When it doesn't work, you may have downloaded the wrong file or your device/os isn't supported)*\n\n```bash\n$ gotify version\n```\n\nIt should output something like this:\n\n```bash\nVersion:   2.2.0\nCommit:    95cc125e39f805a1369b0c746c8bf3af15797a57\nBuildDate: 2020-09-25-16:27:04\n```\n\n*(optional)* Move the executable to a folder on your `$PATH`:\n\n```bash\n$ mv gotify /usr/bin/gotify\n```\n\n### Arch Linux\n\nGotify-CLI is available [in the AUR][AUR], so you can install it with\n[any AUR helper][AUR-helpers], i.e. [`yay`][yay]:\n\n```bash\n$ yay -S gotify-cli\n```\n\n\u003e Maintenance of the AUR package is not performed by the Gotify team.\n\n### macOS\n\nGotify-CLI is available [in Homebrew][brew], so you can install it with:\n\n```bash\n$ brew install gotify\n```\n\n\u003e Maintenance of the Brew package is not performed by the Gotify team.\n\n## Usage\n\nNow you can either run the initialization wizard or [create a config manually](#Configuration). This tutorial uses the wizard.\n```bash\n$ gotify init\n```\nWhen you've finished initializing Gotify-CLI, you are ready to push messages to [gotify/server][gotify/server].\n\nHere are some examples commands, you can view the \"push help\" via `gotify help push` (or have a look at [push help](#push-help)).\n```bash\n$ gotify push my message\n$ gotify push \"my message\"\n$ echo my message | gotify push\n$ gotify push \u003c somefile\n$ gotify push -t \"my title\" -p 10 \"my message\"\n$ gotify watch \"curl http://example.com/api | jq '.data'\"\n```\n\n## Help\n\n**Uses version `v2.2.0`**\n\n```bash\nNAME:\n   Gotify - The official Gotify-CLI\n\nUSAGE:\n   gotify [global options] command [command options] [arguments...]\n\nVERSION:\n   2.2.0\n\nCOMMANDS:\n     init        Initializes the Gotify-CLI\n     version, v  Shows the version\n     config      Shows the config\n     push, p     Pushes a message\n     watch       watch the result of a command and pushes output difference\n     help, h     Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h     show help\n   --version, -v  print the version\n```\n\n### Watch help\n\n```\nNAME:\n   gotify watch - watch the result of a command and pushes output difference\n\nUSAGE:\n   gotify watch [command options] \u003ccmd\u003e\n\nOPTIONS:\n   --interval value, -n value  watch interval (sec) (default: 2)\n   --priority value, -p value  Set the priority (default: 0)\n   --exec value, -x value      Pass command to exec (default: \"sh -c\")\n   --title value, -t value     Set the title (empty for command)\n   --token value               Override the app token [$GOTIFY_TOKEN]\n   --url value                 Override the Gotify URL\n   --output value, -o value    Output verbosity (short|default|long) (default: \"default\")\n```\n\n### Push help\n\n```bash\n$ gotify help push\nNAME:\n   gotify push - Pushes a message\n\nUSAGE:\n   gotify push [command options] \u003cmessage-text\u003e\n\nDESCRIPTION:\n   the message can also provided in stdin f.ex:\n   echo my text | gotify push\n\nOPTIONS:\n   --priority value, -p value    Set the priority (default: 0)\n   --title value, -t value       Set the title (empty for app name)\n   --token value                 Override the app token [$GOTIFY_TOKEN]\n   --url value                   Override the Gotify URL\n   --quiet, -q                   Do not output anything (on success)\n   --contentType value           The content type of the message. See https://gotify.net/docs/msgextras#client-display\n   --disable-unescape-backslash  Disable evaluating \\n and \\t (if set, \\n and \\t will be seen as a string)\n```\n\n## Configuration\n\n**Note: The config can be created by `gotify init`.**\n\nGotify-CLI will search the following paths for a config file:\n* `/etc/gotify/cli.json`\n* `$XDG_CONFIG_HOME/gotify/cli.json`\n* `~/.gotify/cli.json`\n* `./cli.json`\n\n### Structure\n\n| name  | description | example |\n| ----- | ----------- | ------- |\n| token | an application token (a client token will not work) | `A4ZudDRdLT40L5X` |\n| url   | the URL to your [gotify/server][gotify/server]      | `https://gotify.example.com` |\n| defaultPriority   | Default priority ( set to 0 if not present)       | `6` |\n\n### Config example\n\n```json\n{\n  \"token\": \"A4ZudDRdLT40L5X\",\n  \"url\": \"https://gotify.example.com\",\n  \"defaultPriority\": 6\n}\n```\n\n## Configuration option\n\nIf needed, you can disable SSL handcheck validation using an environment variable:\n```\nexport GOTIFY_SKIP_VERIFY_TLS=True\n```\n\nFor better security with self-signed certificate, you can also set custom root CA or pin the server cert for TLS verification:\n```\nexport SSL_CERT_FILE=/path/to/cert.pem\n```\n\n\n### Dockerfile\nThe Dockerfile contains the steps necessary to build a new version of the CLI and then run it in\na minimal Alpine container.\n\n**Build:**\n\n```bash\ndocker build -t gotify/gotify-cli .\n```\n\n**Run (this assumes your `cli.json` file is in the current working directory):**\n\n```bash\ndocker run -it -v \"$PWD/cli.json:/home/app/cli.json\" gotify/gotify-cli:latest push -p 5 \"Test from Gotify CLI\"\n```\n\n [gotify/server]: https://github.com/gotify/server\n [travis-badge]: https://app.travis-ci.com/gotify/cli.svg?branch=master\n [travis]: https://app.travis-ci.com/gotify/cli\n [badge-release]: https://img.shields.io/github/release/gotify/cli.svg\n [release]: https://github.com/gotify/cli/releases/latest\n [AUR]: https://aur.archlinux.org/packages/gotify-cli\n [AUR-helpers]: https://wiki.archlinux.org/title/AUR_helpers\n [yay]: https://aur.archlinux.org/packages/yay/\n [brew]: https://brew.sh\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotify%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgotify%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotify%2Fcli/lists"}