AI-powered blog generation from your terminal. Create SEO-optimized, publication-ready articles with a single command.
Project description
OpenBlog
Open-source AI-powered blog generation system โ 12-stage pipeline for producing high-quality, AEO-optimized articles.
โจ Features
- ๐ 12-Stage Pipeline โ Modular, testable stages from data fetch to HTML output
- ๐ฏ AEO Optimization โ Built-in Answer Engine Optimization scoring (70-85+ scores)
- ๐ Smart Citations โ Automatic source validation and formatting
- ๐ Rich Content โ FAQ/PAA extraction, internal links, ToC generation
- ๐ผ๏ธ Image Generation โ AI-powered featured images via OpenRouter
- ๐ Multi-language โ Supports multiple languages with auto-detection
- โก Fast โ 60-90 second generation time
๐ Pipeline Stages
Stage 0: Data Fetch & Company Detection
Stage 1: Prompt Construction
Stage 2: AI Content Generation (Gemini + tools)
Stage 3: Structured Data Extraction
Stage 4: Citation Validation โโ
Stage 5: Internal Links โ (parallel)
Stage 6: Table of Contents โ
Stage 7: Metadata โ
Stage 8: FAQ/PAA Enhancement โ
Stage 9: Image Generation โโ
Stage 10: Cleanup & Validation
Stage 11: HTML Generation & Storage
๐ Quick Start
Installation
git clone https://github.com/federicodeponte/openblog.git
cd openblog
pip install -r requirements.txt
Environment Variables
# Required
GEMINI_API_KEY=your_gemini_api_key
# Optional - DataForSEO fallback (when Google Search quota exhausted)
# Cost: $0.50 per 1,000 queries - Standard mode (async task-based)
# Automatically activates when Google Search returns 429/quota errors
DATAFORSEO_LOGIN=your_dataforseo_email
DATAFORSEO_PASSWORD=your_dataforseo_password
# Optional - for Google Drive integration
GOOGLE_SERVICE_ACCOUNT_JSON='{"type":"service_account",...}'
GOOGLE_DELEGATION_SUBJECT=user@domain.com
API Usage
# Start the server
uvicorn service.api:app --reload
# Generate a blog
curl -X POST http://localhost:8000/blog/write \
-H "Content-Type: application/json" \
-d '{
"primary_keyword": "AI in customer service",
"company_url": "https://example.com"
}'
Python Usage
from pipeline.core.workflow_engine import WorkflowEngine
from pipeline.core.execution_context import ExecutionContext
engine = WorkflowEngine()
context = ExecutionContext(
job_id="test-123",
job_config={
"primary_keyword": "AI adoption in customer service",
"company_url": "https://example.com",
},
)
result = await engine.execute(context)
print(result.final_article["Headline"])
๐๏ธ Project Structure
openblog/
โโโ pipeline/
โ โโโ blog_generation/ # 12 stages (stage_00 to stage_11)
โ โโโ core/ # Workflow engine, execution context
โ โโโ models/ # Data models, AI clients
โ โโโ processors/ # HTML, citations, sitemap
โ โโโ prompts/ # Prompt templates
โ โโโ utils/ # AEO scorer, helpers
โโโ service/
โ โโโ api.py # FastAPI endpoints
โ โโโ image_generator.py # Image generation
โโโ tests/ # Test suite
โโโ docs/ # Documentation
โโโ modal_deploy.py # Modal deployment
โโโ requirements.txt
๐ Output Quality
- AEO Score: 70-85+ / 100
- Generation Time: 60-90 seconds
- Citation Validation: Automatic URL checking
- HTML Output: Clean, semantic markup
๐ง Deployment
Modal (Recommended)
pip install modal
modal deploy modal_deploy.py
Docker
docker build -t openblog .
docker run -p 8000:8000 openblog
๐ Documentation
๐งช Testing
pytest tests/ -v
pytest tests/stages/test_stage_00.py -v # Test specific stage
๐ License
MIT License - see LICENSE for details.
๐ค Contributing
Contributions welcome! Please read the contributing guidelines before submitting PRs.
Built with โค๏ธ by SCAILE
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openblog-3.0.0.tar.gz.
File metadata
- Download URL: openblog-3.0.0.tar.gz
- Upload date:
- Size: 493.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5b0364b6717914da6d133058da92aade83ffbba47d0a6bb78a173a2af2e9778
|
|
| MD5 |
79d4409a4bb520430f608c6b3510c552
|
|
| BLAKE2b-256 |
8041ea04f8528b1bb6caebee8a464a400f3776b4b9fe1729126e4d0a27cc0c76
|
File details
Details for the file openblog-3.0.0-py3-none-any.whl.
File metadata
- Download URL: openblog-3.0.0-py3-none-any.whl
- Upload date:
- Size: 534.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73bc7d8ff156356e5349ebdf32c5e31021fed762c7d5d15eff23fe96ff7ad1ca
|
|
| MD5 |
99a614505f1c9fcf4db2a20bdeaa083d
|
|
| BLAKE2b-256 |
5f4c38b17697505898aef94071636028f1dbddec4b0a378978830f245bab508d
|