npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

html-anything

v0.1.2

Published

Public local-mode CLI for generating polished HTML from Markdown, text, CSV, or JSON.

Readme

html-anything CLI

Public local-mode CLI for generating polished HTML from Markdown, text, CSV, or JSON.

The CLI does not call an HTML Anything server. It uses bundled templates and a local AI agent CLI installed on your machine, then writes local HTML files.

Install

Run without installing:

npx html-anything doctor
npx html-anything generate article.md --auto --target h5

Install globally:

npm install -g html-anything
html-anything doctor

Requirements:

  • Node.js 20 or newer
  • At least one supported local AI agent CLI, such as claude, codex, or gemini

Quick Start

# Diagnose local readiness
html-anything doctor

# List bundled templates
html-anything templates

# List bundled pre-rendered samples
html-anything samples

# Write a bundled sample without calling an agent
html-anything sample travel-flight-deal-xhs -o demo.html

# Generate responsive HTML with automatic template matching
html-anything generate article.md --auto

# Generate mobile H5 HTML
html-anything generate article.md --auto --target h5

# Export generated HTML as a mobile long image
html-anything export image article.html --long

# Export with platform-specific image defaults
html-anything export image article.html --platform xiaohongshu

# Generate with a chosen template
html-anything generate article.md -t doc-kami-parchment --target responsive

# Print a machine-readable manifest after success
html-anything generate article.md --auto --json

By default, file input is saved next to the current working directory as <input-name>.html. Use --output or --output-dir to control the destination.

Commands

doctor

html-anything doctor [--json]

Checks local configuration, bundled template availability, detected AI agents, and renderer status. Doctor never calls a server.

generate

html-anything generate [input] [options]

Primary public command.

| Option | Description | |--------|-------------| | --auto | Match the best bundled template automatically | | --template, -t <id> | Use a specific template | | --agent, -a <id> | Use a specific local AI agent | | --model <id> | Pass a model name to the selected agent | | --target <type> | Output target: pc, h5, or responsive; default is responsive | | --format <type> | Input format: markdown, text, csv, or json; default is markdown | | --output, -o <path> | Write to a specific HTML file | | --output-dir, -d <dir> | Auto-save generated files into a directory | | --json | Print a JSON manifest to stdout after successful file generation |

When input is omitted, content is read from stdin.

templates

html-anything templates

Lists the templates bundled inside the npm package, grouped by category. Each row includes target capabilities such as [h5], [pc], or [responsive,pc,h5].

samples

html-anything samples [--json]

Lists bundled pre-rendered samples. This is read-only and does not call an AI agent.

sample

html-anything sample <template-id> [--format html|md] [--output <path>] [--json]

Writes a bundled sample to disk or stdout. Use this to validate a template quickly before generating new content.

html-anything sample travel-flight-deal-xhs -o flight.html
html-anything sample travel-flight-deal-xhs --format md -o input.md

agents

html-anything agents

Lists detected local AI agent CLIs and whether each can be used.

export image

html-anything export image <html-file> [options]

Renders a local generated HTML file to a PNG using the local Playwright renderer.

| Option | Description | |--------|-------------| | --output, -o <path> | Output PNG path; default is <input-name>.png | | --long | Mobile long-image export: 390px viewport, scale 1, max 30000 CSS pixels | | --platform <id> | Apply platform image defaults: wechat, xiaohongshu, bilibili, douyin, weibo, zhihu, x, instagram, facebook, linkedin | | --target <type> | Viewport target: pc, h5, or responsive; default is desktop width | | --viewport-width <px> | Override screenshot viewport width | | --scale <n> | Device scale factor; default is 2, or 1 for long images | | --max-height <px> | Maximum captured CSS height | | --background <color> | Force page background before capture | | --json | Print a JSON manifest to stdout after success |

Platform defaults are not all the same. For example, xiaohongshu uses a mobile long-image export, while douyin and instagram use mobile viewport image export, and desktop feed platforms keep the current desktop-style viewport unless overridden.

When a fixed-width page is wider than the export viewport, the renderer auto-scales the page before measuring height. This keeps 1080px H5/card templates from being horizontally cropped when exported as 390px or 430px long images.

config

html-anything config
html-anything config set-default-template <id>
html-anything config set-default-agent <id>
html-anything config set-model <id>
html-anything config reset

Configuration is stored at ~/.config/html-anything/config.json.

Compatibility Commands

convert and auto remain available for existing scripts. New public functionality lands on generate first.

html-anything convert article.md -t doc-kami-parchment
html-anything auto article.md

Local Execution Model

local input
  -> bundled templates
  -> local AI agent CLI
  -> local HTML file/stdout
  -> optional local Playwright PNG export

There is no hosted mode, no --server flag, and no HTML Anything API dependency.

Development

# Install workspace dependencies
pnpm install --frozen-lockfile

# Run tests
pnpm -F html-anything test

# Typecheck
pnpm -F html-anything typecheck

# Build package output, including bundled templates
pnpm -F html-anything build

# Run the built CLI
node cli/dist/run.js doctor