A modern CLI tool to generate high-quality, AI-powered content for Ghost CMS demo sites
Ghost Myrtle helps Ghost theme developers and site creators generate sample content for their themes and demo sites. Using language models from multiple AI providers, it creates realistic blog posts, static pages, and comprehensive content that showcases your theme's capabilitiesβno more lorem ipsum!
- π€ Multiple AI Providers: OpenAI, Anthropic (Claude), OpenRouter, or self-hosted models
- πΈ Keyword-Relevant Images: Automatic Pexels integration for relevant stock photos (or Lorem Picsum fallback)
- π Rich Content Generation: Blog posts with proper formatting, SEO structure, and images
- π¨ Style Guide Page: Optional comprehensive showcase of Ghost's formatting capabilities
- πΎ Resume Functionality: Interrupted sessions automatically save and can be resumed
- π Flexible Configuration: Easy provider switching and per-generation settings
- Node.js: v22.0.0 or higher
- Ghost Site: Local or remote Ghost installation with Admin API access
- AI Provider Account: At least one of the following:
- OpenAI API key (GPT-4, GPT-3.5, etc.)
- Anthropic API key (Claude models)
- OpenRouter API key (access to 100+ models)
- Self-hosted LLM with OpenAI-compatible API
Install Ghost Myrtle globally using npm:
npm install -g ghost-myrtleOr use it directly with npx:
npx ghost-myrtle [command]Run the configuration wizard to set up your Ghost site and AI provider:
myrtle configYou'll be guided through:
- Ghost Configuration: Enter your Ghost site URL and Admin API key
- Provider Selection: Choose your preferred AI provider
- Provider Setup: Configure API credentials and model selection
- Generation Settings: Set default temperature and token limits
To get your Ghost Admin API key:
- Go to your Ghost Admin panel
- Navigate to Settings β Integrations
- Create a new Custom Integration
- Copy the Admin API Key and API URL
myrtle config provider openai- API Key: Get from OpenAI Platform
- Models: Fetched automatically (GPT-4, GPT-3.5-turbo, etc.)
myrtle config provider anthropic- API Key: Get from Anthropic Console
- Models: Claude Sonnet 4.5, Opus 3, Haiku 3.5
myrtle config provider openrouter- API Key: Get from OpenRouter
- Models: 100+ models fetched automatically
- Note: Check OpenRouter pricing for model costs
myrtle config provider self-hosted- Endpoint: Your local/remote model endpoint (e.g.,
http://localhost:11434/v1) - Models: Fetched from your endpoint's
/modelsAPI
Configure Pexels to get keyword-relevant images in your blog posts:
myrtle config pexels- API Key: Get free from Pexels API
- Free Tier: 200 requests/hour, 20,000/month
- Benefits:
- Keyword-relevant stock photos automatically added to posts
- Proper photographer attribution
- Fallback: If not configured, posts use Lorem Picsum placeholder images
Getting a Pexels API Key:
- Visit pexels.com/api
- Sign up for a free account
- Get instant API key (no approval needed)
- Run
myrtle config pexelsand paste your key
Start the content generation wizard:
myrtle createYou'll be prompted for:
- Site Information: Name, type, description, target audience
- Content Options: Static pages, style guide, blog categories
- Post Configuration: Number of posts per category
The tool will then:
- β Generate static pages (About, Contact, etc.)
- β Create style guide page (optional)
- β Generate diverse blog post titles for each category
- β Write full blog posts with images and formatting
- β Push everything to your Ghost site
If generation is interrupted (API limits, network issues, etc.), simply run:
myrtle createThe tool will detect your saved progress and offer to resume.
# Dry run (generate without pushing to Ghost)
myrtle create --dry-run
# Preview content as it's generated
myrtle create --preview
# Use a specific provider for this session
myrtle create --provider anthropic
# Override temperature setting
myrtle create --temperature 0.9# Show help
myrtle help
myrtle --help
# Show version
myrtle --version
# Configure a specific provider
myrtle config provider [openai|anthropic|openrouter|self-hosted]Enable the Style Guide option to generate a comprehensive page showing:
- Typography (headings, paragraphs, blockquotes)
- Lists (ordered, unordered, nested)
- Code blocks and inline code
- Images and galleries
- Tables and embeds
- Ghost-specific cards (buttons, toggles, etc.)
Run the configuration for your provider:
myrtle config provider [provider-name]- Verify your Ghost site is accessible
- Check Admin API key is correct
- Ensure API URL includes
/ghost/api/admin/path - Test connection:
curl [YOUR_GHOST_URL]/ghost/api/admin/site/
- OpenAI: Check usage limits
- Anthropic: Check console billing
- OpenRouter: Check credits balance
- Use
--providerflag to switch to a different provider
The state file .myrtle-state.json should be in your current directory. Check:
ls -la .myrtle-state.jsonIf missing, the session completed or was cleared. Start a new generation.
# Clone the repository
git clone https://github.com/betschki/ghost-myrtle.git
cd ghost-myrtle
# Install dependencies
npm install
# Build TypeScript
npm run build
# Link for local testing
npm linkContributions are welcome! Please feel free to submit issues or pull requests.
Ghost Myrtle is MIT licensed.
If you encounter any issues, please report them on GitHub Issues.