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

xhs-operator

v1.0.0-beta.1

Published

小红书自动运营 OpenClaw 插件 — 支持内容发布、互动增长、数据监控

Readme

xhs-operator

小红书(REDnote)账号自动运营 OpenClaw 插件。支持内容发布、互动增长、数据监控,内置行为人性化与风控防护。

安装

npm install xhs-operator

系统要求: Node.js ≥ 20,首次运行会自动安装 Playwright 浏览器驱动。

快速开始

命令行使用

# 全局安装
npm install -g xhs-operator

# 1. 导入账号
xhs-operator import ./accounts.json

# 2. 启动自动运营(每日调度)
ANTHROPIC_API_KEY=sk-... xhs-operator start

# 3. 手动触发发布
xhs-operator publish <accountId>

# 4. 查看运营报告
xhs-operator report <accountId>

账号配置文件(accounts.json)

[
  {
    "nickname": "美食博主小明",
    "niche": "美食",
    "sessionFile": "./sessions/account1.json",
    "proxy": {
      "host": "127.0.0.1",
      "port": 7890,
      "protocol": "http"
    }
  }
]

作为库使用(集成进 OpenClaw 框架)

import { XHSOperatorPlugin } from 'xhs-operator';
import { createStandaloneRuntime } from 'xhs-operator';

const runtime = createStandaloneRuntime({
  anthropicApiKey: process.env.ANTHROPIC_API_KEY,
});

const plugin = new XHSOperatorPlugin();
await plugin.initialize(runtime);

// 手动触发发布
const result = await plugin.triggerPublish('account-id');

// 批量导入账号
await plugin.importAccounts([{ nickname: '...', niche: '美食', sessionFile: '...', proxy: { ... } }]);

// 启动自动调度
plugin.startScheduler({ ... });

环境变量

| 变量 | 必填 | 说明 | |------|------|------| | ANTHROPIC_API_KEY | 是 | Anthropic API Key,用于 AI 内容生成 | | XHS_HEADLESS | 否 | 设为 false 可显示浏览器窗口(默认 true) | | XHS_NICHE | 否 | 默认内容垂类(默认 生活分享) | | XHS_LOG_LEVEL | 否 | 日志级别 debug/info/warn/error(默认 info) |

核心功能

  • AI 内容生成 — 基于 Claude Sonnet 自动生成标题、正文、话题标签、封面文字
  • 图片合成 — 封面图自动排版与文字叠加(基于 Sharp)
  • 行为人性化 — 贝塞尔曲线鼠标轨迹、打字节奏模拟、随机浏览行为
  • 频率限制 — 每日配额管理 + 熔断器,防封号
  • 指纹管理 — 每账号绑定稳定浏览器指纹,避免关联
  • 养号策略 — 新账号 14 天渐进式操作计划
  • 多账号调度 — 最多 5 路并发,按健康分优先排序
  • 数据采集 — 自动抓取创作者中心指标并生成报告

安全声明

本插件遵守小红书用户协议,不支持刷量、私信骚扰、绕过实名认证等违规操作。使用者需自行承担账号风险。

License

MIT