# wecom-cli: A Terminal Interface for WeCom Messaging, Documents, and Meetings

> wecom-cli is a Rust-backed npm CLI tool for the WeCom (Enterprise WeChat) open platform, covering messages, email, documents, spreadsheets, calendar, meetings, cloud drive, and contacts in a single command-line interface. It also exposes an agent skill interface for AI automation workflows.

**WecomTeam/wecom-cli** — 企业微信开放平台命令行工具 — 让人类和 AI Agent 都能在终端中操作企业微信

- Repository: https://github.com/WecomTeam/wecom-cli
- Stars: 3,146 · Forks: 214
- Language: Rust
- License: MIT
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/wecomteam-wecom-cli

## What wecom-cli Does and Who It Serves

wecom-cli is a command-line tool for the WeCom (Enterprise WeChat) open platform, covering twelve business function categories: messages, email, online documents, document management, online spreadsheets, smart tables, smart docs, tasks, calendar, meetings, cloud drive, and contacts. The tool is designed for use by both human operators in a terminal and by AI agents through a skill interface.

The primary audience is enterprise engineering and operations teams that use WeCom as their collaboration platform and want to automate routine tasks, run notifications from CI/CD pipelines, script document workflows, or integrate WeCom actions into larger AI-driven workflows. The README describes the goal as improving enterprise office efficiency through terminal control of WeCom's core services.

The tool is published on npm as @wecom/cli, version 1.3.4 at the time of this writing, and supports macOS (x64 and arm64), Linux (x64 and arm64), and Windows (x64).

## Feature Coverage Across Twelve WeCom Modules

The README includes a table mapping each category to its specific capabilities. The messages module supports pushing notifications to both direct chats and group chats that the bot has recently interacted with, in Markdown, image, file, audio, and video formats.

The email module covers sending, replying, and forwarding email, searching email, and retrieving full email content. The document module handles creating, importing, reading, appending to, and overwriting online documents. Document management adds search across document types and manages naming, member permissions, and join rules.

The online spreadsheet module supports creating sheets, importing from CSV and Excel, reading and modifying content, appending rows, and managing sub-sheets. Smart tables add field, record, view, and chart management on top of that. The calendar module provides full schedule management (create/read/update/delete), participant management, free/busy queries across multiple members, and meeting room reservations.

The meetings module covers creating and canceling meetings, updating participants, and retrieving meeting transcripts and raw transcription text. The cloud drive (Weixin) module handles file search, upload, and download. The contacts module supports searching members by name, pinyin, or alias and retrieving member details.

## Installing and Authenticating wecom-cli

The tool is distributed as an npm package. Install it globally with:

```bash
npm install -g @wecom/cli
```

After installation, add the CLI Skill (required for the agent workflow integration):

```bash
npx skills add WeComTeam/wecom-cli -y -g
```

Configure credentials with the interactive authentication flow, which needs to be run only once:

```bash
wecom-cli auth init
```

The default authentication method uses a QR code scan. Passing --manual to the init command enables manual credential entry. After configuration, verify the authentication state:

```bash
wecom-cli auth show
```

The README lists the prerequisites: Node.js 18 or later, a WeCom account, and optionally a bot ID and Secret for the messaging module. Instructions for obtaining the bot credentials are linked in the README to the WeCom open platform documentation.

## AI Agent Skill Integration

Beyond the human-facing CLI, wecom-cli exposes a skills interface for AI agent integration. The repository includes a skills/ directory and an AGENTS.md file, and the README links to docs/skills.md for the Agent Skills documentation. The tool appears in community search data under the phrase "wecom cli ai agent," confirming that this use case is actively relevant.

The skills mechanism allows AI agents to call WeCom operations as structured tool calls, for example to send a notification, look up a colleague's schedule, create a meeting, or retrieve a document. The same credential setup from wecom-cli auth init is used for agent authentication, so no separate configuration is required for the agent path.

This dual-mode design (human CLI and agent skill) makes wecom-cli suitable for teams that are building AI-assisted workflows on top of WeCom, where the agent handles document creation or meeting scheduling while a human reviews results from the same terminal environment.

## Architecture: Rust Core with npm Packaging

The Cargo.toml workspace shows that the implementation is split across five Rust crates: wecom (the core API client library), wecom-cli (the CLI interface), wecom-error (error types), wecom-fs (filesystem utilities), and wecom-transport (the HTTP transport layer, using reqwest with rustls). The workspace dependency on tokio version 1.50.0 with the full feature set confirms the async runtime.

The npm packaging in package.json wraps the Rust binary under the name @wecom/cli and distributes it as a Node.js module with a JavaScript entry point at bin/wecom.js. This allows installation via npm without requiring users to have a Rust toolchain installed.

The build toolchain enforces code quality: the package.json scripts include cargo clippy for linting (with -D warnings to treat warnings as errors) and rustfmt for formatting. lefthook manages pre-commit hooks. The test script runs cargo test with a custom-endpoint feature flag. A second test script variant (test:skip-auth-check) is available for environments where the WeCom authentication check needs to be bypassed during testing, such as in CI pipelines without credentials. The release profile in Cargo.toml strips debug symbols and enables link-time optimization, producing a compact binary for distribution.

## wecom-cli vs Lark CLI and Data Collection Notes

Lark (also known as Feishu in China) is the most comparable enterprise collaboration platform with its own CLI tool, and it appears directly in the related search data alongside wecom-cli. Lark is a different enterprise collaboration product from ByteDance targeting similar office use cases, including messages, documents, meetings, and calendar. The qualitative difference is that wecom-cli is tied specifically to the WeCom (Tencent Enterprise WeChat) platform and its open API, while a Lark CLI targets the Lark platform. The two are not interchangeable: WeCom accounts cannot use a Lark CLI and vice versa.

The README includes a section noting the existence of a data collection policy, with a link to docs/data-collection.md. This file is referenced for transparency about what the tool transmits when in use. Engineers in compliance-sensitive organizations should review that documentation before deploying wecom-cli in production environments.

The repository is MIT-licensed. The last push was on 2026-09-24. The CHANGELOG.md tracks changes, and the .changeset/ directory shows that the project uses changesets for release management, though no GitHub releases have been published at this time.

## Conclusion

wecom-cli is the right choice for WeCom-based organizations that want to automate office tasks from a terminal or integrate WeCom functionality into AI agent workflows. The twelve-category coverage means most common WeCom operations can be scripted without building a custom API client. The prerequisite is an existing WeCom account with access to the open platform; engineers in organizations that use Lark/Feishu instead of WeCom will need a different tool. Before starting, confirm that the required WeCom open platform credentials (bot ID and secret for messaging) are available, and check the docs/data-collection.md file to understand what data the tool transmits.

## FAQ

### How do I install wecom-cli?

Install it globally via npm with npm install -g @wecom/cli, then run npx skills add WeComTeam/wecom-cli -y -g to add the CLI Skill. Run wecom-cli auth init once to configure your WeCom credentials. Node.js 18 or later is required.

### Can wecom-cli be used by AI agents?

Yes. The repository includes a skills/ directory and an AGENTS.md file, and the README links to docs/skills.md for the Agent Skills documentation. The tool supports both human terminal use and AI agent invocation through the same credential configuration.

### What WeCom operations can wecom-cli perform?

wecom-cli covers twelve functional modules: messages (Markdown, images, files, audio, video), email, online documents, document management, online spreadsheets, smart tables, smart docs, tasks, calendar, meetings, cloud drive file operations, and contacts. Each module maps to specific WeCom open platform API operations.

## Sources

- [Issues](https://github.com/WecomTeam/wecom-cli/issues)
- [License: MIT](https://github.com/WecomTeam/wecom-cli/blob/main/LICENSE)
- [README](https://github.com/WecomTeam/wecom-cli/blob/main/README.md)
- [WecomTeam/wecom-cli on GitHub](https://github.com/WecomTeam/wecom-cli)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/wecomteam-wecom-cli
