Get Started
Data hustle

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.

55 minIntermediateFreeStep 1 free

What you'll do

Set up a token and topics

Create a read-only GitHub token and choose the topics to watch, with every secret kept in .env.

Poll and snapshot star counts

Run radar.py to store a daily star count for every repo it finds in your topics.

Score, post and schedule it

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
Before you start
  • 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
01/05Token, topics and .env0 done
STEP 01 of 05~8 min

Token, topics and .env

Authenticated requests get 30 searches a minute instead of 10, and the token never touches the code.

Your GitHub token

  1. 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

  1. Make a folder radar, and inside it a .env file:

    .env
    GITHUB_TOKEN=ghp_your_fine_grained_or_classic_token
    TELEGRAM_BOT_TOKEN=123456:ABC...
    TELEGRAM_CHAT_ID=123456789
    TOPICS=llm,ai-agents,mcp,local-llm,rag

    TOPICS is the list of GitHub topics to watch. Topics are the tags repo owners add (topic:mcp in 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-agents and agents are 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.

  1. Before you do anything else, in the radar folder, install the two libraries and add .env and radar.sqlite to .gitignore:

    Terminal, in the radar folder
    pip install requests python-dotenv
    echo .env >> .gitignore
    echo radar.sqlite >> .gitignore
    Tip
    Test the token before writing any code: curl -H "Authorization: Bearer ghp_..." https://api.github.com/rate_limit. You should see "limit": 5000 under core and 30 under search. Unauthenticated you'd see 60 and 10.
Checkpoint
.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
The token isn't being sent. Check for a stray space in the header and that you used 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
Message your bot once, then open 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.
Still stuck? Ask the community
Next mission · Data hustlePublic records for profit, UK edition: what's legal to sell, and one monitor that watches it
→