Skip to content
Back to search

cli

The official Lark/飞书 CLI tool, maintained by the larksuite team — 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 20+ AI Agent Skills.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026. Its scripts were only partly scanned.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/larksuite/cli with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/larksuite/cli'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/larksuite--cli/badge.svg)](/listings/larksuite--cli)

HTML

<a href="/listings/larksuite--cli"><img src="/api/listings/larksuite--cli/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Requirements

Before you start, make sure you have:

- Node.js (`npm`/`npx`) - Go `v1.23`+ and Python 3 (only required for building from source)

Quick Start (Human Users)

> **Note for AI assistants:** If you are an AI Agent helping the user with installation, jump directly to [Quick Start (AI Agent)](#quick-start-ai-agent), which contains all the steps you need to complete.

Install

Choose **one** of the following methods:

**Option 1 — From npm (recommended):**

npx @larksuite/cli@latest install

**Option 2 — From source:**

Requires Go `v1.23`+ and Python 3.

git clone https://github.com/larksuite/cli.git
cd cli
make install

# Install CLI SKILL (required)
npx skills add larksuite/cli -y -g

Configure & Use

# 1. Configure app credentials (one-time, interactive guided setup)
lark-cli config init

# 2. Log in (--recommend auto-selects commonly used scopes)
lark-cli auth login --recommend

# 3. Start using
lark-cli calendar +agenda

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 347 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # lark-cli
  2. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  3. [![Go Version](https://img.shields.io/badge/go-%3E%3D1.23-blue.svg)](https://go.dev/)
  4. [![npm version](https://img.shields.io/npm/v/@larksuite/cli.svg)](https://www.npmjs.com/package/@larksuite/cli)
  5. [中文版](./README.zh.md) | [English](./README.md)
  6. The official [Lark/Feishu](https://www.larksuite.com/) CLI tool, maintained by the [larksuite](https://github.com/larksuite) team — built for humans and AI Agents. Covers core business domains including Messenger, Docs, Base, Sheets, Slides, Calendar, Mail, Tasks, Meetings, Markdown, and more, with 200+ commands and 26 AI Agent [Skills](./skills/).
  7. [Install](#installation--quick-start) · [AI Agent Skills](#agent-skills) · [Auth](#authentication) · [Commands](#three-layer-command-system) · [Advanced](#advanced-usage) · [Enterprise](#personal-or-enterprise) · [Security](#security--risk-warnings-read-before-use) · [Contributing](#contributing)
  8. ## Why lark-cli?
  9. - **Agent-Native Design** — 24 structured [Skills](./skills/) out of the box, compatible with popular AI tools — Agents can operate Lark with zero extra setup
  10. - **Wide Coverage** — 18 business domains, 200+ curated commands, 26 AI Agent [Skills](./skills/)
  11. - **AI-Friendly & Optimized** — Every command is tested with real Agents, featuring concise parameters, smart defaults, and structured output to maximize Agent call success rates
  12. - **Open Source, Zero Barriers** — MIT license, ready to use, just `npm install`
  13. - **Up and Running in 3 Minutes** — One-click app creation, interactive login, from install to first API call in just 3 steps
  14. - **Secure & Controllable** — Input injection protection, terminal output sanitization, OS-native keychain credential storage
  15. - **Three-Layer Architecture** — Shortcuts (human & AI friendly) → API Commands (platform-synced) → Raw API (full coverage), choose the right granularity
  16. ## Personal or Enterprise?
  17. | You are... | Recommended path |
  18. | ---------- | ---------------- |
  19. | **An individual developer** — using lark-cli in your terminal or with your own AI Agent | Follow the [Quick Start](#installation--quick-start) below |
  20. | **Enterprise IT / ISV** — embedding lark-cli into your own Agent or platform, with centralized credentials (database / Vault / config center), unified audit logging, and a restricted command surface | Read [Embed lark-cli in your Agent](https://open.larksuite.com/document/mcp_open_tools/feishu-cli/embed-feishu-cli-in-agent) and the [`extension/`](./extension/) packages — extend via a wrapper `main`, no need to modify CLI source |
  21. > 💡 **For AI Agents:** append `.md` to any Open Platform doc URL to fetch it as raw Markdown, e.g. [`embed-feishu-cli-in-agent.md`](https://open.larksuite.com/document/mcp_open_tools/feishu-cli/embed-feishu-cli-in-agent.md).
  22. ## Features
  23. | Category | Capabilities |
  24. | ------------- |-----------------------------------------------------------------------------------------------------------------------------------|
  25. | 📅 Calendar | View, create and update events, invite attendees, find meeting rooms, RSVP to invitations, check free/busy & time suggestions |
  26. | 💬 Messenger | Send/reply messages, create and manage group chats, view chat history & threads, search messages, download media |
  27. | 📄 Docs | Create, read, update, and search documents, read/write media & whiteboards |
  28. | 📁 Drive | Upload and download files, search docs & wiki, manage comments |
  29. | 📝 Markdown | Create, fetch, patch, and overwrite Drive-native `.md` files |
  30. | 📊 Base | Create and manage tables, fields, records, views, dashboards, workflows, forms, roles & permissions, data aggregation & analytics |
  31. | 📈 Sheets | Create, read, write, append, find, and export spreadsheet data |
  32. | 🖼️ Slides | Create and manage presentations, read presentation content, and add or remove slides |
  33. | ✅ Tasks | Create, query, update, and complete tasks; manage task lists, subtasks, comments & reminders |
  34. | 📚 Wiki | Create and manage knowledge spaces, nodes, and documents |
  35. | 👤 Contact | Search users by name/email/phone, get user profiles |
  36. | 📧 Mail | Browse, search, read emails, send, reply, forward, manage drafts, watch new mail |
  37. | 🎥 Meetings | Search live and historical meetings, inspect participants and artifacts, analyze transcripts, manage Minutes, and assist in meetings |
  38. | 🕐 Attendance | Query personal attendance check-in records |
  39. | ✍️ Approval | Query approval tasks, approve/reject/transfer tasks, cancel and CC instances |
  40. | 🎯 OKR | Query, create, update OKRs; manage objective & key results, alignments, indicators and progress. |
  41. | 📋 Project | Meegle — manage work items, schedules, and data via the standalone [meegle-cli](https://github.com/larksuite/meegle-cli) (install separately) |
  42. | 🔗 Apps | Create Spark/Miaoda apps, publish HTML/static sites, run cloud generation, and manage access scope |
  43. ## Installation & Quick Start
  44. ### Requirements
  45. Before you start, make sure you have:
  46. - Node.js (`npm`/`npx`)
  47. - Go `v1.23`+ and Python 3 (only required for building from source)
  48. ### Quick Start (Human Users)
  49. > **Note for AI assistants:** If you are an AI Agent helping the user with installation, jump directly to [Quick Start (AI Agent)](#quick-start-ai-agent), which contains all the steps you need to complete.
  50. #### Install
  51. Choose **one** of the following methods:
  52. **Option 1 — From npm (recommended):**
  53. ```bash
  54. npx @larksuite/cli@latest install
  55. ```
  56. **Option 2 — From source:**
  57. Requires Go `v1.23`+ and Python 3.
  58. ```bash
  59. git clone https://github.com/larksuite/cli.git
  60. cd cli
  61. make install
  62. # Install CLI SKILL (required)
  63. npx skills add larksuite/cli -y -g
  64. ```
  65. #### Configure & Use
  66. ```bash
  67. # 1. Configure app credentials (one-time, interactive guided setup)
  68. lark-cli config init
  69. # 2. Log in (--recommend auto-selects commonly used scopes)
  70. lark-cli auth login --recommend
  71. # 3. Start using
  72. lark-cli calendar +agenda
  73. ```
  74. ## Quick Start (AI Agent)
  75. > The following steps are for AI Agents. Some steps require the user to complete actions in a browser.
  76. **Step 1 — Install**
  77. ```bash
  78. npx @larksuite/cli@latest install
  79. ```
  80. **Step 2 — Configure app credentials**
  81. > Run this command in the background. It will output an authorization URL — extract it and send it to the user. The command exits automatically after the user completes the setup in the browser.
  82. ```bash
  83. lark-cli config init --new
  84. ```
  85. **Step 3 — Login**
  86. > Same as above: run in the background, extract the authorization URL and send it to the user.
  87. ```bash
  88. lark-cli auth login --recommend
  89. ```
  90. **Step 4 — Verify**
  91. ```bash
  92. lark-cli auth status
  93. ```
  94. ## Agent Skills
  95. | Skill | Description |
  96. | ------------------------------- |----------------------------------------------------------------------------------------------------------------|
  97. | `lark-shared` | App config, auth login, identity switching, scope management, security rules (auto-loaded by all other skills) |
  98. | `lark-calendar` | Calendar events (create/update), agenda view, free/busy queries, time suggestions, room finding, RSVP replies |
  99. | `lark-im` | Send/reply messages, group chat management, message search, upload/download images & files, reactions |
  100. | `lark-doc` | Create, read, update, search documents (Markdown-based) |
  101. | `lark-drive` | Upload, download files, manage permissions & comments |
  102. | `lark-markdown` | Create, fetch, patch, and overwrite Drive-native Markdown files |
  103. | `lark-sheets` | Create, read, write, append, find, export spreadsheets |
  104. | `lark-slides` | Create and manage presentations, read presentation content, and add or remove slides |
  105. | `lark-base` | Tables, fields, records, views, dashboards, data aggregation & analytics |
  106. | `lark-task` | Tasks, task lists, subtasks, reminders, member assignment |
  107. | `lark-mail` | Browse, search, read emails, send, reply, forward, draft management, watch new mail |
  108. | `lark-contact` | Search users by name/email/phone, get user profiles |
  109. | `lark-wiki` | Knowledge spaces, nodes, documents |
  110. | `lark-event` | Real-time event subscriptions (WebSocket), regex routing & agent-friendly format |
  111. | `lark-meeting` | Search live or historical meetings, inspect participants and artifacts, analyze transcripts, manage Minutes, and assist in meetings |
  112. | `lark-whiteboard` | Whiteboard/chart DSL rendering |
  113. | `lark-openapi-explorer` | Explore underlying APIs from official docs |
  114. | `lark-skill-maker` | Custom skill creation framework |
  115. | `lark-attendance` | Query personal attendance check-in records |
  116. | `lark-approval` | Query approval tasks, approve/reject/transfer tasks, cancel and CC instances |
  117. | `lark-workflow-meeting-summary` | Workflow: meeting minutes aggregation & structured report |
  118. | `lark-workflow-standup-report` | Workflow: agenda & todo summary |
  119. | `lark-okr` | Query, create, update OKRs; manage objective & key results, alignments and indicators. |
  120. ## Authentication
  121. | Command | Description |
  122. | ------------- | -------------------------------------------------------------- |
  123. | `auth login` | OAuth login with interactive selection or CLI flags for scopes |
  124. | `auth logout` | Sign out and remove stored credentials |
  125. | `auth status` | Show current login status and granted scopes |
  126. | `auth check` | Verify a specific scope (exit 0 = ok, 1 = missing) |
  127. | `auth scopes` | List all available scopes for the app |
  128. | `auth list` | List all authenticated users |
  129. ```bash
  130. # Interactive login (TUI guides domain and permission level selection)
  131. lark-cli auth login
  132. # Filter by domain
  133. lark-cli auth login --domain calendar,task
  134. # Recommended auto-approval scopes
  135. lark-cli auth login --recommend
  136. # Exact scope
  137. lark-cli auth login --scope "calendar:calendar:read"
  138. # Agent mode: return verification URL immediately, non-blocking
  139. lark-cli auth login --domain calendar --no-wait
  140. # Resume polling later
  141. lark-cli auth login --device-code <DEVICE_CODE>
  142. # DPoP (Demonstrating Proof of Possession) is enabled in preferred mode by default for new local credentials
  143. lark-cli config set dpop preferred
  144. # Or disable DPoP
  145. lark-cli config set dpop disabled
  146. # Or require DPoP without Bearer fallback
  147. lark-cli config set dpop required
  148. # Re-authorize after choosing a different policy
  149. lark-cli auth login
  150. # Identity switching: execute commands as user or bot
  151. lark-cli calendar +agenda --as user
  152. lark-cli im +messages-send --as bot --chat-id "oc_xxx" --text "Hello"
  153. ```
  154. ## Three-Layer Command System
  155. The CLI provides three levels of granularity, covering everything from quick operations to fully custom API calls:
  156. ### 1. Shortcuts
  157. Prefixed with `+`, designed to be friendly for both humans and AI, with smart defaults, table output, and dry-run previews.
  158. ```bash
  159. lark-cli calendar +agenda
  160. lark-cli im +messages-send --chat-id "oc_xxx" --text "Hello"
  161. lark-cli docs +create --doc-format markdown --content $'<title>Weekly Report</title>\n# Progress\n- Completed feature X'
  162. ```
  163. Run `lark-cli <service> --help` to see all shortcut commands.
  164. ### 2. API Commands
  165. Auto-generated from Lark OAPI metadata, curated through evaluation and quality gates — 100+ commands mapped 1:1 to platform endpoints.
  166. ```bash
  167. lark-cli calendar calendars list
  168. lark-cli calendar events instance_view --params '{"calendar_id":"primary","start_time":"1700000000","end_time":"1700086400"}'
  169. ```
  170. ### 3. Raw API Calls
  171. Call any Lark Open Platform endpoint directly, covering 2500+ APIs.
  172. ```bash
  173. lark-cli api GET /open-apis/calendar/v4/calendars
  174. lark-cli api POST /open-apis/im/v1/messages --params '{"receive_id_type":"chat_id"}' --data '{"receive_id":"oc_xxx","msg_type":"text","content":"{\"text\":\"Hello\"}"}'
  175. ```
  176. ## Advanced Usage
  177. ### Output Formats
  178. ```bash
  179. --format json # Full JSON response (default)
  180. --format pretty # Human-friendly formatted output
  181. --format table # Readable table
  182. --format ndjson # Newline-delimited JSON (for piping)
  183. --format csv # Comma-separated values
  184. ```
  185. ### JSON Output Contract
  186. With `--format json` (the default), success and error envelopes are distinct.
  187. Success goes to **stdout**, exit code `0`:
  188. ```json
  189. { "ok": true, "identity": "user", "data": { "guid": "..." }, "meta": { "count": 1 } }
  190. ```
  191. Errors go to **stderr**, non-zero exit code:
  192. ```json
  193. { "ok": false, "identity": "user", "error": { "type": "api", "subtype": "...", "code": 99991679, "message": "...", "hint": "..." } }
  194. ```
  195. To check whether a command succeeded, test `ok == true` (or the exit code) — **not** `code == 0`. Unlike raw OpenAPI responses (`{"code": 0, "msg": "ok", ...}`), the success envelope carries no `code` or `msg` field; `code` appears only inside `error` as the upstream OpenAPI code. See [errs/ERROR_CONTRACT.md](errs/ERROR_CONTRACT.md) for the full error taxonomy.
  196. ### Pagination
  197. ```bash
  198. --page-all # Auto-paginate through all pages
  199. --page-limit 5 # Max 5 pages
  200. --page-delay 500 # 500ms between page requests
  201. ```
  202. ### Dry Run
  203. For commands that may have side effects, preview the request with --dry-run first:
  204. ```bash
  205. lark-cli im +messages-send --chat-id oc_xxx --text "hello" --dry-run
  206. ```
  207. ### Schema Introspection
  208. Use schema to inspect any API method's parameters, request body, response structure, supported identities, and scopes:
  209. ```bash
  210. lark-cli schema
  211. lark-cli schema calendar.events.instance_view
  212. lark-cli schema im.messages.delete
  213. ```
  214. ## Security & Risk Warnings (Read Before Use)
  215. 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.
  216. 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.
  217. 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.
  218. To reduce the security risks associated with access token theft, the CLI sends a minimal set of risk-control signals with OpenAPI requests made to exact official Feishu/Lark HTTPS domains. These signals are used to help identify anomalous API activity. This protection is enabled by default. The information sent is limited to:
  219. - Operating system type: macOS, Windows, or Linux
  220. - Device hardware model: for example, Mac17,9
  221. To disable this protection for the current workspace, run:
  222. ```bash
  223. lark-cli config risk-control off
  224. ```
  225. To enable this protection for the current workspace, run:
  226. ```bash
  227. lark-cli config risk-control on
  228. ```
  229. To restore the default policy for the current workspace, run:
  230. ```bash
  231. lark-cli config risk-control default
  232. ```
  233. Please fully understand all usage risks. By using this tool, you are deemed to voluntarily assume all related responsibilities.
  234. ## Contributing
  235. Community contributions are welcome! If you find a bug or have feature suggestions, please submit an [Issue](https://github.com/larksuite/cli/issues) or [Pull Request](https://github.com/larksuite/cli/pulls).
  236. For major changes, we recommend discussing with us first via an Issue.
  237. Before opening a PR, see [AGENTS.md](./AGENTS.md) for the local build, test, and PR checklist used by contributors and AI agents.
  238. ## License
  239. This project is licensed under the **MIT License**.
  240. When running, it calls Lark/Feishu Open Platform APIs. To use these APIs, you must comply with the following agreements and privacy policies:
  241. - [Feishu User Terms of Service](https://www.feishu.cn/terms)
  242. - [Feishu Privacy Policy](https://www.feishu.cn/privacy)
  243. - [Feishu Open Platform App Service Provider Security Management Specifications](https://open.feishu.cn/document/uAjLw4CM/uMzNwEjLzcDMx4yM3ATM/management-practice/app-service-provider-security-management-specifications)
  244. - [Lark User Terms of Service](https://www.larksuite.com/user-terms-of-service)
  245. - [Lark Privacy Policy](https://www.larksuite.com/privacy-policy)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.