Skip to content

Hamza1s34/xbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xbot

A Python-based X (Twitter) bot powered by Google Gemini 3 (Flash Preview).

Features

  • AI-Powered: Generates creative and context-aware posts using Gemini 3.
  • Automated: Runs on a loop, posting at configurable intervals (default: 12 hours).
  • Clean Output: Automatically strips markdown and hashtags for a professional look on X.
  • Easy Configuration: Manage API keys and prompts via external files.

Setup

  1. Clone the repository:

    git clone https://github.com/Hamza1s34/xbot.git
    cd xbot
  2. Install dependencies:

    pip install -r requirements.txt
  3. Configure APIs: Create or update apis.txt with your credentials:

    Gemini: YOUR_GEMINI_API_KEY
    Api_key: YOUR_X_API_KEY
    Api_key_secret: YOUR_X_API_KEY_SECRET
    Bearer_token: YOUR_X_BEARER_TOKEN
    Access_token: YOUR_X_ACCESS_TOKEN
    Access_token_secret: YOUR_X_ACCESS_TOKEN_SECRET
    Gemini_Model: gemini-3-flash-preview
    
  4. Run the bot:

    python x_bot.py

Files

  • x_bot.py: The main bot script.
  • apis.txt: API credentials (private).
  • context.txt: Information about the project for the AI to use.
  • prompts: Themes and scenarios for post generation.
  • requirements.txt: Python package dependencies.

License

MIT

About

A Python-based X (Twitter) bot powered by Google Gemini 3.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages