Skip to main content
generate_blogs.py is an open source Python script that automates blog content creation end-to-end. It uses a multi-pass pipeline powered by Claude to generate high-quality, humanised blog posts and publish them to your Supabase database.
This script is open source. You can adapt it for your own content pipeline — replace the Supabase publishing step with your CMS of choice.

What it does

The pipeline runs in 6 passes, each building on the last: Each pass caches its output to local JSON files (_topics.json, _plans.json, _registry.json) so you can resume from any pass if something fails.

Requirements

  • Python 3.9+
  • An Anthropic API key (Claude)
  • A Supabase project with a blogs table (for publishing)
Install dependencies:
No other dependencies — the script uses only stdlib (json, os, argparse, pathlib, urllib) plus the anthropic package.

Setup

Clone or install from the nometria/blog-pipeline repository:
Or clone the source:
Also available on PyPI: blog-pipeline
Set environment variables:

Usage

Output

Local files (in blogs/ directory):
  • _topics.json — topic list with metadata
  • _plans.json — structure plans per topic
  • _registry.json — tracking which blogs exist locally vs in DB
  • <slug>.md — one markdown file per generated blog
Published to Supabase: Each blog is inserted into the blogs table with:

Blog types

The pipeline generates three blog formats: Type is determined by Claude in Pass 2 based on topic suitability.

Customising for your project

Change the niche/focus: Edit the system prompt in generate_blogs.py around the CATEGORY_MAP and topic generation sections. Replace references to Nometria and vibe coding with your own product and subject matter. Change the publishing destination: Replace the push_to_supabase() function with your own CMS integration. The function receives a dict with slug, title, content, tags, cover_image, etc. Adjust the cover image pool: The _COVER_POOL dict maps blog categories to curated Unsplash photo IDs. Add or remove photo IDs to change the visual style of generated posts.

Supabase table schema

If you want to use the built-in Supabase publishing:

Example run output