← 返回导航页

larksuite-cli

larksuite/cli

A command-line tool for Lark/Feishu Open Platform — built for humans and AI Agents. Covers core business domains including Messenger, Docs, Base, Sheets, Calendar, Mail, Tasks, Meetings, and more, with 200+ commands and 19 AI Agent Skills.

中文版 | English

Install · AI Agent Skills · Auth · Commands · Advanced · Security · Contributing

Capabilities

Category Capabilities
📅 Calendar View agenda, create events, invite attendees, check free/busy status, time suggestions
💬 Messenger Send/reply messages, create and manage group chats, view chat history & threads, search messages, download media
📄 Docs Create, read, update, and search documents, read/write media & whiteboards
📁 Drive Upload and download files, search docs & wiki, manage comments
📊 Base Create and manage tables, fields, records, views, dashboards, data aggregation & analytics
📈 Sheets Create, read, write, append, find, and export spreadsheet data
✅ Tasks Create, query, update, and complete tasks; manage task lists, subtasks, comments & reminders
📚 Wiki Create and manage knowledge spaces, nodes, and documents
👤 Contact Search users by name/email/phone, get user profiles
📧 Mail Browse, search, read emails, send, reply, forward, manage drafts, watch new mail
🎥 Meetings Search meeting records, query meeting minutes & recordings

Quick start

Before you start, make sure you have:

Quick Start (AI Agent)

Step 1 — Install

npm install -g @larksuite/cli
npx skills add larksuite/cli -y -g

Step 2 — Configure app credentials

lark-cli config init --new

Step 3 — Login

lark-cli auth login --recommend

Step 4 — Verify

lark-cli auth status

AI Agent Skills

Command examples

Authentication

lark-cli auth login
lark-cli auth logout
lark-cli auth status
lark-cli auth check
lark-cli auth scopes
lark-cli auth list

Identity switching

lark-cli calendar +agenda --as user
lark-cli im +messages-send --as bot --chat-id "oc_xxx" --text "Hello"

Three-layer command system

Prefixed with +, designed to be friendly for both humans and AI, with smart defaults, table output, and dry-run previews.

lark-cli calendar +agenda
lark-cli im +messages-send --chat-id "oc_xxx" --text "Hello"
lark-cli docs +create --title "Weekly Report" --markdown "# Progress\n- Completed feature X"

Auto-generated from Lark OAPI metadata, curated through evaluation and quality gates — 100+ commands mapped 1:1 to platform endpoints.

lark-cli calendar calendars list
lark-cli calendar events instance_view --params '{"calendar_id":"primary","start_time":"1700000000","end_time":"1700086400"}'

Call any Lark Open Platform endpoint directly, covering 2500+ APIs.

lark-cli api GET /open-apis/calendar/v4/calendars
lark-cli api POST /open-apis/im/v1/messages --params '{"receive_id_type":"chat_id"}' --body '{"receive_id":"oc_xxx","msg_type":"text","content":"{\"text\":\"Hello\"}"}'

Output formats

Pagination

Dry run

lark-cli im +messages-send --chat-id oc_xxx --text "hello" --dry-run

Schema

lark-cli schema
lark-cli schema calendar.events.instance_view
lark-cli schema im.messages.delete

Security

This tool can be invoked by AI Agents to automate operations on the Lark/Feishu Open Platform, and carries inherent risks such as model hallucinations, unpredictable execution, and prompt injection. After you authorize Lark/Feishu permissions, the AI Agent will act under your user identity within the authorized scope, which may lead to high-risk consequences such as leakage of sensitive data or unauthorized operations. Please use with caution.

To reduce these risks, the tool enables default security protections at multiple layers. However, these risks still exist. We strongly recommend that you do not proactively modify any default security settings; once relevant restrictions are relaxed, the risks will increase significantly, and you will bear the consequences.

We recommend using the Lark/Feishu bot integrated with this tool as a private conversational assistant. Do not add it to group chats or allow other users to interact with it, to avoid abuse of permissions or data leakage.

Please fully understand all usage risks. By using this tool, you are deemed to voluntarily assume all related responsibilities.

Contributing

Community contributions are welcome! If you find a bug or have feature suggestions, please submit an Issue or Pull Request.

For major changes, we recommend discussing with us first via an Issue.

This project is licensed under the MIT License.

When running, it calls Lark/Feishu Open Platform APIs. To use these APIs, you must comply with the following agreements and privacy policies: