Desktop tweet scheduler for X (Twitter). Compose tweets and threads, schedule them, and post automatically via the API or manually via a copy-paste queue.
Built with Electron + React + TypeScript + SQLite.
- Dual-mode posting — Auto mode posts via the X API in the background. Manual mode shows a copy-paste queue so you can post by hand at zero cost.
- Thread support — Compose multi-tweet threads with automatic numbering, configurable inter-tweet delay, and correct reply-chain posting.
- Scheduling & queue — Schedule tweets for exact times, or add them to a daily queue with configurable time slots (e.g. 09:00, 14:00, 19:00).
- Smart text splitter — Paste long text and split it into a thread automatically using sentence boundaries or a custom separator.
- Media attachments — Attach images to tweets. In manual mode, copy images to clipboard for pasting into X's web UI.
- Multi-account — Add multiple X accounts with API credentials. Select which account to post from per-tweet.
- Recurring tweets — Mark tweets as recurring with a configurable interval (months). After posting, they re-enter the queue for the next cycle.
- Retry with backoff — Transient API errors (429, 503, network timeouts) are retried with exponential backoff. Permanent errors fail immediately. Thread children are halted when a parent fails.
- Drafts & history — Save drafts, view posting history with error details.
- System tray — Runs in the background, auto-starts on boot, posts while the window is closed.
- Local-first — All data stored locally in SQLite. No cloud dependency.
- Node.js v18+
- npm
git clone https://github.com/AntGravity-Research/TweetFlow-Scheduler.git
cd TweetFlow-Scheduler
npm install
npm run devnpm run packThis compiles the app and packages it to dist/win-unpacked/tweetflow-scheduler.exe.
The app starts in manual mode — no API credentials needed.
- Compose a tweet or thread in the left panel.
- Set a schedule time and click Publish.
- When the scheduled time arrives, switch to the 📋 Ready to Post tab.
- For each tweet: Copy Text → paste into X → Mark as Posted.
- For images: Copy Image → paste into X's media upload.
Threads are grouped and numbered (1/3, 2/3, 3/3) so you can post them in order.
Toggle Manual ↔ Auto in the top-right corner. In auto mode, the background processor posts tweets via the X API when their scheduled time arrives.
Requires API credentials: go to the Accounts tab and add your X app key, secret, access token, and access secret. The X API uses pay-per-use pricing ($0.01/tweet as of 2026).
Instead of scheduling exact times, add tweets to the queue and configure daily time slots in the Queue Slots tab. The processor picks one queued tweet per slot.
src/
main/ # Electron main process
index.ts # App lifecycle, IPC handlers, tray
logic/processor.ts # Background tweet processor (retry, threading, backoff)
services/database.ts # SQLite service (schema, migrations, queries)
preload/index.ts # Context bridge (IPC API exposed to renderer)
renderer/src/ # React UI
App.tsx # Main application component
components/ # TweetBlock, DatabaseView
Key patterns:
- IPC bridge: renderer → preload (
contextBridge) → main (ipcMain.handle) - Schema migrations via column-existence checks in
DatabaseService.init() - Processor runs on a 5-second interval with a mutex flag
- Settings stored as key-value pairs in SQLite
settingstable - Soft-delete on tweets and send logs (
is_deletedflag)
| Command | Description |
|---|---|
npm run dev |
Development mode with hot reload |
npm run build |
Compile to out/ (no packaging) |
npm run pack |
Compile + package to dist/win-unpacked/ |
npm run start |
Preview the production build |
npm run test |
Run unit tests (Vitest) |
npm run lint |
ESLint |
npm run format |
Prettier |
MIT
Built by Antigravity