DevEcho is an AI-powered Twitter bot that transforms your Git commits into engaging social media content. Built for developers who want to #BuildInPublic without the manual overhead.
📁 How it works: Place your project in the
code/folder → DevEcho reads your Git history → AI generates tweets → Posts daily automatically
# One command to rule them all
python bot.py analyze && python bot.py post-nowStop manually tweeting. Start building.
|
|
1. Analyze your commits once → 2. AI extracts insights → 3. Smart scoring & quality control → 4. Tweet daily on autopilot
| Step | What Happens |
|---|---|
| 📁 | Copy your project to code/ folder |
| 🔍 | DevEcho reads Git commit history |
| 🤖 | AI analyzes what you built |
| 🎯 | Scores commits by impact (features, performance, etc.) |
| 💾 | Insights cached locally |
| ✅ | Quality checks + duplicate detection |
| 🐦 | Tweets posted daily (never repeats commits!) |
|
Before DevEcho: |
After DevEcho: |
| Requirement | Status | Get It |
|---|---|---|
| Python 3.8+ | 🐍 | Download |
| Twitter API | 🐦 | Get Keys |
| Groq API (Free) | 🤖 | Sign Up |
| Git Repository | 📁 | Your project |
git clone https://github.com/YOUR_USERNAME/devecho.git
cd devechopython3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtFollow these steps carefully to get your Twitter API keys:
- Go to Twitter Developer Portal
- Sign in with your Twitter account
- Apply for a developer account (usually approved instantly for basic access)
- Click "+ Create Project"
- Enter project name (e.g., "Build in Public Bot")
- Select use case: "Making a bot"
- Enter project description
- Create an App within the project
- Go to your App Settings
- Click "User authentication settings" → "Set up"
- Configure as follows:
- App permissions: Select "Read and Write" (CRITICAL!)
- Type of App: Select "Web App, Automated App or Bot"
- Callback URI: Enter
http://localhost:3000(required but not used) - Website URL: Enter your GitHub repo URL
- Click "Save"
- Go to "Keys and tokens" tab
- API Key and Secret (Consumer Keys):
- Click "Regenerate" if already generated
- Copy both and save securely
- Bearer Token:
- Click "Regenerate" if needed
- Copy and save
- Access Token and Secret:
- Click "Generate" (MUST do this AFTER setting Read and Write permissions!)
- Copy both and save securely
- Make sure Access Token shows "Read and Write" permissions
- If it says "Read-only", you need to:
- Delete the current Access Token
- Set permissions to "Read and Write" in User authentication settings
- Generate new Access Token and Secret
- Keep all keys private and secure
- Never commit them to Git (use .env file)
- Bearer Token is optional but recommended
- Access Token must be generated AFTER setting Read and Write permissions
Copy the example environment file and add your credentials:
TWITTER_API_KEY=your_api_key_here
TWITTER_API_SECRET=your_api_secret_here
TWITTER_ACCESS_TOKEN=your_access_token_here
TWITTER_ACCESS_TOKEN_SECRET=your_access_token_secret_here
TWITTER_BEARER_TOKEN=your_bearer_token_here
GROQ_API_KEY=your_groq_api_key_here
# Schedule time (24-hour format, e.g., 10:00, 14:30)
TWEET_TIME=10:00Simply copy your entire project to the code/ folder:
# Example: Copy your project
cp -r ~/your-awesome-project/* code/The bot works with ANY programming language:
- ✅ Java (Spring Boot, Maven, Gradle)
- ✅ Python (Django, Flask, FastAPI)
- ✅ JavaScript/TypeScript (React, Node.js, Next.js)
- ✅ Go, Rust, C++, and more!
Important: The bot analyzes Git commit history, so make sure your project is a Git repository.
Before posting tweets, analyze your codebase once to avoid rate limits:
python bot.py analyzeThis command will:
- ✅ Analyze all commits using LLM for rich insights
- ✅ Cache everything in
commit_insights.json - ✅ Take 2-3 minutes (with 2-second delays between commits)
- ✅ Prevent rate limit errors when posting tweets
You only need to run this once or when you want to refresh the knowledge base with new commits.
Before running it live, test tweet generation:
python bot.py testThis will generate a tweet from your first commit without posting it (uses cached knowledge base).
python bot.py post-nowYour first tweet is now live! 🎉
For ultimate convenience, use these clickable files - no terminal required!
Double-click: post-tweet.command
- Generates and posts a tweet immediately
- Shows progress in a terminal window
- Auto-activates virtual environment
- Press Enter to close when done
Double-click: test-tweet.command
- Generates a preview tweet without posting
- Perfect for checking quality before going live
- Shows the tweet in terminal
- Press Enter to close when done
- Right-click the
.commandfile - Select "Open"
- Click "Open" in the security dialog
- After this, double-clicking will work normally
💡 Pro Tip: Add these to your Dock for instant access!
# Build knowledge base (run once, first time only)
python bot.py analyze
# Test tweet generation (without posting)
python bot.py test
# Post a tweet immediately
python bot.py post-now
# View codebase statistics
python bot.py overview
# List all commits chronologically
python bot.py commits
# Run bot with daily scheduler
python bot.pyAfter the improvements, you'll see detailed information:
# Before (Old System):
Generating tweet for commit: Initial commit...
# After (New System with Smart Features):
Loaded 7 previously tweeted commits # Tracking works!
Trying commit (score: 2.10): Implemented EventResponse dto # Smart scoring!
LLM generated tweet (quality: 0.85): Eventara: Built robust DTOs... # Quality control!Key Metrics:
- Commit Scores: 2.0+ (Excellent) → 1.5-2.0 (Good) → 1.0-1.5 (Decent) → 0.5-1.0 (Low)
- Tweet Quality: 0.8-1.0 (Excellent) → 0.6-0.8 (Good) → Below 0.6 (Auto-retry)
- Commit Hash Tracking: Never tweets the same commit twice
- Semantic Similarity: Detects similar tweets with 65% threshold
- Persistent Memory: Remembers all previous tweets across restarts
Commits are automatically scored based on impact:
- +1.0 - Has LLM insights
- +0.4 - Feature implementation
- +0.3 - Performance optimization
- +0.2 - Bug fix or refactor
- -0.3 - Documentation (de-prioritized)
- +0.3 - Optimal file count (2-10 files)
- +0.2 - Multiple technologies used
- -0.3 - Generic commit messages ("update", "wip", "merge")
Result: The bot tweets your most impactful work first!
Every generated tweet is scored on:
- ✓ Project name included
- ✓ #BuildInPublic hashtag present
- ✓ GitHub link added
- ✓ Technical specifics (bullets, numbers)
- ✓ Minimum 100 characters
- ✓ Not too generic
Minimum Score: 0.6/1.0 (auto-retries up to 3 times if below)
# Build knowledge base (run once, first time only)
python bot.py analyze
# Test tweet generation (without posting)
### Run the Bot (Scheduled Mode)
Start the bot to post tweets daily at the scheduled time:
```bash
python bot.pyThe bot will run continuously and post once per day at the time specified in your .env file.
To post a tweet right now:
python bot.py post-nowSee statistics about your codebase:
python bot.py overviewGenerate a test tweet without posting:
python bot.py testdevecho/
├── bot.py # Main bot orchestrator
├── universal_code_analyzer.py # Multi-language code analysis
├── llm_tweet_generator.py # AI-powered tweet generation
├── post-tweet.command # 🖱️ One-click tweet poster (macOS)
├── test-tweet.command # 🧪 One-click tweet tester (macOS)
├── requirements.txt # Python dependencies
├── .env # Your API credentials (create from .env.example)
├── .env.example # Example configuration template
├── .gitignore # Git ignore rules
├── commit_insights.json # Cached LLM analysis (auto-generated)
├── posted_tweets.json # Posted tweet tracker (auto-generated)
├── bot.log # Bot execution logs (auto-generated)
├── code/ # Your project folder to analyze
│ └── (your project files)
└── README.md # Documentation
The bot creates engaging tweets by:
- Analyzing Commits - Extracts what was built, tech used, and impact
- LLM Deep Analysis - Uses Groq's Llama 3.3 70B to understand code context
- Caching Insights - Stores analysis once to avoid rate limits
- Chronological Order - Tweets follow your actual development timeline
- Smart Generation - Creates human-like tweets with hashtags and links
[Project Name]: [Hook/Opening]
[What was built] [Technical detail]
[Impact/Why it matters]
#BuildInPublic #RelevantTech
[GitHub Link]
Edit the TWEET_TIME in your .env file:
TWEET_TIME=14:30 # Posts at 2:30 PM dailyWhen you have new commits:
python bot.py analyze # Re-analyze with new commitsModify the TWEET_TIME in your .env file to change when tweets are posted.
You can also adjust tweet generation strategy by modifying the probabilities in bot.py generate_tweet() method:
# Strategy 1: File analysis (70% of the time)
if random.random() < 0.7:
# ...All posted tweets are saved in posted_tweets.json with:
- Tweet text
- Metadata (type, file, feature, etc.)
- Timestamp
This prevents duplicate posts and helps you track your progress.
- Double-check your API credentials in
.env - Ensure your Twitter app has "Read and Write" permissions
- Regenerate tokens if needed
- Make sure you have
.pyfiles in thecode/folder - Check that the folder path is correct
- You may have posted about all available content
- Add more code to the
code/folder - Clear
posted_tweets.jsonto reset (warning: will allow reposts)
- Ensure the bot is running continuously
- Check that
TWEET_TIMEis in correct 24-hour format (HH:MM) - Review
bot.logfor error messages
For continuous operation, consider:
- Using a Process Manager (e.g., systemd, pm2, supervisor)
- Hosting on a VPS (e.g., DigitalOcean, Linode, AWS EC2)
- Using Docker for containerized deployment
- Setting up monitoring to ensure the bot stays running
Example with systemd on Linux:
# Create service file: /etc/systemd/system/twitter-bot.service
[Unit]
Description=Twitter Build in Public Bot
After=network.target
[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/twitter-bot
ExecStart=/usr/bin/python3 /path/to/twitter-bot/bot.py
Restart=always
[Install]
WantedBy=multi-user.target- Rate Limits: Twitter has rate limits. The bot uses
wait_on_rate_limit=Trueto handle this automatically. - API Costs: Twitter API v2 Free tier allows 1,500 tweets per month (about 50 per day).
- Content Policy: Ensure your tweets follow Twitter's Automation Rules.
- Privacy: Don't commit your
.envfile with real credentials to version control!
This project is open source and available for personal and commercial use.
Feel free to fork, modify, and improve this bot! Some ideas:
- Support for other programming languages
- Integration with other platforms (LinkedIn, Mastodon)
- More sophisticated tweet templates
- AI-powered tweet generation
- Analytics dashboard
- Be Authentic - Share real progress, challenges, and wins
- Engage - Reply to comments and join conversations
- Be Consistent - Daily posts build momentum
- Add Value - Share insights that help others
- Use Hashtags - #BuildInPublic, #100DaysOfCode, #IndieDev
Happy Building! 🚀
If you find this bot useful, give it a star ⭐ and share it with other developers!