Introduction
"Built for humans and AI Agents."
This is Part 62 of the "One Open Source Project a Day" series. Today's project is lark-cli (GitHub).
Need to drive Lark/Feishu from the terminal or an AI workflow? lark-cli is the official CLI from the larksuite team: 11 business domains, 200+ commands, 19 AI Agent Skills, and a three-layer command model (Shortcuts → API Commands → Raw API). Parameters and structured outputs are tuned for agents; OAuth login, user/bot switching (--as), dry-run, and security-conscious defaults. MIT licensed; install with npm install -g @larksuite/cli.
What You'll Learn
- Positioning: humans + agents
- Three-layer commands and typical usage
- What the 19 Agent Skills cover
- Auth, scopes,
--as user/bot - Security notes and boundaries
Prerequisites
- Basic understanding of Feishu/Lark tenant and Open Platform apps
- Terminal and npm familiarity (optional)
Project Background
Project Overview
lark-cli is the official command-line tool for Lark / Feishu, calling Open Platform APIs for calendar, IM, cloud docs, Drive, Base (Bitable), Sheets, tasks, wiki, contacts, mail, meetings, and more. It is Agent-Native: ships structured Skills compatible with Cursor, Claude, and similar tools to reduce ad-hoc API wiring.
Maintainer
- Team: larksuite (official)
- Implementation: Go (source builds need Go 1.23+); primary distribution via npm
@larksuite/cli - Companion: install CLI SKILL with
npx skills add larksuite/cli -y -g
Project Data
- ⭐ GitHub Stars: ~6k+ (see repo)
- 📄 License: MIT
- 📦 npm: @larksuite/cli
- 🌐 Product: Lark / Feishu Open Platform
Core Features
Main Role
One tool spans Messenger, Docs, Drive, Base, Sheets, Calendar, Mail, Tasks, Wiki, Contact, Meetings; humans use + shortcuts, power users use API commands aligned with platform metadata, and fallback uses lark-cli api for 2500+ Open APIs. Output formats: json / pretty / table / ndjson / csv for scripts and agents.
Use Cases
- Calendar & meetings:
calendar +agenda, create events, free/busy; meeting minutes flows (with relevant skills) - IM & groups: send/search messages, members, file transfer
- Docs & sheets: Markdown docs, cell read/write, export
- Base (Bitable): tables, fields, records, views (with
lark-baseskill) - Mail & tasks: compose/send mail, todos and lists
Quick Start
npm install -g @larksuite/cli
npx skills add larksuite/cli -y -g
lark-cli config init
lark-cli auth login --recommend
lark-cli auth status
lark-cli calendar +agendaBuild from source (Go 1.23+, Python 3):
git clone https://github.com/larksuite/cli.git && cd cli
make install
npx skills add larksuite/cli -y -gCore Capabilities
- Three layers:
+shortcuts → domain API subcommands →lark-cli apiraw HTTP - 19 Agent Skills: e.g.
lark-calendar,lark-im,lark-doc,lark-base,lark-mail,lark-vc - Identity:
--as user/--as botunder the same app - Schema:
lark-cli schemafor params, body, scopes - Security defaults: input safety, output sanitization, OS keychain storage (see official warnings)
- Pagination & dry-run:
--page-all,--dry-run
Project Advantages
| Comparison | lark-cli | Hand-rolled curl/SDK | Web UI only |
|---|---|---|---|
| Onboarding | One CLI + OAuth | Manual doc diving | No code |
| Agents | Skills + structured output | Custom wrappers | Not automatable |
| Coverage | 200+ commands + API escape hatch | You maintain it | UI-limited |
| License | MIT OSS | Varies | — |
Why this project?
- Official maintenance and OpenAPI alignment
- Serves both humans and agents
- MIT-friendly for internal tooling
Deep Dive
Three-Layer Command System
| Layer | Form | Purpose |
|---|---|---|
| Shortcuts | lark-cli <domain> +<action> | Human & agent friendly defaults |
| API commands | e.g. lark-cli calendar calendars list | 1:1 curated platform mappings |
| Raw API | `lark-cli api GET | POST ...` |
Agent Skills (sample)
| Skill | Summary |
|---|---|
lark-shared | Config, login, identity, scopes, security |
lark-calendar | Events, agenda, free/busy |
lark-im | Messages, groups, search, media |
lark-doc / lark-drive / lark-sheets / lark-base | Docs, files, sheets, Base |
lark-mail / lark-task / lark-contact / lark-wiki | Mail, tasks, directory, wiki |
lark-event / lark-vc / lark-minutes | Events WS, meetings, minutes |
lark-openapi-explorer | Explore underlying APIs from docs |
lark-workflow-* | Meeting summaries, standup-style reports |
Full table: README - Agent Skills.
Auth & Agent Flow
lark-cli config init/config init --new: app credentialslark-cli auth login --recommend: common scopes- Agent-friendly:
auth login --no-waitfor URLs; resume withdevice-codepolling
Security & Risk
The CLI can be driven by AI; risks include hallucination, injection, and over-privileged actions. After authorization, the agent acts within granted scopes as you. Do not expose integrated bots to untrusted group chats; avoid weakening default protections. Read Security & Risk Warnings before use.
Project Links and Resources
Official Resources
- 🌟 GitHub: https://github.com/larksuite/cli
- 📦 npm: https://www.npmjs.com/package/@larksuite/cli
- 📚 中文 README: README.zh.md
- 🐛 Issues: https://github.com/larksuite/cli/issues
Target Audience
- Developers automating Feishu/Lark
- Teams wiring Lark capabilities into Cursor, Claude, or similar agents
- Users who want official semantics without heavy glue code
Visit my homepage for more useful knowledge and interesting products