
Mission 4 of 6
Build a daily radar for breakout GitHub repos.
Spot repos gaining stars faster than their size justifies. You'll build a script that scores them every day and posts the top ten to Telegram.
What you'll do
Create a read-only GitHub token and choose the topics to watch, with every secret kept in .env.
Run radar.py to store a daily star count for every repo it finds in your topics.
Rank the day's movers, send the top ten to Telegram, and run the whole thing every morning.
- A complete data product in two files
- The poll, snapshot, diff, score, notify pattern you can reuse on any dataset
- Python 3.10+ and
pip install requests python-dotenv - A GitHub account (free) to create a token
- A Telegram account for the digest. AI Telegram bot step 1 shows how to get a bot token and your chat ID in five minutes. Email works too; step 4 covers it
- A machine that's on at 07:30, or a cheap VPS (self-host on a VPS has the setup)
Your progress0/5
Token, topics and .env
Authenticated requests get 30 searches a minute instead of 10, and the token never touches the code.
Your GitHub token
Go to GitHub, Settings, Developer settings, Personal access tokens, and create a fine-grained token with Public repositories (read-only) access and no other permissions.
That's all the radar needs: it reads public data. Set an expiry (90 days is sensible; you'll rotate it). Copy it once; GitHub won't show it again.
Where the secrets live
Make a folder
radar, and inside it a.envfile:.envGITHUB_TOKEN=ghp_your_fine_grained_or_classic_token TELEGRAM_BOT_TOKEN=123456:ABC... TELEGRAM_CHAT_ID=123456789 TOPICS=llm,ai-agents,mcp,local-llm,ragTOPICSis the list of GitHub topics to watch. Topics are the tags repo owners add (topic:mcpin GitHub search). Pick three to six.Too many and you hit the search rate limit; too few and you miss things. Browse github.com/topics ↗ to find the exact spellings;
ai-agentsandagentsare different topics.
Keep the token out of git
The token in a public repo is the classic mistake; finding leaked secrets is the mission for when it's already happened.
Before you do anything else, in the radar folder, install the two libraries and add
.envandradar.sqliteto.gitignore:Terminal, in the radar folderpip install requests python-dotenv echo .env >> .gitignore echo radar.sqlite >> .gitignoreTipTest the token before writing any code:curl -H "Authorization: Bearer ghp_..." https://api.github.com/rate_limit. You should see"limit": 5000undercoreand30undersearch. Unauthenticated you'd see 60 and 10.
.env has four lines, .gitignore lists it, and the rate_limit call shows 5000.If it breaksThe rate_limit call shows 60, not 5000 + 1 more
The rate_limit call shows 60, not 5000
Bearer, not token (both work, but a typo in either fails silently). Fine-grained tokens start github_pat_, classic ones ghp_.I don't know my Telegram chat ID
https://api.telegram.org/bot<TOKEN>/getUpdates in a browser. Your chat ID is in message.chat.id. Leave the two Telegram lines blank for now if you'd rather; the digest will print instead of send.