Hi, this is Article2Tweet, it uses the Spring Shell CLI and it gives you the ability to generate Tweets, from Articles! I write Medium articles all the time, and I wanted to automate posting them on twitter as well!
An AI-powered application built with Embabel Agent Framework that converts Medium articles into engaging Twitter threads.
- Smart Article Analysis: Extracts key points from Medium articles
- Twitter Thread Generation: Creates properly formatted tweet threads with character limits
- Interactive Shell Interface: Easy-to-use Spring Shell commands
- Mock API Support: Test functionality without requiring API keys
- Extensible Architecture: Built with Embabel for advanced AI agent capabilities
- Java 21 - Core language
- Spring Boot 3.5.7 - Application framework
- Spring Shell - Interactive command-line interface
- Embabel Agent Framework 0.1.3 - AI agent orchestration
- Java 21 or higher
- Optional: Medium API key from RapidAPI
git clone <your-repo-url>
cd article2tweet
./mvnw clean compile./mvnw spring-boot:runOnce the application starts, you'll see a Spring Shell prompt. Try these commands:
# Create a mock Twitter thread for testing
create-mock-tweet --title "10 AI Trends That Will Shape 2025"
# Create thread from a Medium URL (requires API setup)
create-tweet --url "https://medium.com/@author/article-title"
# Show help
help-tweets| Command | Description | Example |
|---|---|---|
create-mock-tweet |
Generate thread from mock article | create-mock-tweet --title "AI in Healthcare" |
create-tweet |
Convert real Medium article to thread | create-tweet --url "https://medium.com/article-url" |
help-tweets |
Show detailed help | help-tweets |
- Get API key from RapidAPI Medium API
- Set environment variable:
export MEDIUM_API_KEY="your_api_key_here"
- Or add to
application.properties:medium.api.key=your_api_key_here
When Embabel is fully configured, you can add:
openai.api.key=${OPENAI_API_KEY:}
anthropic.api.key=${ANTHROPIC_API_KEY:}- Article Input: Accepts Medium article URL
- Content Analysis: Extracts key points from article content
- Thread Generation:
- Creates introduction tweet with article title
- Converts key points to individual tweets
- Adds thread numbering (1/n, 2/n, etc.)
- Ensures tweets stay under 280 characters
- Adds call-to-action with original article link
- Output: Displays formatted Twitter thread ready for posting
