Skip to content

AutoGeoAI4Sci/Tool_X-feed-tool

 
 

Repository files navigation

🐦 X Feed Tool

Stop doom-scrolling. Start building your audience.

An open-source tool that finds high-engagement tweets from accounts you follow, generates AI comments in your voice, and serves them in a clean daily dashboard — so you spend 2 minutes publishing instead of 2 hours hunting.

Built by a Geography PhD who got tired of internship rejections and decided to build in public instead.

X Feed Workflow


The Problem

Growing on X requires consistent engagement. But:

  • Finding the right tweets to comment on takes forever
  • Writing thoughtful replies every day is exhausting
  • Most people give up after a week

The Solution

Every morning at 9am, this tool:

  1. Scans ~20 accounts from your follow list
  2. Surfaces the top posts by engagement (last 72h, 50+ likes)
  3. Generates two AI comments per post — one for Quote Tweet, one for Reply
  4. Opens a dashboard in your browser so you can review and publish in minutes

Demo

Pending Feed Done
Tweet + 2 AI comments + Copy buttons Greyed out, with Undo

Each card gives you:

  • 🔁 Quote Tweet comment — standalone, adds your perspective
  • 💬 Reply comment — conversational, addresses the author directly
  • One-click copy → paste on X → done

Quick Start

Prerequisites

Install

git clone https://github.com/yourname/x-feed-tool
cd x-feed-tool
pip install -r requirements.txt

Configure

# Edit config.py
CLAUDE_API_KEY = "sk-ant-..."
APIFY_API_KEY  = "apify_api_..."

Add accounts to track

Edit accounts.txt — one username per line:

levelsio
andrewchen
zarazhangrui

Run

python runner.py   # fetch + generate comments
python app.py      # start dashboard at localhost:5000

Automation (Windows)

Set it and forget it — runs every morning at 9am:

schtasks /create /tn "XFeedDaily" /tr "C:\path\to\run_daily.bat" /sc daily /st 09:00 /f

When done, it auto-opens your browser and sends a Windows notification.


How the Rotation Works

59 accounts is too many to check daily (API costs add up). So the tool splits your list into 3 groups and rotates:

Day 1 → Group A (~20 accounts)
Day 2 → Group B (~20 accounts)
Day 3 → Group C (~20 accounts)
Day 4 → Group A again...

Every account gets checked every 3 days. API usage stays low.


Cost

Service Plan Monthly
Apify Starter $29
Claude API Pay-per-use ~$1–3
Total ~$30–32

Less than a Netflix subscription for a tool that compounds your audience growth daily.


Project Structure

x-feed-tool/
├── config.py            API keys + settings
├── accounts.txt         Who to track
├── scraper.py           Apify → fetch tweets
├── generator.py         Claude → generate comments
├── runner.py            Daily job orchestrator
├── app.py               Flask dashboard
├── regen_comments.py    Regenerate comments without re-fetching
├── run_daily.bat        Windows Task Scheduler entry point
├── templates/
│   └── index.html
└── data/
    ├── daily.json           Today's posts + comments
    └── rotation_state.json  Tracks current rotation group

Configuration

Setting Default Description
ENGAGEMENT_THRESHOLD 50 Min likes to surface a post
TOP_N_POSTS 10 Max posts per day
YOUR_PERSONA Your background, fed to Claude to match your voice

The persona is the most important setting. The more specific you are about who you are and what you're building, the better the comments.


Roadmap

  • Email/Telegram notification option
  • Web UI to edit comments inline before copying
  • One-click regenerate for individual comments
  • Character counter (X's 280 limit)
  • Mobile-responsive UI

PRs welcome.


Built With


License

MIT — use it, fork it, ship it.


If this saves you time, star it ⭐ and tell me what you built with it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 50.8%
  • HTML 49.0%
  • Batchfile 0.2%