Shinmun Blog - A lightweight file-based blog engine

AI-Powered Post Creation in Shinmun

January 1, 2026

Shinmun now includes an AI-powered CLI assistant that helps streamline the blog writing workflow. With a simple --ai flag, you can generate structured drafts, auto-populate metadata, and create SEO descriptions without leaving your terminal.

The Problem

Writing blog posts involves more than just content. You need to:

These tasks can slow down the creative process, especially when you want to quickly capture an idea.

The Solution

Shinmun’s AI assistant handles the boilerplate so you can focus on refining content:

shinmun post "Building RESTful APIs with Sinatra" --ai

This single command creates a complete draft with:

How It Works

The assistant uses either Anthropic’s Claude or OpenAI’s GPT-4 (depending on which API key you’ve configured) to:

  1. Analyze your post title
  2. Generate relevant, structured content
  3. Match your blog’s categories
  4. Suggest appropriate tags
  5. Create search-optimized descriptions

All processing happens through direct API calls—your content stays between you and the LLM provider.

Enhancing Existing Posts

Already have posts without metadata? The ai-enhance command analyzes existing content:

shinmun ai-enhance posts/2024/12/my-older-post.md

This fills in empty category, tags, and description fields while preserving any existing metadata.

Setup

Add your API key as an environment variable:

export ANTHROPIC_API_KEY="your-key"
# or
export OPENAI_API_KEY="your-key"

That’s it. No additional dependencies or configuration required.

Practical Considerations

The AI assistant is a drafting tool, not a replacement for your voice. Use it to:

Always review and refine the generated content before publishing.

For complete documentation, see the AI Assistant Guide.

Posted in category Ruby. Tagged with ai, cli, productivity, automation.


Categories

Archive