{"id":51315997,"url":"https://github.com/serajhqi/notifyre","last_synced_at":"2026-07-01T07:04:04.758Z","repository":{"id":364922621,"uuid":"1269749317","full_name":"serajhqi/notifyre","owner":"serajhqi","description":"A lightweight Go service that forwards authenticated HTTP requests to Telegram, with optional SOCKS5 proxy support and CLI integration helpers.","archived":false,"fork":false,"pushed_at":"2026-06-15T04:20:35.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T06:16:46.848Z","etag":null,"topics":["notifications","telegram"],"latest_commit_sha":null,"homepage":"","language":"Go","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/serajhqi.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-15T04:08:14.000Z","updated_at":"2026-06-15T04:20:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/serajhqi/notifyre","commit_stats":null,"previous_names":["serajhqi/notifyre"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/serajhqi/notifyre","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serajhqi%2Fnotifyre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serajhqi%2Fnotifyre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serajhqi%2Fnotifyre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serajhqi%2Fnotifyre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serajhqi","download_url":"https://codeload.github.com/serajhqi/notifyre/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serajhqi%2Fnotifyre/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34996291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["notifications","telegram"],"created_at":"2026-07-01T07:04:03.969Z","updated_at":"2026-07-01T07:04:04.748Z","avatar_url":"https://github.com/serajhqi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# notifyre\n\nA lightweight Go service that forwards authenticated HTTP requests to Telegram, with optional SOCKS5 proxy support and CLI integration helpers.\n\n## Features\n\n- **HTTP API** — POST `/send` with JSON payload to send notifications\n- **API Key Authentication** — YAML-based key store with labels\n- **Message Formatting** — Optional emojis and titles\n- **Parse Modes** — HTML and MarkdownV2 support\n- **SOCKS5 Proxy** — Optional proxy routing for Telegram API calls\n- **CLI Client** — `notifyre send` command for shell scripts\n- **Code Snippets** — Generate ready-to-paste integration code (Go, Node, Python, Bash, cURL)\n\n## Quick Start\n\n### Prerequisites\n\n- Go 1.26.3+\n- Telegram bot token from [@BotFather](https://t.me/BotFather)\n- Target Telegram channel (username like `@mychannel` or numeric ID like `-100123456789`)\n\n### Setup\n\n1. **Clone and build:**\n\n```bash\ngit clone https://github.com/serajhqi/notifyre.git\ncd notifyre\ngo build -o notifyre ./cmd/notifyre/\n```\n\n2. **Create keys file** (copy from template):\n\n```bash\ncp keys.yaml.example keys.yaml\n```\n\nEdit `keys.yaml` with your API keys:\n\n```yaml\nkeys:\n  - key: \"your-secret-key-1\"\n    label: \"ci-pipeline\"\n  - key: \"your-secret-key-2\"\n    label: \"backup-job\"\n```\n\n3. **Start the server:**\n\n```bash\nexport BOT_TOKEN=\"your-telegram-bot-token\"\nexport CHANNEL=\"@your-channel\"\nexport KEYS_FILE=\"./keys.yaml\"\n./notifyre serve\n```\n\nServer listens on `http://localhost:8080` by default.\n\n## Usage\n\n### HTTP API\n\nSend a notification:\n\n```bash\ncurl -X POST http://localhost:8080/send \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-API-Key: your-secret-key-1\" \\\n  -d '{\n    \"message\": \"Build succeeded\",\n    \"title\": \"CI Pipeline\",\n    \"level\": \"success\",\n    \"parse_mode\": \"HTML\"\n  }'\n```\n\n**Request body:**\n\n| Field | Required | Values |\n|-------|----------|--------|\n| `message` | yes | Notification text |\n| `title` | no | Short label (prepended with emoji if level set) |\n| `level` | no | `info` (ℹ️), `success` (✅), `warning` (⚠️), `error` (❌) |\n| `parse_mode` | no | `HTML` or `MarkdownV2` |\n| `disable_notification` | no | `true` to send silently |\n\n**Response:**\n\n- `200 OK`: `{\"ok\": true}`\n- `400 Bad Request`: `{\"ok\": false, \"error\": \"...\"}`\n- `401 Unauthorized`: `{\"ok\": false, \"error\": \"invalid api key\"}`\n- `502 Bad Gateway`: `{\"ok\": false, \"error\": \"telegram error: ...\"}`\n\n### CLI Client\n\nSend notifications from shell:\n\n```bash\n./notifyre send \\\n  --url http://localhost:8080 \\\n  --key your-secret-key-1 \\\n  --message \"Backup complete\" \\\n  --title \"Backup Job\" \\\n  --level success\n```\n\nAll flags except `--url`, `--key`, and `--message` are optional.\n\n### Code Snippets\n\nGenerate integration code for your language:\n\n```bash\n./notifyre snippet --lang go --url http://localhost:8080 --key your-secret-key-1\n./notifyre snippet --lang python --url http://localhost:8080 --key your-secret-key-1\n./notifyre snippet --lang bash --url http://localhost:8080 --key your-secret-key-1\n./notifyre snippet --lang node --url http://localhost:8080 --key your-secret-key-1\n./notifyre snippet --lang curl --url http://localhost:8080 --key your-secret-key-1\n```\n\nCopy the output directly into your project.\n\n## Configuration\n\nAll configuration via environment variables:\n\n| Variable | Required | Default | Notes |\n|----------|----------|---------|-------|\n| `BOT_TOKEN` | yes | — | Telegram bot token from @BotFather |\n| `CHANNEL` | yes | — | Target channel: `@username` or `-100...` (numeric ID) |\n| `KEYS_FILE` | yes | — | Path to YAML keys file |\n| `PORT` | no | `8080` | HTTP server listen port |\n| `PROXY_ADDR` | no | — | SOCKS5 proxy (e.g., `socks5://user:pass@host:1080`) |\n\n### Docker\n\nBuild and run with Docker:\n\n```bash\ndocker build -t notifyre .\ndocker run -e BOT_TOKEN=... -e CHANNEL=... -e KEYS_FILE=/keys/keys.yaml \\\n  -v ./keys.yaml:/keys/keys.yaml \\\n  -p 8080:8080 \\\n  notifyre serve\n```\n\nOr use `docker-compose`:\n\n```bash\ndocker-compose up\n```\n\n(Edit `.env` for BOT_TOKEN and CHANNEL before running.)\n\n## Project Structure\n\n```\nnotifyre/\n├── cmd/notifyre/              # CLI commands (package main)\n│   ├── main.go                # Cobra root command\n│   ├── serve.go               # HTTP server subcommand\n│   ├── send.go                # CLI send subcommand\n│   ├── snippet.go             # Snippet generator\n│   └── serve_test.go          # Server handler tests\n├── internal/\n│   ├── config/                # Configuration loading\n│   │   ├── config.go\n│   │   └── config_test.go\n│   ├── keys/                  # API key store\n│   │   ├── keys.go\n│   │   └── keys_test.go\n│   └── telegram/              # Telegram client\n│       ├── telegram.go        # Client, SendRequest, RenderMessage\n│       └── telegram_test.go\n├── go.mod / go.sum            # Go dependencies\n├── CLAUDE.md                  # Development guide\n├── Dockerfile / docker-compose.yml\n├── keys.yaml.example          # Keys template\n└── README.md\n```\n\n## Development\n\n### Build\n\n```bash\ngo build -o notifyre ./cmd/notifyre/\n```\n\n### Test\n\n```bash\n# All tests\ngo test ./...\n\n# Specific package\ngo test ./internal/telegram -v\ngo test ./cmd/notifyre -v\n\n# Specific test\ngo test -run TestRenderMessage ./internal/telegram\n```\n\n### Lint\n\n```bash\ngo vet ./...\n```\n\n## Message Rendering\n\nOutput format depends on `level` and `title`:\n\n| `level` | `title` | Output |\n|---------|---------|--------|\n| ✅ | ✅ | `✅ Title\\nMessage` |\n| ✅ | ❌ | `✅ Message` |\n| ❌ | ✅ | `Title\\nMessage` |\n| ❌ | ❌ | `Message` |\n\nExamples:\n\n```\n// Both set\nPOST /send with level=\"success\", title=\"CI\", message=\"Build done\"\n→ Telegram receives: \"✅ CI\\nBuild done\"\n\n// Level only\nPOST /send with level=\"error\", message=\"Connection timeout\"\n→ Telegram receives: \"❌ Connection timeout\"\n\n// Title only\nPOST /send with title=\"Backup\", message=\"3 GB uploaded\"\n→ Telegram receives: \"Backup\\n3 GB uploaded\"\n\n// Neither\nPOST /send with message=\"Job complete\"\n→ Telegram receives: \"Job complete\"\n```\n\n## Dependencies\n\n- `github.com/spf13/cobra` — CLI framework\n- `golang.org/x/net/proxy` — SOCKS5 dialer\n- `gopkg.in/yaml.v3` — YAML parsing\n- stdlib `net/http` — HTTP server and client\n\n## License\n\nMIT\n\n## Contributing\n\nImprovements welcome! Please ensure:\n- All tests pass: `go test ./...`\n- Code is formatted: `gofmt -w .`\n- Linting passes: `go vet ./...`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserajhqi%2Fnotifyre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserajhqi%2Fnotifyre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserajhqi%2Fnotifyre/lists"}