{"id":22548281,"url":"https://github.com/ewilan-riviere/notifier","last_synced_at":"2026-05-07T15:39:19.768Z","repository":{"id":181678867,"uuid":"667135657","full_name":"ewilan-riviere/notifier","owner":"ewilan-riviere","description":"CLI command to send notification on Discord or Slack.","archived":false,"fork":false,"pushed_at":"2023-10-25T10:07:38.000Z","size":2258,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T09:15:55.563Z","etag":null,"topics":["cli","discord","go","slack","webhook"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/ewilan-riviere/notifier","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/ewilan-riviere.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-16T18:52:23.000Z","updated_at":"2023-10-24T14:05:00.000Z","dependencies_parsed_at":"2023-07-16T19:55:36.151Z","dependency_job_id":"eb7b937b-2207-4184-b47e-12d24230ad2b","html_url":"https://github.com/ewilan-riviere/notifier","commit_stats":null,"previous_names":["ewilan-riviere/notifier"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/ewilan-riviere/notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewilan-riviere%2Fnotifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewilan-riviere%2Fnotifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewilan-riviere%2Fnotifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewilan-riviere%2Fnotifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ewilan-riviere","download_url":"https://codeload.github.com/ewilan-riviere/notifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewilan-riviere%2Fnotifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32744197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","discord","go","slack","webhook"],"created_at":"2024-12-07T15:14:53.883Z","updated_at":"2026-05-07T15:39:19.751Z","avatar_url":"https://github.com/ewilan-riviere.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# notifier\n\n[![go][go-version-src]][go-version-href]\n[![tests][tests-src]][tests-href]\n[![license][license-src]][license-href]\n\nA simple notifier CLI for Discord and Slack with Webhook. Powered by [Go][go-version-href].\n\n- `discord`: send a message to Discord (from CLI or `.env` file)\n- `slack`: send a message to Slack (from CLI or `.env` file)\n\n\u003e [!NOTE]\n\u003e\n\u003e To use Webhooks with Discord, check [Discord documentation](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) and for Slack, check [Slack documentation](https://api.slack.com/messaging/webhooks).\n\n## Install\n\n### From Go\n\nWith this install, you cannot use `.env` file\n\n```bash\ngo install github.com/ewilan-riviere/notifier@latest\n```\n\n### From source\n\n```bash\ngit clone https://github.com/ewilan-riviere/notifier.git\ncd notifier\ngo build -o notifier\n```\n\nCreate `.env` file and add your Discord and Slack webhooks, you can leave it blank.\n\n```bash\ncp .env.example .env\n```\n\nCreate symlink to use `notifier` everywhere\n\n```bash\nsudo rm -f /usr/local/bin/notifier\nsudo ln -s ~/notifier/notifier /usr/local/bin\nsudo chmod +x /usr/local/bin/notifier\n```\n\n### As library\n\n```bash\ngo get github.com/ewilan-riviere/notifier@latest\n```\n\n## Usage (CLI)\n\n### With webhook URL\n\nSend a message to Discord or Slack.\n\n```bash\nnotifier discord \"Hello World\" https://discord.com/api/webhooks/XXXXXXXXX/XXXXXXXXX\nnotifier slack \"Hello World\" https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXX\n```\n\nYou can use only channel\n\n```bash\nnotifier discord \"Hello World\" XXXXXXXXX/XXXXXXXXX\nnotifier slack \"Hello World\" XXXXXXXXX/XXXXXXXXX/XXXXXXXXX\n```\n\n### With `.env` file\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e Available only if you install from source.\n\n```bash\ncp .env.example .env\n```\n\nAdd your Discord and Slack webhooks, you can leave it blank.\n\n```yaml\nDISCORD_WEBHOOK=XXXXXXXXX/XXXXXXXXX\nSLACK_WEBHOOK=XXXXXXXXX/XXXXXXXXX/XXXXXXXXX\n```\n\nSend a message to Discord or Slack, with `.env` file.\n\n\u003e [!NOTE]\n\u003e\n\u003e If you use `.env` file, you can omit the webhook argument, it will be automatically used.\n\n```bash\nnotifier discord \"Hello World\"\nnotifier slack \"Hello World\"\n```\n\n## Usage (library)\n\nYou have to import `notify` package.\n\n```go\nimport \"github.com/ewilan-riviere/notifier/notify\"\n\nfunc main() {\n  notify.Notifier(\"To discord\", \"https://discord.com/api/webhooks/XXXXXXXXX/XXXXXXXXX\")\n\tnotify.Notifier(\"To slack\", \"https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXX\")\n\n  // Works with channel only\n  notify.Notifier(\"To discord\", \"XXXXXXXXX/XXXXXXXXX\") // Will send to Discord\n  notify.Notifier(\"To slack\", \"XXXXXXXXX/XXXXXXXXX/XXXXXXXXX\") // Will send to Slack\n}\n```\n\n## Example with GitLab CI\n\nYou can install locally `notifier` and use it in your GitLab CI. The better solution is to use `.env` file, with installation from source. But in this example, we use webhook URL.\n\nYou can create a script, for example `notify`, on your server, on `/usr/local/bin` for example to use it everywhere.\n\n```bash\n#!/bin/bash\n\nnotifier discord \"$1\" https://discord.com/api/webhooks/XXXXXXXXX/XXXXXXXXX\nnotifier slack \"$1\" https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXX\n```\n\nAllow execution of this script.\n\n```bash\nchmod +x /usr/local/bin/notify\n```\n\nUse it in your GitLab CI, without `.env` file and hidden credentials.\n\n```yaml\nstages:\n  - deploy\n\ndeploy-job:\n  stage: deploy\n  image: alpine:latest\n  script:\n    - notify '$CI_PROJECT_TITLE deployed'\n  only:\n    - main\n```\n\n## Test\n\nTo locally test\n\n```bash\ngo build -o notifier \u0026\u0026 ./notifier\n```\n\nExecute tests\n\n```bash\ngo test ./pkg/... -coverprofile=coverage.out\ngo test -v ./...\ngo test -v ./pkg/webhook\n```\n\n## License\n\n[MIT](LICENSE) © Ewilan Rivière\n\n[go-version-src]: https://img.shields.io/static/v1?style=flat\u0026label=Go\u0026message=v1.21\u0026color=00ADD8\u0026logo=go\u0026logoColor=ffffff\u0026labelColor=18181b\n[go-version-href]: https://go.dev/\n[tests-src]: https://img.shields.io/github/actions/workflow/status/ewilan-riviere/notifier/run-tests.yml?branch=main\u0026label=tests\u0026style=flat\u0026colorA=18181B\n[tests-href]: https://packagist.org/packages/ewilan-riviere/notifier\n[license-src]: https://img.shields.io/github/license/ewilan-riviere/notifier.svg?style=flat\u0026colorA=18181B\u0026colorB=00ADD8\n[license-href]: https://github.com/ewilan-riviere/notifier/blob/main/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewilan-riviere%2Fnotifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fewilan-riviere%2Fnotifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewilan-riviere%2Fnotifier/lists"}