A modular notification plugin for the Ignite CLI and Cosmos SDK ecosystem. It allows you to subscribe to blockchain events from a local node and receive real-time notifications via multiple channels (stdout, Slack, Telegram, ...).
- Subscribe to Tendermint/Cosmos events via custom queries
- Multiple notification sinks: stdout, Slack, Telegram (extensible)
- YAML-based persistent configuration
- Automatic WebSocket reconnection
- Command-line management: add, list, remove, run subscriptions
- Modular internal architecture: config, runner, sink, subscriber
- Test coverage for all major components
- cmd/: CLI entrypoints (
add,list,remove,run,autorun) - internal/config: YAML config management and subscription struct
- internal/sink: Sink interface and implementations (stdout, Slack, Telegram)
- internal/subscriber: WebSocket subscription logic, sink dispatch
- internal/runner: Orchestrates subscriptions and manages lifecycle
git clone https://github.com/your-org/ignite-notify.git
cd ignite-notify
go build -o ignite-notify
ignite-notify add --name mysub --node ws://localhost:26657 --query "tm.event EXISTS" --sink slack --webhook https://hooks.slack.com/services/XXXExample (Telegram):
ignite-notify add --name mytelegram --node ws://localhost:26657 --query "tm.event EXISTS" --sink telegram --webhook "https://api.telegram.org/bot<token>/sendMessage?chat_id=<chat_id>"ignite-notify ls
ignite-notify rm --name mysub
ignite-notify run
Subscriptions are stored in ~/.ignite/notify.yaml as a list of objects:
- name: mysub
node: ws://localhost:26657
query: tm.event EXISTS
sink: slack
webhook: https://hooks.slack.com/services/XXX- sink: One of
stdout,slack,telegram(extensible) - webhook: For Slack, use the webhook URL. For Telegram, use the full Bot API URL with token and chat_id.
- Add new sinks by implementing the
Sinkinterface ininternal/sink/sink.go. - Add new commands or flags in
cmd/and register them inapp.go.
- Make sure you have updated the plugin dispatcher in
app.goto handle bothaddandignite add(and same for other commands). - Uninstall and reinstall the plugin:
ignite app uninstall -g /home/nova/Documents/projects/Ignite/ignite-notify ignite app install -g /home/nova/Documents/projects/Ignite/ignite-notify
- If the problem persists, check that you are running the latest code and that the app is properly registered.
All code is modular and covered by unit tests. Test files are present in each major package (cmd/, internal/config/, internal/sink/, internal/runner/).
Run all tests:
go test ./...
To receive notifications on Telegram, create a bot and use the following API URL as webhook:
https://api.telegram.org/bot<YOUR_TOKEN>/sendMessage?chat_id=<YOUR_CHAT_ID>
- Add more sinks (Discord, email, ...)
- Improve error handling and reconnection strategies
- Add integration tests and CLI e2e tests
- Document advanced event queries
MIT