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

xhscover

v2.0.0

Published

小红书封面生成 CLI - 注册/登录/生成一条龙

Readme

xhscover-cli

小红书封面生成命令行工具。支持 npm 安装或零依赖 bash 脚本。

安装

npm(推荐,跨平台)

# 直接使用,无需安装
npx xhscover setup

# 或全局安装
npm install -g xhscover
xhscover setup

需要 Node.js >= 18。

bash 脚本(macOS/Linux)

curl -sL https://raw.githubusercontent.com/xwchris/xhscover-cli/main/xhscover -o /usr/local/bin/xhscover
chmod +x /usr/local/bin/xhscover
xhscover setup

快速开始

# 首次使用:交互式注册/登录(注册即获 10 个免费积分)
xhscover setup

# 生成封面
xhscover generate "5个习惯让你越来越自律"

setup 会引导你注册或登录,API Key 自动保存到 ~/.xhscover,后续无需再配置。

命令

xhscover setup                      # 首次配置(注册或登录)
xhscover register                   # 注册新账号
xhscover login                      # 登录已有账号
xhscover generate <文案> [宽高比]   # 生成封面
xhscover balance                    # 查询积分余额
xhscover history [数量]             # 获取生成历史
xhscover help                       # 显示帮助

配置

API Key 保存在 ~/.xhscoversetup/register/login 命令会自动写入。

也可以通过环境变量配置(优先级高于配置文件):

export XHS_COVER_API_KEY="xhs_your_api_key"
export XHS_COVER_API_URL="https://api.xhscover.cn"  # 可选

宽高比

| 比例 | 说明 | |------|------| | 3:4 | 小红书标准竖版(默认) | | 9:16 | 超长竖版 | | 1:1 | 正方形 | | 16:9 | 横版 |

示例

xhscover generate "5个习惯让你越来越自律"
xhscover generate "今日份好心情" 1:1
xhscover "这是封面文案"          # 快捷方式
xhscover balance
xhscover history 20

在 AI Agent 中使用

本工具可作为 Claude Code Skill 的后端,用户在 Skill 中首次使用时会自动引导配置:

# Skill 检测到未配置时自动运行
xhscover setup

# Skill 生成封面
xhscover generate "$文案" "$宽高比"
xhscover balance

配置一次即可持续使用,支持 npx 零安装调用。

相关链接

  • 官网:https://xhscover.cn
  • API 文档:https://xhscover.cn/docs
  • MCP Server:https://github.com/xwchris/xhs-cover-mcp
  • Skill:https://github.com/xwchris/xhs-cover-skill

License

MIT