plugins/omi-twitter-app/README.md
Voice-activated Twitter posting through your OMI device. Simply say "Tweet Now" followed by your message, and it will be automatically posted to Twitter!
Live Demo: omi-twitter.up.railway.app
The app is smart about collecting your speech:
Example:
You: "Tweet Now, I just had"
[collecting silently...]
You: "an incredible idea about"
[collecting silently...]
You: "voice AI and social media!"
โ AI processes all 3 segments
โ Posts: "I just had an incredible idea about voice AI and social media!"
โ Notification sent! ๐
| Field | Value |
|---|---|
| Webhook URL | https://omi-twitter.up.railway.app/webhook |
| App Home URL | https://omi-twitter.up.railway.app/ |
| Auth URL | https://omi-twitter.up.railway.app/auth |
| Setup Completed URL | https://omi-twitter.up.railway.app/setup-completed |
# Clone the repository
git clone https://github.com/aaravgarg/omi-twitter-app.git
cd omi-twitter-app
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your API keys
Create .env file with:
# Twitter API Credentials (from developer.twitter.com)
TWITTER_API_KEY=your_api_key
TWITTER_API_SECRET=your_api_secret
TWITTER_CLIENT_ID=your_client_id
TWITTER_CLIENT_SECRET=your_client_secret
# OAuth Redirect URL
OAUTH_REDIRECT_URL=http://localhost:8000/auth/callback
# OpenAI API Key (for AI tweet extraction)
OPENAI_API_KEY=your_openai_key
# App Settings
APP_HOST=0.0.0.0
APP_PORT=8000
http://localhost:8000/auth/callback (for local dev)source venv/bin/activate
python main_simple.py
Visit http://localhost:8000/test to test!
Push to GitHub
git push origin main
Deploy on Railway
.env)Get your URL
your-app.up.railway.appUpdate OAuth Redirect
OAUTH_REDIRECT_URL=https://your-app.up.railway.app/auth/callbackConfigure OMI
Add these in Railway dashboard:
TWITTER_API_KEY
TWITTER_API_SECRET
TWITTER_CLIENT_ID
TWITTER_CLIENT_SECRET
OPENAI_API_KEY
OAUTH_REDIRECT_URL=https://your-app.up.railway.app/auth/callback
APP_HOST=0.0.0.0
APP_PORT=8000
Visit https://omi-twitter.up.railway.app/test to:
The app uses OpenAI for two things:
Example:
Input (3 segments):
"that this is amazing and um I think"
"it's really cool and oh wait"
"I need to remember to buy milk later"
AI Output:
"That this is amazing and I think it's really cool"
(Milk reminder correctly excluded!)
OMI sends transcripts in segments as you speak. The app:
Why 3 segments?
OAUTH_REDIRECT_URL is set correctlyomi-twitter-app/
โโโ main_simple.py # FastAPI application
โโโ twitter_client.py # Twitter API integration
โโโ tweet_detector.py # AI-powered tweet detection & extraction
โโโ simple_storage.py # File-based storage (users & sessions)
โโโ requirements.txt # Python dependencies
โโโ railway.toml # Railway deployment config
โโโ runtime.txt # Python version
โโโ Procfile # Alternative deployment platforms
โโโ .env.example # Environment template
โโโ .gitignore # Git ignore rules
โโโ LICENSE # MIT License
โโโ README.md # This file
| Endpoint | Method | Description |
|---|---|---|
/ | GET | Setup instructions & info |
/auth | GET | Start Twitter OAuth flow |
/auth/callback | GET | OAuth callback handler |
/setup-completed | GET | Check if user authenticated |
/webhook | POST | Real-time transcript processor |
/test | GET | Web testing interface |
/health | GET | Health check |
git checkout -b feature/amazing)git commit -m 'Add amazing feature')git push origin feature/amazing)MIT License - see LICENSE file for details.
Built for the OMI ecosystem.
Made with โค๏ธ for voice-first social media
Deployed at: omi-twitter.up.railway.app