Skip to content

liustack/coverpress

Repository files navigation

CoverPress

A CLI toolkit for AI agents to generate platform cover images from local HTML presets.

中文说明请见:README.zh-CN.md

Features

  • Preset-only cover generation (no custom dimensions)
  • Local HTML only (remote URLs are not supported)
  • 8 built-in presets for social and content covers
  • Deterministic rendering with Playwright + Chromium
  • #container-based screenshot capture for predictable framing

Installation

npm install -g @liustack/coverpress
npx playwright install chromium

Or run with npx:

npx @liustack/coverpress [options]

Or install as an Agent Skill — tell any AI coding tool that supports agent skills (Claude Code, Codex, OpenCode, Cursor, Antigravity, etc.):

Install the skill from https://github.com/liustack/coverpress

Or use the skills CLI directly:

npx skills add https://github.com/liustack/coverpress --skill coverpress

Usage

# OG card
coverpress -i card.html -o og.png --preset og

# Infographic
coverpress -i stats.html -o infographic.png --preset infographic

Presets

Preset Size Example
og 1200x630 og
twitter 1200x675 twitter
banner 1600x900 banner
youtube 1280x720 youtube
wechat 900x383 wechat
infographic 1080x1350 infographic
poster 1200x1500 poster
xiaohongshu 1080x1440 xiaohongshu

More Examples

Cinema Theme

cinema-twitter-pain cinema-infographic-presets cinema-infographic-skill

Fashion Theme

fashion-twitter-how fashion-twitter-pain fashion-infographic-skill fashion-xhs-main fashion-xhs-tutorial

Other Styles

banner twitter-pain xhs-cover-film xiaohongshu-cover

Options

  • -i, --input <path> input HTML file path
  • -o, --output <path> output PNG file path
  • -p, --preset <name> preset name (required)
  • --scale <number> device scale factor (default: 2)
  • --wait-until <state> load | domcontentloaded | networkidle
  • --timeout <ms> timeout in milliseconds
  • --safe disable external network requests and JavaScript execution

PNG rendering requires a #container element in HTML. Rendering fails if missing.

AI Agent Skill

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors