WeCom Open-Sources a CLI: AI Agents Directly Control Messages, Schedules, and Docs

·Toolin Editorial Team

WeCom has open-sourced wecom-cli, letting mainstream AI Agents such as Claude Code, Codex, and QClaw call 7 major categories of office capabilities. Setup takes 3 steps, with complete command examples included.

WeCom Open-Sources a CLI: AI Agents Directly Control Messages, Schedules, and Docs

On March 30, 2026, WeCom officially open-sourced wecom-cli. AI Agents can now call 7 major categories of WeCom office capabilities directly from the command line, including messages, schedules, docs, meetings, to-dos, contacts, and smart sheets. The project is live on GitHub and supports integration with mainstream Agent tools such as Claude Code, Codex, Work Buddy, and QClaw.

GitHub: https://github.com/WecomTeam/wecom-cli

Before You Start

  • A WeCom admin account (to create the bot and obtain the Bot ID and Secret)
  • A Node.js environment (npm available is all you need)
  • Estimated setup time: under 10 minutes
  • Currently geared toward teams of 10 people or fewer

Setup in 3 Steps

Step 1: Create a bot in the WeCom admin console

Log in to the WeCom admin console, create a bot application, and record the Bot ID and Secret -- you will need them during initialization.

Step 2: Install the CLI and the Skill

# Install the CLI
npm install -g @wecom/cli

# Install the CLI Skill (required so the Agent can discover the capability list)
npx skills add WeComTeam/wecom-cli -y -g

Step 3: Initialize and store credentials

wecom-cli init

Enter the Bot ID and Secret interactively; the credentials are stored locally in encrypted form:

~/.config/wecom/bot.enc

Once initialization is done, verify that calls go through:

wecom-cli contact get_userlist '{}'

If a member list comes back, the integration is working.

Command Structure

The overall structure is uniform: wecom-cli <category> <tool> [json_args]

# List all top-level commands
wecom-cli --help

# List the tools under a category
wecom-cli todo
wecom-cli meeting

The 7 Capabilities and Common Commands

Contacts

# Get all visible members
wecom-cli contact get_userlist '{}'

Matching Skill: wecomcli-lookup-contact, usable for follow-up message sending, meeting invitations, and adding participants to schedule entries.

To-Dos

# Query the to-do list
wecom-cli todo get_todo_list '{}'

# Create a to-do (with a reminder time)
wecom-cli todo create_todo '{"content": "Finish the Q2 planning doc", "remind_time": "2026-06-01 09:00:00"}'

# Mark a to-do as done
wecom-cli todo update_todo '{"todo_id": "TODO_ID", "todo_status": 0}'

# Delete a to-do
wecom-cli todo delete_todo '{"todo_id": "TODO_ID"}'

Matching Skills: wecomcli-get-todo-list, wecomcli-get-todo-detail, wecomcli-edit-todo

Meetings

# Query this week's meetings
wecom-cli meeting list_user_meetings '{"begin_datetime": "2026-03-23 00:00", "end_datetime": "2026-03-29 23:59", "limit": 100}'

# Create a scheduled meeting
wecom-cli meeting create_meeting '{"title": "Tech design review", "meeting_start_datetime": "2026-03-30 15:00", "meeting_duration": 3600, "invitees": {"userid": ["zhangsan"]}}'

# Cancel a meeting
wecom-cli meeting cancel_meeting '{"meetingid": "MEETING_ID"}'

Matching Skills: wecomcli-get-meeting-list, wecomcli-manage-meeting

Messages

# Get the conversation list
wecom-cli msg get_conversation_list '{}'

# Fetch messages from a specific conversation
wecom-cli msg get_msg_history '{"conversation_id": "CONV_ID", "limit": 20}'

# Send a text message
wecom-cli msg send_text '{"conversation_id": "CONV_ID", "content": "Meeting minutes are ready"}'

Matching Skills: wecomcli-get-message, wecomcli-send-message

Schedules

# Query the schedule list
wecom-cli schedule get_schedule_list '{"begin_time": "2026-03-30 00:00", "end_time": "2026-03-30 23:59"}'

# Create a schedule entry
wecom-cli schedule add_schedule '{"summary": "Weekly sync", "start_time": "2026-03-30 10:00", "end_time": "2026-03-30 11:00"}'

# Query members' free time
wecom-cli schedule get_user_availability '{"userids": ["zhangsan", "lisi"], "time_min": "2026-03-30 09:00", "time_max": "2026-03-30 18:00"}'

Matching Skills: wecomcli-manage-schedule

Docs

# Create a doc
wecom-cli doc create_doc '{"doc_type": 2, "doc_name": "Q2 planning"}'

# Read doc content (async; get the task_id first)
wecom-cli doc get_doc_content '{"docid": "DOC_ID", "type": 2}'

# Edit a doc
wecom-cli doc edit_doc_content '{"docid": "DOC_ID", "content": "# Title\n\nBody text", "content_type": 1}'

Matching Skill: wecomcli-manage-doc

Smart Sheets

# Create a smart sheet
wecom-cli doc create_doc '{"doc_type": 10, "doc_name": "Task tracker"}'

# Query sub-sheet fields
wecom-cli doc smartsheet_get_fields '{"docid": "DOC_ID", "sheet_id": "SHEET_ID"}'

# Add records
wecom-cli doc smartsheet_add_records '{"docid": "DOC_ID", "sheet_id": "SHEET_ID", "records": [{"values": {"Title": [{"type": "text", "text": "New task"}]}}]}'

# Update records
wecom-cli doc smartsheet_update_records '{"docid": "DOC_ID", "sheet_id": "SHEET_ID", "key_type": "CELL_VALUE_KEY_TYPE_FIELD_TITLE", "records": [{"record_id": "RECORD_ID", "values": {"Title": [{"type": "text", "text": "Updated"}]}}]}'

# Delete records
wecom-cli doc smartsheet_delete_records '{"docid": "DOC_ID", "sheet_id": "SHEET_ID", "record_ids": ["RECORD_ID"]}'

Matching Skills: wecomcli-manage-smartsheet-schema, wecomcli-manage-smartsheet-data

Typical Automation Scenarios

Examples of multi-step workflows you can hand straight to an Agent:

Meeting minutes automation: pull the meeting message history → generate minutes → write them into a WeCom doc → extract action items from the minutes → create a to-do with a reminder time → send a message to notify everyone involved

Schedule conflict detection: query multiple people's free time → find a mutually available slot → book the meeting automatically and send invitations

Project progress sync: read task statuses from the smart sheet → summarize progress → generate a weekly report doc → send it to the designated group

Relationship with MCP

wecom-cli and MCP are not mutually exclusive. The CLI fits Agent environments that can access a terminal (Claude Code, Codex) -- lightweight and context-free; MCP fits environments that cannot access a terminal (Claude Desktop). Pick between them based on where the Agent runs.

With 12 pre-packaged Skills, tools like Claude Code, Codex, and QClaw can recognize and invoke these capabilities with no extra configuration.