{"_id":"@larksuite/cli","_rev":"4252383","name":"@larksuite/cli","description":"The official CLI for Lark/Feishu open platform","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"bytednpm","email":""},{"name":"liangshuo.0","email":""},{"name":"max_huang","email":""},{"name":"mazhe.nerd","email":""},{"name":"qianzhicheng95","email":""},{"name":"zkh_bytedance","email":""}],"time":{"modified":"2026-04-02T02:17:15.000Z","created":"2026-03-28T02:46:11.270Z","1.0.2":"2026-04-01T15:17:51.715Z","1.0.1":"2026-03-31T13:54:10.626Z","1.0.0":"2026-03-28T02:46:11.270Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/larksuite/cli.git"},"versions":{"1.0.2":{"name":"@larksuite/cli","version":"1.0.2","description":"The official CLI for Lark/Feishu open platform","bin":{"lark-cli":"scripts/run.js"},"scripts":{"postinstall":"node scripts/install.js"},"os":["darwin","linux","win32"],"cpu":["x64","arm64"],"engines":{"node":">=16"},"repository":{"type":"git","url":"git+https://github.com/larksuite/cli.git"},"license":"MIT","_id":"@larksuite/cli@1.0.2","gitHead":"eda2b9cd85dd5548646df770c5bc950bdef886fb","bugs":{"url":"https://github.com/larksuite/cli/issues"},"homepage":"https://github.com/larksuite/cli#readme","_nodeVersion":"20.20.1","_npmVersion":"10.8.2","dist":{"shasum":"7d342109f870ba6aec92b15898d1a0f0649accc8","size":13771,"noattachment":false,"key":"/@larksuite/cli/-/@larksuite/cli-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@larksuite/cli/download/@larksuite/cli-1.0.2.tgz"},"_npmUser":{"name":"qianzhicheng95","email":"qianzhicheng@bytedance.com"},"directories":{},"maintainers":[{"name":"bytednpm","email":""},{"name":"liangshuo.0","email":""},{"name":"max_huang","email":""},{"name":"mazhe.nerd","email":""},{"name":"qianzhicheng95","email":""},{"name":"zkh_bytedance","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_1.0.2_1775056671559_0.3850934004792468"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-04-01T15:17:51.715Z","publish_time":1775056671715,"_source_registry_name":"default","_cnpm_publish_time":1775056671715},"1.0.1":{"name":"@larksuite/cli","version":"1.0.1","description":"The official CLI for Lark/Feishu open platform","bin":{"lark-cli":"scripts/run.js"},"scripts":{"postinstall":"node scripts/install.js"},"os":["darwin","linux","win32"],"cpu":["x64","arm64"],"engines":{"node":">=16"},"repository":{"type":"git","url":"git+https://github.com/larksuite/cli.git"},"license":"MIT","_id":"@larksuite/cli@1.0.1","gitHead":"bdd39b01961f8881e7afdb60991f99ed382fb026","bugs":{"url":"https://github.com/larksuite/cli/issues"},"homepage":"https://github.com/larksuite/cli#readme","_nodeVersion":"20.20.1","_npmVersion":"10.8.2","dist":{"shasum":"38df8844e8dd16c8cd1bb65cef1c4a452c1ece82","size":13554,"noattachment":false,"key":"/@larksuite/cli/-/@larksuite/cli-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@larksuite/cli/download/@larksuite/cli-1.0.1.tgz"},"_npmUser":{"name":"qianzhicheng95","email":"qianzhicheng@bytedance.com"},"directories":{},"maintainers":[{"name":"bytednpm","email":""},{"name":"liangshuo.0","email":""},{"name":"max_huang","email":""},{"name":"mazhe.nerd","email":""},{"name":"qianzhicheng95","email":""},{"name":"zkh_bytedance","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_1.0.1_1774965250472_0.9937276091987262"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-31T13:54:10.626Z","publish_time":1774965250626,"_source_registry_name":"default","_cnpm_publish_time":1774965250626},"1.0.0":{"name":"@larksuite/cli","version":"1.0.0","description":"The official CLI for Lark/Feishu open platform","bin":{"lark-cli":"scripts/run.js"},"scripts":{"postinstall":"node scripts/install.js"},"os":["darwin","linux","win32"],"cpu":["x64","arm64"],"engines":{"node":">=16"},"repository":{"type":"git","url":"git+https://github.com/larksuite/cli.git"},"license":"MIT","_id":"@larksuite/cli@1.0.0","gitHead":"83dfb068ad8bb4052787d80ca415118a20849b85","bugs":{"url":"https://github.com/larksuite/cli/issues"},"homepage":"https://github.com/larksuite/cli#readme","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"shasum":"b87ff175b97f2bbf9e1a9969db380601a773d1b0","size":12851,"noattachment":false,"key":"/@larksuite/cli/-/@larksuite/cli-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@larksuite/cli/download/@larksuite/cli-1.0.0.tgz"},"_npmUser":{"name":"qianzhicheng95","email":"qianzhicheng@bytedance.com"},"directories":{},"maintainers":[{"name":"bytednpm","email":""},{"name":"liangshuo.0","email":""},{"name":"max_huang","email":""},{"name":"mazhe.nerd","email":""},{"name":"qianzhicheng95","email":""},{"name":"zkh_bytedance","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_1.0.0_1774665971134_0.4278686544474726"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-03-28T02:46:11.270Z","publish_time":1774665971270,"_source_registry_name":"default","_cnpm_publish_time":1774665971270}},"readme":"# lark-cli\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Go Version](https://img.shields.io/badge/go-%3E%3D1.23-blue.svg)](https://go.dev/)\n[![npm version](https://img.shields.io/npm/v/@larksuite/cli.svg)](https://www.npmjs.com/package/@larksuite/cli)\n\n[中文版](./README.zh.md) | [English](./README.md)\n\nThe 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, Calendar, Mail, Tasks, Meetings, and more, with 200+ commands and 19 AI Agent [Skills](./skills/).\n\n[Install](#installation--quick-start) · [AI Agent Skills](#agent-skills) · [Auth](#authentication) · [Commands](#three-layer-command-system) · [Advanced](#advanced-usage) · [Security](#security--risk-warnings-read-before-use) · [Contributing](#contributing)\n\n## Why lark-cli?\n\n- **Agent-Native Design** — 19 structured [Skills](./skills/) out of the box, compatible with popular AI tools — Agents can operate Lark with zero extra setup\n- **Wide Coverage** — 11 business domains, 200+ curated commands, 19 AI Agent [Skills](./skills/)\n- **AI-Friendly & Optimized** — Every command is tested with real Agents, featuring concise parameters, smart defaults, and structured output to maximize Agent call success rates\n- **Open Source, Zero Barriers** — MIT license, ready to use, just `npm install`\n- **Up and Running in 3 Minutes** — One-click app creation, interactive login, from install to first API call in just 3 steps\n- **Secure & Controllable** — Input injection protection, terminal output sanitization, OS-native keychain credential storage\n- **Three-Layer Architecture** — Shortcuts (human & AI friendly) → API Commands (platform-synced) → Raw API (full coverage), choose the right granularity\n\n## Features\n\n| Category      | Capabilities                                                                        |\n| ------------- | ----------------------------------------------------------------------------------- |\n| ???? Calendar   | View agenda, create events, invite attendees, check free/busy status, time suggestions |\n| ???? Messenger  | Send/reply messages, create and manage group chats, view chat history & threads, search messages, download media |\n| ???? Docs       | Create, read, update, and search documents, read/write media & whiteboards          |\n| ???? Drive      | Upload and download files, search docs & wiki, manage comments                      |\n| ???? Base       | Create and manage tables, fields, records, views, dashboards, workflows, forms, roles & permissions, data aggregation & analytics |\n| ???? Sheets     | Create, read, write, append, find, and export spreadsheet data                      |\n| ✅ Tasks      | Create, query, update, and complete tasks; manage task lists, subtasks, comments & reminders |\n| ???? Wiki       | Create and manage knowledge spaces, nodes, and documents                            |\n| ???? Contact    | Search users by name/email/phone, get user profiles                                 |\n| ???? Mail       | Browse, search, read emails, send, reply, forward, manage drafts, watch new mail    |\n| ???? Meetings   | Search meeting records, query meeting minutes & recordings                          |\n\n## Installation & Quick Start\n\n### Requirements\n\nBefore you start, make sure you have:\n\n- Node.js (`npm`/`npx`)\n- Go `v1.23`+ and Python 3 (only required for building from source)\n\n### Quick Start (Human Users)\n\n> **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.\n\n#### Install\n\nChoose **one** of the following methods:\n\n**Option 1 — From npm (recommended):**\n\n```bash\n# Install CLI\nnpm install -g @larksuite/cli\n\n# Install CLI SKILL (required)\nnpx skills add larksuite/cli -y -g\n```\n\n**Option 2 — From source:**\n\nRequires Go `v1.23`+ and Python 3.\n\n```bash\ngit clone https://github.com/larksuite/cli.git\ncd cli\nmake install\n\n# Install CLI SKILL (required)\nnpx skills add larksuite/cli -y -g\n```\n\n#### Configure & Use\n\n```bash\n# 1. Configure app credentials (one-time, interactive guided setup)\nlark-cli config init\n\n# 2. Log in (--recommend auto-selects commonly used scopes)\nlark-cli auth login --recommend\n\n# 3. Start using\nlark-cli calendar +agenda\n```\n\n## Quick Start (AI Agent)\n\n> The following steps are for AI Agents. Some steps require the user to complete actions in a browser.\n\n**Step 1 — Install**\n\n```bash\n# Install CLI\nnpm install -g @larksuite/cli\n\n# Install CLI SKILL (required)\nnpx skills add larksuite/cli -y -g\n```\n\n**Step 2 — Configure app credentials**\n\n> 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.\n\n```bash\nlark-cli config init --new\n```\n\n**Step 3 — Login**\n\n> Same as above: run in the background, extract the authorization URL and send it to the user.\n\n```bash\nlark-cli auth login --recommend\n```\n\n**Step 4 — Verify**\n\n```bash\nlark-cli auth status\n```\n\n## Agent Skills\n\n| Skill                           | Description                                                                           |\n| ------------------------------- | ------------------------------------------------------------------------------------- |\n| `lark-shared`                   | App config, auth login, identity switching, scope management, security rules (auto-loaded by all other skills) |\n| `lark-calendar`                 | Calendar events, agenda view, free/busy queries, time suggestions                     |\n| `lark-im`                       | Send/reply messages, group chat management, message search, upload/download images & files, reactions |\n| `lark-doc`                      | Create, read, update, search documents (Markdown-based)                               |\n| `lark-drive`                    | Upload, download files, manage permissions & comments                                 |\n| `lark-sheets`                   | Create, read, write, append, find, export spreadsheets                                |\n| `lark-base`                     | Tables, fields, records, views, dashboards, data aggregation & analytics              |\n| `lark-task`                     | Tasks, task lists, subtasks, reminders, member assignment                              |\n| `lark-mail`                     | Browse, search, read emails, send, reply, forward, draft management, watch new mail   |\n| `lark-contact`                  | Search users by name/email/phone, get user profiles                                   |\n| `lark-wiki`                     | Knowledge spaces, nodes, documents                                                    |\n| `lark-event`                    | Real-time event subscriptions (WebSocket), regex routing & agent-friendly format       |\n| `lark-vc`                       | Search meeting records, query meeting minutes (summary, todos, transcript)             |\n| `lark-whiteboard`               | Whiteboard/chart DSL rendering                                                        |\n| `lark-minutes`                  | Minutes metadata & AI artifacts (summary, todos, chapters)                            |\n| `lark-openapi-explorer`         | Explore underlying APIs from official docs                                            |\n| `lark-skill-maker`              | Custom skill creation framework                                                       |\n| `lark-workflow-meeting-summary` | Workflow: meeting minutes aggregation & structured report                              |\n| `lark-workflow-standup-report`  | Workflow: agenda & todo summary                                                       |\n\n## Authentication\n\n| Command       | Description                                                    |\n| ------------- | -------------------------------------------------------------- |\n| `auth login`  | OAuth login with interactive selection or CLI flags for scopes |\n| `auth logout` | Sign out and remove stored credentials                         |\n| `auth status` | Show current login status and granted scopes                   |\n| `auth check`  | Verify a specific scope (exit 0 = ok, 1 = missing)            |\n| `auth scopes` | List all available scopes for the app                          |\n| `auth list`   | List all authenticated users                                   |\n\n```bash\n# Interactive login (TUI guides domain and permission level selection)\nlark-cli auth login\n\n# Filter by domain\nlark-cli auth login --domain calendar,task\n\n# Recommended auto-approval scopes\nlark-cli auth login --recommend\n\n# Exact scope\nlark-cli auth login --scope \"calendar:calendar:readonly\"\n\n# Agent mode: return verification URL immediately, non-blocking\nlark-cli auth login --domain calendar --no-wait\n# Resume polling later\nlark-cli auth login --device-code <DEVICE_CODE>\n\n# Identity switching: execute commands as user or bot\nlark-cli calendar +agenda --as user\nlark-cli im +messages-send --as bot --chat-id \"oc_xxx\" --text \"Hello\"\n```\n\n## Three-Layer Command System\n\nThe CLI provides three levels of granularity, covering everything from quick operations to fully custom API calls:\n\n### 1. Shortcuts\n\nPrefixed with `+`, designed to be friendly for both humans and AI, with smart defaults, table output, and dry-run previews.\n\n```bash\nlark-cli calendar +agenda\nlark-cli im +messages-send --chat-id \"oc_xxx\" --text \"Hello\"\nlark-cli docs +create --title \"Weekly Report\" --markdown \"# Progress\\n- Completed feature X\"\n```\n\nRun `lark-cli <service> --help` to see all shortcut commands.\n\n### 2. API Commands\n\nAuto-generated from Lark OAPI metadata, curated through evaluation and quality gates — 100+ commands mapped 1:1 to platform endpoints.\n\n```bash\nlark-cli calendar calendars list\nlark-cli calendar events instance_view --params '{\"calendar_id\":\"primary\",\"start_time\":\"1700000000\",\"end_time\":\"1700086400\"}'\n```\n\n### 3. Raw API Calls\n\nCall any Lark Open Platform endpoint directly, covering 2500+ APIs.\n\n```bash\nlark-cli api GET /open-apis/calendar/v4/calendars\nlark-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\\\"}\"}'\n```\n\n## Advanced Usage\n\n### Output Formats\n\n```bash\n--format json      # Full JSON response (default)\n--format pretty    # Human-friendly formatted output\n--format table     # Readable table\n--format ndjson    # Newline-delimited JSON (for piping)\n--format csv       # Comma-separated values\n```\n\n### Pagination\n\n```bash\n--page-all                  # Auto-paginate through all pages\n--page-limit 5              # Max 5 pages\n--page-delay 500            # 500ms between page requests\n```\n\n### Dry Run\n\nFor commands that may have side effects, preview the request with --dry-run first:\n\n```bash\nlark-cli im +messages-send --chat-id oc_xxx --text \"hello\" --dry-run\n```\n\n### Schema Introspection\n\nUse schema to inspect any API method's parameters, request body, response structure, supported identities, and scopes:\n\n```bash\nlark-cli schema\nlark-cli schema calendar.events.instance_view\nlark-cli schema im.messages.delete\n```\n\n## Security & Risk Warnings (Read Before Use)\n\nThis 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.\n\nTo 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.\n\nWe 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.\n\nPlease fully understand all usage risks. By using this tool, you are deemed to voluntarily assume all related responsibilities.\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=larksuite/cli&type=Date)](https://star-history.com/#larksuite/cli&Date)\n\n## Contributing\n\nCommunity 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).\n\nFor major changes, we recommend discussing with us first via an Issue.\n\n## License\n\nThis project is licensed under the **MIT License**.\nWhen running, it calls Lark/Feishu Open Platform APIs. To use these APIs, you must comply with the following agreements and privacy policies:\n\n- [Feishu User Terms of Service](https://www.feishu.cn/terms)\n- [Feishu Privacy Policy](https://www.feishu.cn/privacy)\n- [Feishu Open Platform App Service Provider Security Management Specifications](https://open.feishu.cn/document/uAjLw4CM/uMzNwEjLzcDMx4yM3ATM/management-practice/app-service-provider-security-management-specifications)\n- [Lark User Terms of Service](https://www.larksuite.com/user-terms-of-service)\n- [Lark Privacy Policy](https://www.larksuite.com/privacy-policy)\n","_attachments":{},"homepage":"https://github.com/larksuite/cli#readme","bugs":{"url":"https://github.com/larksuite/cli/issues"},"license":"MIT"}