Send messages, manage group chats, search conversations, reply to threads, and download media — all from the command line or through AI Agent automation.
The Feishu CLI messenger module provides 10 shortcut commands for comprehensive instant messaging control. Send text, markdown, images, and files to group chats or individual users. Manage group creation, search message history, and handle media downloads — all from the command line or through AI Agent automation. Every shortcut maps directly to the Lark Open Platform IM API, giving you full programmatic access to Feishu/Lark messaging.
Send text, markdown, images, files, video, or audio to any group chat or individual user. The bot identity is used by default. You can target a group chat with --chat-id or a specific user with --user-id.
| Parameter | Description |
|---|---|
--chat-id | Target group chat ID (oc_xxx format) |
--user-id | Target user ID for direct messages (ou_xxx format) |
--text | Send plain text message |
--markdown | Send markdown-formatted message |
--image | Send an image file (local path) |
--file | Send a file attachment (local path) |
--video | Send a video file (local path) |
--audio | Send an audio file (local path) |
--content | Send raw JSON content payload |
--idempotency-key | Unique key to prevent duplicate sends |
Identity: Bot identity only (--as bot). The sender name displays as the bot’s configured name.
Reply to a specific message by its message ID. Supports all the same content types as +messages-send. Replies appear as threaded responses in the conversation.
Full-text search across message history. Filter by chat, sender, and date range. Requires user identity — bot identity is not supported for search.
| Parameter | Description |
|---|---|
--query | Search query string (required) |
--chat-id | Limit search to a specific chat |
--sender | Filter by sender user ID |
--start | Start date for date range filter |
--end | End date for date range filter |
--page-token | Pagination token for next page |
Identity: User identity only. Bot identity cannot perform message searches.
Retrieve all messages from a group chat or P2P conversation within a date range. Use --chat-id for group chats or --user-id for direct message history.
Programmatically create group chats with a name, description, and initial members. Uses bot identity.
Search for group chats by name or keyword. Useful for finding the right chat ID before sending messages.
Modify a group chat’s name, description, or other settings after creation.
Download images, files, and other media attached to messages. Requires the message ID, file key, and resource type.
Retrieve all replies within a specific message thread. Threads are identified by their thread ID (ot_xxx format).
Fetch multiple messages by their IDs in a single request. Efficient for retrieving specific messages without listing an entire chat.
Feishu CLI messaging commands operate under two identity modes. Understanding the difference is important for choosing the right approach.
| Feature | Bot Identity | User Identity |
|---|---|---|
| Send messages | Yes | No |
| Reply to messages | Yes | No |
| Search messages | No | Yes |
| Create group chats | Yes | No |
| List chat messages | Yes | Yes |
| Download media | Yes | Yes |
When using bot identity, the sender name is the bot’s configured display name. To resolve human-readable sender names in listed messages, you may need to cross-reference user IDs with the contact API.
| Shortcut | Description | Risk | Key Parameters |
|---|---|---|---|
+messages-send | Send a message to a chat or user | Low | --chat-id, --user-id, --text, --markdown, --image, --file |
+messages-reply | Reply to a specific message | Low | --message-id, --text, --markdown |
+messages-search | Full-text search across messages | Safe | --query, --chat-id, --sender, --start, --end |
+chat-messages-list | List messages in a chat | Safe | --chat-id, --user-id, --start, --end |
+chat-create | Create a new group chat | Medium | --name, --description, --users |
+chat-search | Search for group chats | Safe | --query |
+chat-update | Update chat name or description | Medium | --chat-id, --name, --description |
+messages-resources-download | Download message attachments | Safe | --message-id, --file-key, --type |
+threads-messages-list | List messages in a thread | Safe | --thread |
+messages-mget | Batch retrieve messages by ID | Safe | --message-ids |