npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

seshat-scribe

v0.7.3

Published

The Autonomous Scribe for Static Blogs - AI-powered content generation using Google Gemini

Readme

Seshat

AI-powered automatic content generation for blogs and headless CMS platforms. Seshat analyzes your existing content, generates new blog posts using Google Gemini, and publishes. Automatic generation and publication via Github Actions run on a schedule. Currently support local MDX files and Sanity CMS.

Features

  • Free to Use: Works with Google's free Gemini API tier for text generation, use paid tier for image generation
  • AI-Powered Planning: Analyzes existing content to generate unique, non-duplicate topics
  • BYOK - Bring Your Own Key, it will use your Gemini key to generate posts
  • Flexible Output: Commit local MDX files or publish to Sanity CMS automatically
  • Smart Generation: Creates complete articles with frontmatter and optional hero images
  • Framework Support: Optional presets for Remix, Next.js, and Astro (or custom configuration)
  • Flexible Configuration: Customizable frontmatter, file naming, and content generation options
  • GitHub Actions Integration: Automate content creation on a schedule
  • Type-Safe: Built with TypeScript and Zod for runtime validation

Installation

npm install -g seshat-scribe

Or use directly:

npx seshat-scribe init

Quick Start

1. Initialize

cd your-blog-project
seshat init

The interactive wizard will guide you through setup:

  • Choose between quick setup (recommended defaults) or custom configuration
  • Select output mode: local files or Sanity CMS
  • Select framework preset (Remix, Next.js, Astro) or custom configuration
  • Auto-detect existing blog structure if available

2. Configure API Keys

Get a free Google Gemini API key and add to your environment:

export GEMINI_API_KEY="your_api_key_here"

Free vs Paid API Keys:

  • Free tier: Generates text-only blog posts (no images)
  • Paid tier: Generates blog posts with AI-generated hero images

By default, Seshat will attempt to generate images. To create text-only posts (for free tier), set enableImageGeneration: false in your config (see Configuration below).

For Sanity CMS, also set:

export SANITY_WRITE_TOKEN="your_sanity_token_here"

3. Generate Content

seshat write

Preview without saving:

seshat write --dry-run

Configuration

Seshat uses seshat.config.json for configuration. The wizard creates this automatically, but you can also edit it manually.

Core Settings

{
  "topic": "Software Engineering and Technology",
  "tone": "Professional yet approachable",
  "framework": "remix",
  "outputMode": "local"
}
  • topic: Global topic constraint for content generation
  • tone: Writing style and voice
  • framework: Optional preset - one of remix, next, astro, or custom for manual configuration. Framework presets configure frontmatter fields automatically, but are not required
  • outputMode: local or sanity

Local File Output

Required when outputMode is local:

{
  "contentDir": "app/routes/blog",
  "assetsDir": "public/images/generated",
  "publicAssetPath": "/images/generated"
}

Sanity CMS Output

Required when outputMode is sanity:

{
  "sanity": {
    "projectId": "your-project-id",
    "dataset": "production",
    "apiVersion": "2024-01-01",
    "documentType": "post"
  }
}

Advanced Options

File Structure

  • fileExtension: mdx or md
  • imageFormat: png, jpg, or svg
  • fileNameTemplate: e.g., {{slug}} or {{date}}-{{slug}}
  • nestedDirectories: Use date-based nested directories

Frontmatter Customization

  • frontmatter.dateField: Field name for date (e.g., date, pubDate)
  • frontmatter.dateFormat: iso, date-only, or custom format
  • frontmatter.imageField: Field name for image
  • frontmatter.additionalFields: Custom metadata as key-value pairs

Content Generation

  • generation.enableImageGeneration: Enable/disable AI image generation (default: true). Set to false for text-only posts if using free Gemini API tier
  • generation.targetWordCount: Target word count (optional)
  • generation.includeCodeExamples: Emphasize code examples
  • generation.seoOptimized: Generate SEO-optimized content
  • generation.customInstructions: Additional instructions for AI

Example for free tier (text-only):

{
  "generation": {
    "enableImageGeneration": false,
    "targetWordCount": 1500,
    "includeCodeExamples": true
  }
}

GitHub Actions Automation

Automate content generation on a schedule:

Setup

seshat setup-workflow

This creates .github/workflows/seshat.yml based on your configuration.

Configure Secrets

Add these to your repository secrets (Settings → Secrets and Variables → Actions):

  • GEMINI_API_KEY: Your Google Gemini API key
  • SANITY_WRITE_TOKEN: Your Sanity write token (if using Sanity CMS)

Customize Schedule

This will run the Github action workflow to generate and publish posts automatically according to the defined schedule.

Edit the schedule field in seshat.config.json:

{
  "schedule": "0 9 * * 1"
}

Then run seshat setup-workflow again to update the workflow file.

CLI Commands

seshat init

Initialize configuration with interactive wizard:

seshat init

seshat write

Generate a new blog post:

seshat write
seshat write --dry-run  # Preview without saving

seshat setup-workflow

Create or update GitHub Actions workflow:

seshat setup-workflow

How It Works

  1. Analysis: Scans existing content (local MDX files or Sanity CMS) to understand what you've written
  2. Planning: Uses Google Gemini to propose a new, non-duplicate topic
  3. Writing: Generates complete article with frontmatter (or Portable Text for Sanity)
  4. Illustration (optional): Creates a hero image using Gemini's image generation (if enabled and API supports it)
  5. Publishing: Saves to local files, uploads to Sanity CMS, or both

Requirements

  • Node.js v20+
  • Free Google Gemini API key (Get one here - no credit card required)
    • Free tier: Text generation only
    • Paid tier: Text + AI image generation
  • Sanity write token (if using Sanity CMS)