A powerful, self-hosted Twitter automation tool that leverages AI to generate engaging content, schedule tweets, and manage your Twitter presence.
- AI Content Generation: Generate high-quality tweets using OpenAI-compatible APIs (e.g., Local LLMs, Gemini, Claude).
- Multi-AI Support: Configure different AI models for different purposes (e.g., one for tech news, one for casual thoughts).
- Smart Scheduling: Schedule tweets for optimal times.
- Account Management: Manage multiple Twitter accounts from a single dashboard.
- Privacy First: All API keys and data are stored locally in your SQLite database.
- Frontend: Next.js 14, Tailwind CSS, Lucide Icons
- Backend: Node.js, Express
- Database: SQLite (via Prisma ORM)
- AI Integration: OpenAI-compatible API support
- Node.js 18+
- npm or yarn
-
Clone the repository
git clone <your-repo-url> cd twitter-auto-operation
-
Install Dependencies
# Install frontend dependencies cd frontend npm install # Install backend dependencies cd ../backend npm install
-
Database Setup
cd backend npx prisma generate npx prisma migrate dev --name init -
Start the Application You need to run both frontend and backend servers.
Backend:
cd backend npm run dev # Server runs on http://localhost:3001
Frontend:
cd frontend npm run dev # UI runs on http://localhost:3000
- Go to Twitter Developer Portal.
- Create a project and app with Read and Write permissions.
- Navigate to
Settings > Twitter APIin the app. - Enter your Consumer Keys and Access Tokens.
- Navigate to
Settings > AI Configuration. - Add your AI provider details (Base URL, API Key, Model Name).
- You can use local LLMs (like LM Studio, Ollama) by pointing the Base URL to your local server (e.g.,
http://127.0.0.1:8045/v1).
- Dashboard: View your scheduled tweets and account stats.
- Content: Create new tweets manually or let AI generate them for you based on a topic.
- Schedule: Set up automated posting schedules.
- Local Storage: All sensitive data (API keys, tokens) is stored in your local SQLite database (
backend/dev.db). - No External Tracking: This application does not send data to any external servers other than the APIs you configure (Twitter and your chosen AI provider).
MIT