π€ AI-powered Twitter automation system with persona-driven content generation and intelligent engagement.
- β Automated Tweet Posting - Schedule and post original tweets automatically
- β URL Tracking - Capture and record tweet URLs for analytics
- β Persona-Driven Content - Generate authentic content based on your personal profile
- β Smart Engagement - Auto-reply to relevant tweets in your niche
- β Anti-Detection - Uses Puppeteer with stealth plugin to avoid platform detection
- β macOS Integration - LaunchAgents for scheduled automation
- Node.js - Runtime environment
- Puppeteer v24.27.0 - Browser automation (M2 Mac compatible)
- Puppeteer Extra + Stealth Plugin - Anti-detection
- Google Gemini API - AI content generation
- macOS LaunchAgents - Scheduling system
- Node.js 16+
- macOS (for LaunchAgents)
- Google Gemini API key
- Twitter account (logged in via Chrome profile)
# Clone the repository
git clone https://github.com/lmanchu/twitter-curator.git
cd twitter-curator
# Install dependencies
npm install
# Copy environment template
cp .env.example .env
# Edit .env and add your API keys
nano .envCreate a .env file:
GEMINI_API_KEY=your_gemini_api_key_here
HEADLESS=true
DRY_RUN=falseUpdate PERSONA_FILE path in config.js to point to your persona profile markdown file.
Run once with HEADLESS=false to login to Twitter:
HEADLESS=false node twitter-curator.jsLogin manually when browser opens. Session will be saved to chrome-user-data/.
# Dry run (test without posting)
DRY_RUN=true node twitter-curator.js
# Live posting
node twitter-curator.jstwitter-curator/
βββ twitter-curator.js # Main automation script
βββ content-generator.js # AI content generation
βββ config.js # Configuration
βββ package.json # Dependencies
βββ .env # Environment variables (not committed)
βββ chrome-user-data/ # Saved browser session (not committed)
βββ logs/ # Execution logs
βββ posted-tweets.json # Tweet history with URLs
- Content Generation: Uses Gemini AI to generate original tweets based on your persona
- Browser Automation: Puppeteer navigates to Twitter and posts tweets
- URL Capture: After posting, retrieves the tweet URL from your profile
- Engagement: Searches for relevant tweets and generates contextual replies
- Logging: Records all activities with timestamps and URLs
Uses [data-testid="tweetButtonInline"] for main tweet composition (not the modal tweetButton).
Puppeteer v24.27.0 resolves Rosetta compatibility issues on Apple Silicon.
- Stealth plugin to hide automation markers
- Random delays to mimic human behavior
- Persistent Chrome profile (no repeated logins)
- Custom user agent
- Check if Twitter UI has changed
- Try updating the selector in
twitter-curator.js
- Ensure Puppeteer is v24+:
npm install puppeteer@^24.27.0
- Check
chrome-user-data/directory exists - Run once with
HEADLESS=falseto login
See CHANGELOG.md for detailed version history.
MIT
Built with β€οΈ by Lman
π€ Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com