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

@aiwaretop/claw-feishu-user

v1.0.0

Published

OpenClaw Feishu plugin using user_access_token for document operations

Readme

claw-feishu-user

OpenClaw 飞书文档操作插件,使用 user_access_token 进行用户级别认证。

与内置 feishu 插件的区别

| 特性 | 内置 feishu 插件 | claw-feishu-user 插件 | |------|-----------------|----------------------| | 认证方式 | App ID / App Secret (机器人) | user_access_token (用户授权) | | 权限范围 | 应用权限 (tenant) | 用户权限 (user) | | 适用场景 | 机器人自动操作 | 用户个人文档操作 |

功能

  • 📄 文档操作: 读取、创建、写入、追加、删除
  • 📋 块操作: 列出块、获取块、更新块、删除块
  • 🖼️ 图片处理: 支持 Markdown 中的图片自动上传到文档

安装

npm install @aiwaretop/claw-feishu-user
# 或
pnpm add @aiwaretop/claw-feishu-user

配置

openclaw.json 中配置:

{
  "plugins": {
    "allow": ["feishu-user"],
    "load": {
      "paths": ["/path/to/claw-feishu-user"]
    },
    "entries": {
      "feishu-user": {
        "enabled": true,
        "config": {
          "user_access_token": "u-xxxxx",
          "domain": "feishu"
        }
      }
    }
  }
}

配置说明

| 参数 | 类型 | 必填 | 说明 | |------|------|------|------| | user_access_token | string | 是 | 飞书用户访问令牌 | | domain | string | 否 | 飞书域名,feishulark,默认 feishu |

获取 user_access_token

  1. 在飞书开放平台创建应用并开通以下权限:

    • docx:document - 文档操作
    • drive:drive.search:readonly - 云空间搜索
    • search:docs:read - 文档搜索
  2. 使用以下授权链接获取授权码:

https://accounts.feishu.cn/open-apis/authen/v1/authorize?client_id={YOUR_APP_ID}&response_type=code&redirect_uri={YOUR_REDIRECT_URI}&scope=docx:document%20drive:drive.search:readonly%20search:docs:read
  1. 用授权码换取 user_access_token:
curl -X POST "https://open.feishu.cn/open-apis/authen/v1/access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "grant_type": "authorization_code",
    "code": "{YOUR_CODE}",
    "app_id": "{YOUR_APP_ID}",
    "app_secret": "{YOUR_APP_SECRET}"
  }'

使用工具

插件注册后,可使用 feishu_doc_user 工具:

// 读取文档
feishu_doc_user({
  action: "read",
  doc_token: "xxxxx"
})

// 创建文档
feishu_doc_user({
  action: "create",
  title: "新文档"
})

// 写入文档
feishu_doc_user({
  action: "write",
  doc_token: "xxxxx",
  content: "# Hello World\n\n这是文档内容"
})

// 追加内容
feishu_doc_user({
  action: "append",
  doc_token: "xxxxx",
  content: "## 追加的章节"
})

支持的操作

| 操作 | 说明 | |------|------| | read | 读取文档内容 | | write | 写入文档(覆盖原有内容) | | append | 追加内容到文档末尾 | | create | 创建新文档 | | list_blocks | 列出文档中所有块 | | get_block | 获取指定块的详细信息 | | update_block | 更新指定块的内容 | | delete_block | 删除文档中的指定块(⚠️ 仅删除块,不删除文档本身) |

开发

# 安装依赖
pnpm install

# 构建
pnpm build

# 测试
pnpm test

许可证

AIWare Community License - 基于 Apache 2.0,允许商业使用。

相关链接