GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mazamaka/grimace-twitter: Twitter/X bot farm with AI-powered content generation (OpenAI GPT + automated interactions)

BranchesTags
Open more actions menu

Latest commit

 

History

38 Commits
38 Commits

Folders and files

NameName
Last commit message
Last commit date
RandomActionDecorator
RandomActionDecorator
 
 
app
app
 
 
bots
bots
 
 
data
data
 
 
frontend
frontend
 
 
interactions
interactions
 
 
merging
merging
 
 
model
model
 
 
pics_123123
pics_123123
 
 
scraping
scraping
 
 
templates
templates
 
 
utils
utils
 
 
.env.example
.env.example
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
Dockerfile-backend
Dockerfile-backend
 
 
README.md
README.md
 
 
bot_farm_config.yaml
bot_farm_config.yaml
 
 
checking_actions.py
checking_actions.py
 
 
config.py
config.py
 
 
docker-compose.yml
docker-compose.yml
 
 
main.py
main.py
 
 
merged_full_cycle.csv
merged_full_cycle.csv
 
 
package-lock.json
package-lock.json
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 
test_max.py
test_max.py
 
 
testing.py
testing.py
 
 

Repository files navigation

Grimace Twitter Bot Farm

Python 3.10+ OpenAI Playwright Docker License: MIT

Twitter/X bot farm with OpenAI-powered content generation and automated engagement. Manages multiple accounts with intelligent tweet generation, interaction distribution, and proxy rotation.

Features

  • AI Tweet Generation -- GPT-4 generates contextually relevant tweets across configurable topics and tones
  • Tweet Rewriting -- scrapes existing tweets and rewrites them with AI for natural-sounding content
  • Multi-Account Management -- individual proxy support, credential storage, and session isolation
  • Automated Interactions -- likes, retweets, replies, and follows with configurable probability distributions
  • Human-Like Behavior -- RandomActionDecorator simulates browsing, scrolling, and pausing between actions
  • Scraping Pipeline -- collects tweets from target accounts and search queries via Twitter API and Playwright
  • Content Merging -- merges generated and scraped content into unified interaction queues
  • YAML Configuration -- all behavior controlled through a single bot_farm_config.yaml
  • Web Dashboard -- React frontend with real-time logs (WebSocket), config editor, and image upload
  • Docker Deployment -- full stack with PostgreSQL, Flask backend, React frontend, and Adminer

Architecture

grimace-twitter/
├── main.py                  # Farm orchestrator
├── setup.py                 # Entry point with logging
├── config.py                # Environment loader
├── bot_farm_config.yaml     # Master configuration
├── model/                   # OpenAI generation engine
├── interactions/            # Twitter interaction executor
├── scraping/                # Tweet scrapers (Playwright + API)
├── utils/                   # DB, distribution, login, search
├── merging/                 # Content merging pipeline
├── RandomActionDecorator/   # Human-like action simulator
├── app/                     # Flask backend (API + WebSocket)
├── frontend/                # React dashboard
├── docker-compose.yml
└── Dockerfile-backend

Quick Start

Prerequisites

  • Python 3.10+
  • PostgreSQL 14+
  • Node.js 18+ (for frontend)
  • OpenAI API key

1. Clone and configure

git clone https://github.com/mazamaka/grimace-twitter.git
cd grimace-twitter
cp .env.example .env
# Edit .env with your credentials

2. Start the database

docker compose up -d db adminer

3. Install dependencies

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
playwright install chromium

4. Configure the farm

Edit bot_farm_config.yaml:

  • Scraping -- target accounts, search queries, tweet count
  • Generation -- topics, prompts, hashtags, tone
  • Distribution -- interaction ratios (likes/posts/replies/retweets)
  • Merging -- custom probabilities, limits
  • RandomActions -- page visits, timing, follow/like probabilities

5. Add bot accounts and proxies

# Accounts: add via Adminer or API
# Proxies: one per line in bots/proxies.txt
# Format: ip:port:username:password

6. Run

# CLI mode
python setup.py

# Full Docker stack
docker compose up -d
  • Backend API: http://localhost:5000
  • Frontend: http://localhost:88
  • Adminer: http://localhost:8080

Environment Variables

Variable Required Description
OPENAI_API_KEY Yes OpenAI API key for tweet generation
POSTGRES_DB Yes PostgreSQL database name
POSTGRES_USER Yes PostgreSQL username
POSTGRES_PASSWORD Yes PostgreSQL password
POSTGRES_LOCALHOST Yes PostgreSQL host (for local dev)
POSTGRES_PORT Yes PostgreSQL port
HEADLESS No Run browser headless (True/False)
BACKEND_PORT No Flask API port (default: 5000)
FRONTEND_PORT No React app port (default: 88)
ADMINER_PORT No Adminer port (default: 8080)
secret_word Yes JWT secret for auth
secret_key Yes Flask secret key

Tech Stack

  • Backend: Python, Flask, Flask-SocketIO, SQLAlchemy
  • AI: OpenAI GPT-4
  • Automation: Playwright, Selenium, undetected-chromedriver
  • Scraping: twitter-api-client, custom Playwright scrapers
  • Database: PostgreSQL, psycopg2
  • Frontend: React, WebSocket
  • Infrastructure: Docker, docker-compose

Author

Maksym Babenko

  • GitHub: @mazamaka
  • Telegram: @Mazamaka

License

MIT

About

Twitter/X bot farm with AI-powered content generation (OpenAI GPT + automated interactions)

Resources

Readme
Activity

Stars

5 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.