hourly email notifier for Cosmos SDK chain governance proposals. tracks voting_period proposals, sends a NEW alert on entry, a REMINDER if you haven't voted with less than 48h left, and a CLOSED alert (flagging missed votes) when the voting window ends. state is kept locally so you're never re-notified for the same event.
built for a Kava validator; chain-agnostic by construction, see "using on another chain" below.
- python3 (stdlib only, no pip packages required)
- the chain's daemon binary available locally, with access to a synced node's RPC endpoint
- a Gmail account with an app password (or any SMTP relay)
git clone https://github.com/jjozzietech/cosmos-gov-notifier.git cd cosmos-gov-notifier cp creds.env.example creds.env chmod 600 creds.env
edit creds.env with your SMTP and validator details (see below).
creds.env (gitignored, never commit this):
| key | meaning |
|---|---|
| SMTP_HOST / SMTP_PORT | SMTP relay, e.g. smtp.gmail.com / 587 |
| SMTP_USER / SMTP_PASS | SMTP login (Gmail: use an App Password, not your account password) |
| NOTIFY_TO | where alerts are sent |
| VALIDATOR_ADDR | your valoper address (shown in NEW proposal alerts) |
| VOTER_ADDR | your account address (used to check if you've voted) |
chain-specific constants are set directly in notifier.py near the top:
KAVA_BIN = "/home/cosmos/go/bin/kava"
NODE = "tcp://localhost:26657"
CHAIN_ID = "kava_2222-10"
python3 notifier.py
test manually first, then cron it hourly:
crontab -e
add:
0 * * * * /usr/bin/python3 /home/youruser/gov-notifier/notifier.py >> /home/youruser/gov-notifier/cron.log 2>&1
three-line change in notifier.py:
KAVA_BIN = "/path/to/your/chain-daemon"
NODE = "tcp://localhost:26657"
CHAIN_ID = "your-chain-id"
the query/vote CLI flags used (query gov proposals, query gov vote) are standard across Cosmos SDK chains using the gov module, so no other changes are typically needed. delete state.json when switching chains to avoid stale proposal IDs carrying over.
MIT, see LICENSE.