WebPress
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/webpress
npx playwright install chromium
Or run with npx:
npx @liustack/webpress [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/webpress
Or use the skills CLI directly:
npx skills add https://github.com/liustack/webpress --skill webpress
Usage
# OG card
webpress -i card.html -o og.png --preset og
# Infographic
webpress -i stats.html -o infographic.png --preset infographic
Presets
| Preset | Size | Example |
|---|---|---|
og |
1200x630 | ![]() |
twitter |
1200x675 | ![]() |
banner |
1600x900 | ![]() |
youtube |
1280x720 | ![]() |
wechat |
900x383 | ![]() |
infographic |
1080x1350 | ![]() |
poster |
1200x1500 | ![]() |
xiaohongshu |
1080x1440 | ![]() |
More Examples
Cinema Theme

Fashion Theme

Other Styles

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--safedisable external network requests and JavaScript execution
PNG rendering requires a
#containerelement in HTML. Rendering fails if missing.
AI Agent Skill
License
MIT







