An automated Twitter content generation system that creates suggested tweet threads from various sources built for @AnandChowdhary's profile. The system generates content drafts in Typefully for manual review and approval before posting.
- Node.js (v18 or higher)
- OpenAI API key
- Typefully API key
git clone <repository-url>
cd tweeter
npm installexport OPENAI_API_KEY="your-openai-api-key"
export TYPEFULLY_API_KEY="your-typefully-api-key"For example, running the starred repositories workflow from the CLI:
npx tsx tasks/starred-repos.tsThe system includes GitHub Actions workflows that run automatically:
- Daily: AI news, tech news, and starred repos
- Weekly: Changelog posts
- Biweekly: Blog posts
- Triweekly: Personal notes
- Alternate weekly: Open source projects
| Task | Source | Description |
|---|---|---|
notes.ts |
Personal notes API | Personal notes and thoughts |
blog-posts.ts |
Personal blog API | Personal blog posts and articles |
quotes.ts |
Personal API | Quotes from Limitless life logs |
link.ts |
Any URL | Generate from any article link |
note.ts |
Manual input | Generate from personal note text |
changelog.ts |
FirstQuadrant API | Company changelog and updates |
featured-open-source-projects.ts |
GitHub API | Curated open source projects |
starred-repos.ts |
GitHub API | Recently starred repositories |
ai-news.ts |
smol.ai RSS feed | Latest AI news and announcements |
tech-news.ts |
Reddit r/technews | Tech news with community discussions |
The system uses specialized AI agents for different content types:
- Content generators: Transform source material into Twitter threads
- Voice generator: Rewrites content in consistent authorial voice
- Ideas generator: Extracts tweet topics and creates thread ideas
- Technical scorer: Evaluates technical complexity (1-10 scale)
- Thread converter: Converts multi-tweet threads to single tweets
- Content discovery: Fetches latest content from configured sources
- Duplicate detection: Skips previously processed content
- AI processing: Generates thread ideas and creates initial drafts
- Voice transformation: Applies consistent authorial voice
- Draft creation: Creates drafts in Typefully for review
- Manual approval: You edit and approve before posting
Set up a custom shortcut to generate threads from any article:
- Create shortcut in Apple Shortcuts app
- Add "Get Contents of URL" action with GitHub Actions workflow URL
- Add to iPhone share sheet for one-tap thread generation
The system tracks processed content in state.json to avoid duplicates and maintain execution history.
The system stores recent tweet topics (ideas) in state.json to prevent repetition:
- AI news: When generating tweet ideas, recent topics are passed as context to help the AI avoid similar themes
- Tech news: Recent topics are provided to avoid repeating similar news stories
- Storage: Up to 50 most recent tweet topics are kept in the
recentTweetsarray - Format: Topics are stored as concise titles/descriptions (not full tweets)
This ensures that the content generation system produces fresh, diverse content and doesn't repeat the same ideas or news angles.
MIT (c) 2025 Anand Chowdhary