"Why tweet about your code when your code can tweet about itself?" - Probably some philosopher
Meet your new digital hype person! This bot stalks your GitHub activity like an overly enthusiastic mom at a soccer game, then uses AI to craft tweets that make your coding sessions sound way cooler than they actually were.
Before Tweeter Bot:
- You: pushes 3 commits fixing typos
- Twitter: crickets
After Tweeter Bot:
- You: pushes 3 commits fixing typos
- Bot: "Just shipped some elegant optimizations to enhance code readability and maintainability! 🚀 Sometimes the smallest changes make the biggest impact #coding #dev #craftsmanship"
- 🕵️ GitHub Stalker Mode: Automatically watches your every commit (in a totally non-creepy way)
- 🧠 AI Ghostwriter: Uses Google's Gemini to make your
fix: typocommits sound like you just solved world hunger - ⏰ Scheduled Narcissism: Posts daily at 7 PM UTC because that's prime "look how productive I am" hours
- 🎪 Fallback Humility: If you didn't code today, it'll tweet something relatable about taking breaks (we see you, Netflix binger)
- 🤖 Zero Effort Required: Because who has time to manually brag about their code?
- A GitHub account (obviously)
- A Twitter account (preferably one your employer follows)
- Google Gemini API key (because we're fancy like that)
- The ability to follow instructions (surprisingly rare)
Twitter API (The hard part):
- Go to Twitter Developer Portal
- Apply for developer access
- Wait 3-5 business years for approval
- Sacrifice a rubber duck to the API gods
- Get your keys (finally!)
Google Gemini API (The easy part):
- Visit Google AI Studio
- Click the big obvious button
- Copy the key
- Feel smart for 2 seconds
GitHub Token (The "why do I need another token?" part):
- Go to GitHub Settings → Developer settings → Personal access tokens
- Create a new token with
public_repoaccess - Name it something creative like "tweet-bot-supreme"
- Store it somewhere safe (not in another repo, genius)
In your GitHub repo, go to:
Settings → Secrets and variables → Actions → New repository secret
Add these secrets (spell them exactly like this, the bot is picky):
TWITTER_CONSUMER_KEYTWITTER_CONSUMER_SECRETTWITTER_ACCESS_TOKENTWITTER_ACCESS_TOKEN_SECRETGEMINI_API_KEYTOKEN(your GitHub token)
The bot runs every day at 7 PM UTC. If you want to test it immediately (because patience is overrated), go to:
Actions → Daily Tweet from GitHub Activity → Run workflow
- Stalking Phase: Bot checks your GitHub activity for the day
- Analysis Phase: Finds all your commits, PRs, and other productive-looking activities
- Creative Writing Phase: Feeds your boring commit messages to AI
- Ego Boosting Phase: AI transforms "fixed bug" into "implemented elegant solution to enhance user experience"
- Publishing Phase: Posts tweet and makes you look like a coding rockstar
Your commit: fix: remove console.log
Bot's tweet: "Today's focus: cleaning up debug artifacts and optimizing the development workflow! 🧹✨ Sometimes the best code is the code you remove #cleancoding #optimization #developer"
Your activity: No commits today
Bot's tweet: "Taking a strategic pause today to let the creative juices recharge! 🔋 Tomorrow's breakthroughs need today's reflection #mindfulness #developer #planning"
"It's not tweeting!"
- Check if your API keys are correct (they probably aren't)
- Make sure you spelled the secret names right (case sensitive, because computers are mean)
- Verify your Twitter app has write permissions (read-only is for quitters)
"It's tweeting weird stuff!"
- That's the AI being creative! Embrace the chaos
- Or adjust the prompt in
main.pyif you're boring
"It tweeted about my 3 AM debugging session!"
- That's... actually pretty accurate
- Maybe commit less embarrassing messages?
Found a bug? Want to add features? Think the AI needs more personality?
PRs welcome! Just remember:
- Keep it fun
- Keep it functional
- Keep it from becoming sentient
MIT License - Use it, abuse it, improve it, just don't blame us when your bot starts subtweeting your coworkers.
This bot may:
- Make your GitHub activity look more impressive than it is
- Cause coworkers to think you're a productivity machine
- Lead to unrealistic expectations about your coding abilities
- Become your most consistent social media presence
Use responsibly. Side effects may include increased follower count, imposter syndrome, and the occasional existential crisis about automation replacing human creativity.
Built with ❤️, ☕, and an unhealthy amount of automation
Remember: If your bot starts tweeting better content than you do manually, that's not a bug – it's a feature! 🎉