News in. AI in the middle. Posts out.
A lightweight Python package that automatically turns news into AI-generated posts for X (Twitter).
Everything that makes your bot unique—its personality, news sources, schedule, prompts, and API keys—lives in a single manifest.yaml.
from newsbot import XBot
bot = XBot("manifest.yaml")
bot.run()That's it.
newsbot loads your manifest, fetches the latest headlines, generates content using your preferred LLM, and publishes directly to X.
No boilerplate. No frameworks. No GitHub Actions.
Run it anywhere Python runs:
- Cron jobs
- Flask / FastAPI
- AWS Lambda
- Discord bots
- Background workers
- Your own scripts
Most AI news bots are a collection of scripts that you fork and customize for every account.
newsbot takes a different approach.
The package stays the same.
Everything account-specific lives inside a single manifest.yaml.
That means you can run:
- One package
- Ten manifests
- Ten completely different bots
without changing a single line of Python.
Don't want to manage servers, scheduling, monitoring, or prompt tuning?
Pick a plan and I'll take care of everything.
| Plan | Price |
|---|---|
| 🚀 STARTER | $20/month |
| 💼 PROFESSIONAL | $40/month |
| 🏢 ENTERPRISE | $150 setup + $40/month |
- You provide your own X API credentials.
- Gemini usage is currently free.
- X API charges (if applicable) are billed directly by X.
Install from PyPI:
pip install newsbotOr install from source:
git clone git@github.com:OmidAlekasir/newsbot.git
cd newsbot
pip install -e .Copy:
manifest.example.yaml
to:
manifest.yaml
Then configure:
- X API credentials
- AI provider credentials
- RSS feeds
- Prompt configuration
API keys can also be loaded from environment variables:
api_key: ${GEMINI_API_KEY}Place prompt files inside:
prompts/
Each prompt should include:
{{news_context}}
This placeholder is automatically replaced with the latest news before generation.
from newsbot import XBot
bot = XBot("manifest.yaml")
bot.run()Preview posts without publishing:
bot.run(dry_run=True)If newsbot saves you time or powers your projects, consider supporting future development.
EVM Address
0x78f8b8e93174Ba5D6C0D24218219e23f014E98a9
Every contribution helps improve the project ❤️
Each bot has its own manifest.
from newsbot import XBot
morning_bot = XBot("bots/morning/manifest.yaml")
crypto_bot = XBot("bots/crypto/manifest.yaml")
morning_bot.run(prompt_key="morning_flash")
crypto_bot.run()One package.
Different personalities.
Different news sources.
Different X accounts.
Run your bot directly from the terminal.
List available prompts:
python -m newsbot.cli --list-promptsPreview without posting:
python -m newsbot.cli --dry-runUse a specific prompt:
python -m newsbot.cli -p contrarian_viewEverything is configured inside one file.
| Section | Description |
|---|---|
twitter |
X API credentials |
ai |
AI provider, models, and fallback models |
news |
RSS feeds, article limits, filters, and media options |
prompts |
Prompt templates, personalities, and schedules |
run |
Runtime settings such as dry_run |
Need a new personality?
Add a prompt.
Need more news sources?
Add RSS feeds.
Want to try another LLM?
Change the model.
No Python code needs to change.
- Personal brands
- AI news accounts
- Crypto bots
- Finance commentary
- Sports updates
- Tech news
- Marketing experiments
- Multi-account operators
- SaaS integrations
- Internal automation
newsbot/
├── __init__.py
├── core.py
├── config.py
├── ai_client.py
├── news_fetcher.py
├── twitter_client.py
├── cli.py
├── logger.py
└── utils.py
manifest.example.yaml
prompts/
MIT License.
Use it.
Modify it.
Ship it.
Built with ❤️ using Python, RSS, Gemini, and the X API.