Category: Visual & Media · Version:
0.0.1 · Author: opendirectory · Compatibility: All targets (claude, codex, opencode, gemini, anti-gravity, openclaw, hermes)Install
- npx CLI (Recommended)
- skills.sh
- Claude Code Native
- Claude Desktop
- Manus AI
Features
- Full AI Generation: Uses
gemini-3.1-flash-image-previewto generate the entire image. - Smart Logo Fetching: Pass a domain (like
vercel.com) and the CLI automatically fetches the logo usingBrandfetch, normalizes it to PNG viasharp, and injects it into the AI context. - Aesthetic Control: Bundled with
examples/that automatically guide the model to produce clean, white-background, heavy-typography styles. - Google Search Grounding: The image generation is hooked into Google Search to pull real-time data if your title involves current events.
- Agent Ready: Includes an OpenCode
SKILL.mdso your favorite AI agents can use this CLI autonomously. - Self-Healing AI Generator: Automatically validates generated images using Gemini Pro Vision to detect typos or layout issues, retrying up to 3 times with corrective feedback.
Setup
You can install this globally via npm:Configuration
The CLI securely stores your API key on your local machine using theconf package so you don’t have to export it every time.
Usage
Generate a 16:9 cover image by providing a title and a domain name for the logo.Options
If you omit the
--output flag, the CLI automatically creates an output/ directory in your current path and names the file intelligently based on the logo domain or title (e.g., output/cursor-cover.png).
For AI Agents (OpenCode Skill)
This skill folder includes a structuredSKILL.md for AI agents. The skill automatically calls the published blog-cover-image-cli npm package to generate cover images for users autonomously.
Workflow for Agents:
- Execute
npx -p blog-cover-image-cli blog-cover-cli config set-key $KEY - Execute
npx -p blog-cover-image-cli blog-cover-cli generate -t "Title" -l "domain.com" - Return the generated image to the user.
Self-Healing AI Generator
The CLI features a built-in Automated QA (Critic) loop to ensure high-quality results.- Generation: The tool generates an image based on your title and logo.
- Validation: It uses
gemini-3.1-pro-previewto OCR the generated image and check for typos, layout issues, or missing elements. - Self-Correction: If the validation fails, the CLI automatically retries (up to 3 times), passing the specific “critical feedback” back to the generator to fix the errors.
How it works under the hood
- Logo Fetcher: Hits
Brandfetch, parses WebP/SVGs/AVIFs, and converts to strict PNGs. - Context Assembly: Loads aesthetic examples from the
./examplesfolder to ground the style. - Multimodal Prompting: Assembles the exact text instructions, the visual examples, and the fetched logo into a single unified payload.
- Google GenAI SDK: Sends the payload with
tools: [{ googleSearch: {} }]to the Gemini 3.1 Flash Image model.

