← Browse

@wecomteam/wecom-cli

A

企业微信命令行工具 — 让人类和 AI Agent 都能在终端中操作企业微信。

instructionscodex

Install

agr install @wecomteam/wecom-cli --target codex

Writes 1 file into AGENTS.md, pinned to git-e0d9f3f9.

  • AGENTS.md

Document

AI Agent 指引

本文件帮助 AI Agent 快速定位项目关键文件,避免阅读无关代码。

项目概述

wecom-cli 是一个企业微信 CLI 工具(Rust),通过 JSON-RPC 调用远程 MCP 服务。CLI 结构为:

wecom <category> <method>          # 远程工具调用
wecom <category> +<helper_name>    # 本地 helper(+ 前缀)

任务路由

根据任务类型,阅读对应指引文件即可,不需要阅读其他文件

任务指引文件你需要修改的文件
新建/维护现有 helpersrc/helpers/AGENTS.md对应 helper 的 .rs 文件
理解人类的需求格式src/helpers/HUMANS.md

项目结构速查

src/
├── main.rs                # CLI 入口,构建 clap Command
├── json_rpc.rs            # 远程调用:call_tool(category, method, args)
├── fs_util/               # 文件系统工具(atomic_write, sanitize_filename)
├── service/
│   └── handler.rs         # 调度逻辑:helper 优先 → fallback 远程调用
└── helpers/               # ⭐ Helper 子系统(详见 helpers/AGENTS.md)
    ├── mod.rs             # 模块声明
    ├── registry.rs        # Helper trait + HelperRegistry
    ├── AGENTS.md          # AI 实现指南(核心文档)
    └── <category>/        # 按 category 分目录存放 helper

注意事项

  • 不要修改 main.rsservice/ 下的文件:helper 系统通过 registry 自动注册,无需改动调度层
  • 用户的需求描述格式参考 src/helpers/HUMANS.md,除非用户直接声明,否则你无需阅读这篇文档

Repository README

Describes WecomTeam/wecom-cli as a whole, which may contain artifacts other than this one. Where this artifact had no useful description of its own, its summary was taken from here.

wecom-cli

License: MIT Rust

💬 扫码加入企业微信交流群:

企业微信命令行工具 — 让人类和 AI Agent 都能在终端中操作企业微信。

功能范围

覆盖企业微信核心业务品类:

品类能力
📄 文档文档创建、读取、编辑等;智能文档创建、读取
📊 智能表格智能表格创建、子表与字段管理、记录增删改查等
💬 消息会话列表查询、消息记录拉取(文本/图片/文件/语音/视频)、多媒体下载、发送文本等
👤 通讯录获取可见范围成员列表、按姓名/别名搜索等
✅ 待办创建/读取/更新/删除待办,变更用户处理状态等
🎥 会议创建预约会议、取消会议、更新受邀成员、查询列表与详情等
📅 日程日程增删改查、参与人管理、多成员闲忙查询等

企业场景: 对于 10 人以上规模的企业,企业微信为 API 模式智能机器人提供了文档和待办CLI 能力,机器人可以创建及读取文档、创建并跟进待办,提高企业场景下的办公效率。

个人/小团队场景: 对于10人及以下的个人/小团队,企业微信为API模式智能机器人提供了消息、文档、日程、会议、待办等CLI能力,以满足个人或小团队提效场景。

快速开始

前置条件

  • 支持平台:macOS (x64/arm64)、Linux (x64/arm64) 及 Windows (x64)
  • Node.js >= 18
  • 企业微信账号
  • (可选)智能机器人 Bot ID 和 Secret,获取方式参考 说明

安装 & 使用

# 安装 CLI
npm install -g @wecom/cli

# 安装 CLI Skill(必需)
npx skills add WeComTeam/wecom-cli -y -g

# 配置凭证(交互式,仅需一次)
wecom-cli init

# 获取通讯录可见范围内的成员列表
wecom-cli contact get_userlist '{}'

📖 更多使用方法,请参阅 CLI 命令参考

Agent Skills

🤖 支持的 Skills 使用说明,请参阅 Skills 文档

许可证

本项目基于 MIT 许可证 开源。

Trustgrade A

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • passLicense

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-e0d9f3f9ae4b2026-08-06