Build a GitHub trending bot for X
rising repos, releases, launches
A 30-line script finds the fastest-rising new repos and posts them as a daily thread. The RSS connector tweets releases from any repo's Atom feed. No X developer account, no per-post billing.
Card required, cancel any time.
The short answer
GitHub has no official trending API. Use the search API instead: GET /search/repositories?q=created:>DATE stars:>50&sort=stars&order=desc returns the most-starred new repos. Post the top five once a day to POST https://opentweet.io/api/v1/posts as a thread. For releases, add https://github.com/OWNER/REPO/releases.atom to the OpenTweet RSS connector and every new version becomes a post.
Six post types for a dev account
Lists of links are everywhere. Accounts that grow add one honest sentence about what the project does and who should care.
Daily rising repos
ScheduledThe top five new repos by stars, as one thread. The post your followers come back for each morning.
Releases
Event-drivenA version ships in a repo you follow. One line on what changed, from the release Atom feed.
Language picks
ScheduledThe best new Rust, Go or Python project of the week. Same query, with language:rust added.
Star milestones
Event-drivenA repo crosses 1k or 10k stars. Your script compares today's count with yesterday's.
Launch notes
Event-drivenShow HN and Product Hunt dev launches with a public repo. Link once, describe in your own words.
Weekly recap
ScheduledThe week's biggest risers and what they have in common. One thread with your take.
The daily thread from the search API
github.com/trending ranks by stars gained today and has no API. The search API ranks by total stars, so filter to repos created in the last week: what rises to the top is new work that took off.
The GitHub query
# The most-starred repos created in the last 7 days
curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
"https://api.github.com/search/repositories?q=created:>2026-10-15+stars:>50&sort=stars&order=desc&per_page=10"The whole bot in Python
Run it once a day with cron or a scheduled GitHub Action. It remembers what it posted, so a repo that stays on top all week appears once. Repo names go in as owner/repo with no URL, and the thread carries one link, so it counts as one link post (as long as no description contains a domain like example.dev, which also counts as a link).
import datetime, json, pathlib, requests
OT_KEY = "ot_your_key"
GH_TOKEN = "github_pat_..." # no scopes needed
POSTED = pathlib.Path("posted.json") # repos we already tweeted
seen = set(json.loads(POSTED.read_text())) if POSTED.exists() else set()
since = (datetime.date.today() - datetime.timedelta(days=7)).isoformat()
repos = requests.get(
"https://api.github.com/search/repositories",
params={"q": f"created:>{since} stars:>50", "sort": "stars",
"order": "desc", "per_page": 20},
headers={"Authorization": f"Bearer {GH_TOKEN}"},
).json()["items"]
top = [r for r in repos if r["full_name"] not in seen][:5]
if top:
tweets = [
f"{i}. {r['full_name']} ({r['stargazers_count']:,} ★)\n"
f"{(r['description'] or '')[:180]}"
for i, r in enumerate(top, 1)
]
tweets.append(f"Links: https://github.com/{top[0]['full_name']}")
requests.post(
"https://opentweet.io/api/v1/posts",
headers={"Authorization": f"Bearer {OT_KEY}"},
json={
"text": f"Rising on GitHub this week, {datetime.date.today():%b %d} 🧵",
"is_thread": True,
"thread_tweets": tweets,
"publish_now": True,
},
)
seen.update(r["full_name"] for r in top)
POSTED.write_text(json.dumps(sorted(seen)))Narrow the beat by adding language:rust or topic:mcp to the query. Every OpenTweet field is in the API reference.
Releases without code: the Atom feed
Every GitHub repo has a releases feed at /releases.atom, and every tag at /tags.atom. Add the feed to the RSS connector, write a prompt for the tone, and each release becomes a post in your voice.
Connectors -> New connector -> RSS
Feed URL: https://github.com/OWNER/REPO/releases.atom
Prompt: One line on what changed and who should
upgrade. Version number first. No emoji,
no "excited to announce".
Frequency: Hourly
X account: @yourdevfeed
Add one connector per repo you follow.Your own releases, from CI
Maintainers can post the moment a release is published. Store the OpenTweet key as a repo secret and add one step. The full walkthrough is in post to X from GitHub Actions.
# .github/workflows/tweet-release.yml
on:
release:
types: [published]
jobs:
tweet:
runs-on: ubuntu-latest
steps:
- run: |
curl -X POST https://opentweet.io/api/v1/posts \
-H "Authorization: Bearer ${{ secrets.OPENTWEET_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"text\": \"${{ github.event.release.name }} is out: ${{ github.event.release.html_url }}\", \"publish_now\": true}"Let an AI agent write the summaries
Repo descriptions are often empty or full of buzzwords. Connect Claude Code, Cursor or ChatGPT to the OpenTweet MCP server, give it the README, and ask for one plain sentence per repo. It drafts the thread, you approve it, it posts.
Which plan fits your account
Flat monthly price. The deciding number is how many of your posts carry a link.
| Account type | Typical volume | Plan |
|---|---|---|
| Daily thread with one link, plus a few releases | 2-10 posts a day | Pro, $19.99/mo, 20 posts a day |
| A post per repo or release, each with its link | Up to 10 link posts a day | Advanced, $29/mo, unlimited connectors |
| Several accounts by language or topic | 50+ posts a day | Agency, $49/mo, 300 posts a day |
Link posts: Pro 1 a day, Advanced 10, Agency 20, plus link credits. See pricing.
Use the API, not the trending page. Scraping github.com/trending breaks whenever the HTML changes. The search API is documented and rate limited at 30 requests a minute with a token.
Do not tag the authors. Auto-mentioning maintainers in every post is the fastest way to get an automated account limited. Let them find you.
Label it. Turn on the Automated label in your X settings. More in X automation rules.
Frequently asked questions
Does GitHub have an API for trending repositories?
No. GitHub has no official REST or GraphQL endpoint for github.com/trending, and community trending APIs come and go. The reliable substitute is the official search API: GET https://api.github.com/search/repositories with q=created:>DATE stars:>50, sort=stars and order=desc returns the most-starred new repos for any window. It ranks by total stars, not stars gained today, so it finds new projects that took off rather than old projects having a good day.
How do I make a GitHub trending bot for X?
Run a small script once a day: query the GitHub search API for repos created in the last 7 days, sorted by stars, keep the ones you have not posted before, and send them to https://opentweet.io/api/v1/posts as a thread with is_thread and thread_tweets. OpenTweet posts it to your X account, so you never create an X developer app.
How do I tweet GitHub releases automatically?
Every GitHub repo publishes an Atom feed of its releases at https://github.com/OWNER/REPO/releases.atom. Add that URL to the OpenTweet RSS connector with a prompt such as "one line on what changed, for developers", and each new release becomes a post. No code, no GitHub Action, no X developer account. If you would rather post from CI, call the API from a GitHub Actions workflow that runs on release.
Do repo links count as link posts?
Yes. A post with a URL bills $0.20 on the X API and counts toward your OpenTweet link allowance (1 a day on Pro, 10 on Advanced, 20 on Agency). In a thread, every tweet that contains a URL counts. Writing repo names as owner/repo with no URL, and linking once in the last tweet, keeps a daily thread to one link post. A bare domain such as example.dev in a description also counts as a link, so strip those.
What GitHub API rate limit applies?
The search API allows 10 requests a minute without a token and 30 a minute with one, per GitHub's docs. A daily trending bot needs a handful of calls a day, so a personal access token with no extra scopes is plenty.
Can an AI agent write the repo summaries?
Yes. Feed the repo description and README excerpt to your model and ask for one plain sentence on what it does and who it is for. Or connect Claude, ChatGPT or Cursor to the OpenTweet MCP server and let the agent draft the thread for you to approve before it posts.
Will X limit an automated dev account?
Original posts on your own timeline are fine. Turn on the Automated label in your X settings, post each repo once, write your own summary instead of pasting the description, and do not auto-tag or reply to repo authors. Mass mentions are what gets automated accounts limited.
Building a different kind of automated account? See the AI news account, the alert bot, or the Pokemon restock bot. For developers who post their own work, see OpenTweet for developers.
Everything you can build on X with OpenTweet
Post to X from your code, a watcher, or an AI agent. Start anywhere in the cluster.
OpenTweet vs the X API
Post, schedule, and automate X without a developer account or the $200/mo minimum.
X DM outreach, human-approved
Find and qualify leads, AI-draft DMs, approve each one, and drip-send from your own account via API or MCP.
Post to X without an API
The clean, account-safe way to post to X from your code or an AI agent.
Twitter MCP Server
Give Claude, Cursor, and OpenClaw the ability to post to X. 44 tools included.
Developer docs
Quickstart, API keys, MCP setup, and the REST reference for posting to X from code or an agent.
Cross-posting reference
One call posts to X, Bluesky and LinkedIn. The platforms field, per-network results, and why a network gets skipped.
Social media API for AI agents
Three ways an agent can post to X, Bluesky and LinkedIn, and the trade-offs of each.
LinkedIn MCP server
Post and schedule to a LinkedIn profile from Claude or Cursor through the official LinkedIn API.
XMCP vs OpenTweet
X's official MCP server bills per API call and cannot schedule. Compare it with the flat-fee hosted MCP.
MCP for AI agents
Connect your AI client to X in under two minutes, no X developer account.
Developer API and keys
REST endpoints, one bearer key, and usage tracking. Build on OpenTweet.
OpenTweet for AI agents
The posting layer for autonomous agents and automations that live on X.
Build an AI Twitter persona
Give your AI agent its own X account. Setup, cadence, and the rules that keep it safe.
Best MCP servers for social media
The 2026 ranked list. How the hosted OpenTweet MCP compares with the official X MCP and others.
Cheapest way to post to X via code
Flat fee vs pay-per-use. Why the $0.20 per-link fee flips the math past ~145 link posts a month.
X API pricing 2026
Every pay-per-use X API endpoint price from docs.x.com in one searchable table.
Bluesky posting API
Post and schedule to Bluesky with one REST call and OAuth, and cross-post to X and LinkedIn in the same request.
Automate LinkedIn posts
Post to LinkedIn from an AI agent, n8n or a script through the official Posts API, with one REST or MCP call.
Ship your dev feed on X today
Connect X, create a key, and tomorrow morning's rising repos go out as a thread.