One Open Source Project a Day (Part 62): lark-cli - Official Lark/Feishu CLI & AI Agent Skills

Deep dive into lark-cli, the official open-source Lark/Feishu CLI — 200+ commands, three-layer command system, 19 Agent Skills for humans and AI agents, MIT license, calendar/IM/docs/Base/sheets/mail/tasks and more

·5 min read·Developer Tools

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


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

  1. Calendar & meetings: calendar +agenda, create events, free/busy; meeting minutes flows (with relevant skills)
  2. IM & groups: send/search messages, members, file transfer
  3. Docs & sheets: Markdown docs, cell read/write, export
  4. Base (Bitable): tables, fields, records, views (with lark-base skill)
  5. 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 +agenda

Build 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 -g

Core Capabilities

  1. Three layers: + shortcuts → domain API subcommands → lark-cli api raw HTTP
  2. 19 Agent Skills: e.g. lark-calendar, lark-im, lark-doc, lark-base, lark-mail, lark-vc
  3. Identity: --as user / --as bot under the same app
  4. Schema: lark-cli schema for params, body, scopes
  5. Security defaults: input safety, output sanitization, OS keychain storage (see official warnings)
  6. Pagination & dry-run: --page-all, --dry-run

Project Advantages

Comparisonlark-cliHand-rolled curl/SDKWeb UI only
OnboardingOne CLI + OAuthManual doc divingNo code
AgentsSkills + structured outputCustom wrappersNot automatable
Coverage200+ commands + API escape hatchYou maintain itUI-limited
LicenseMIT OSSVaries

Why this project?

  • Official maintenance and OpenAPI alignment
  • Serves both humans and agents
  • MIT-friendly for internal tooling

Deep Dive

Three-Layer Command System

LayerFormPurpose
Shortcutslark-cli <domain> +<action>Human & agent friendly defaults
API commandse.g. lark-cli calendar calendars list1:1 curated platform mappings
Raw API`lark-cli api GETPOST ...`

Agent Skills (sample)

SkillSummary
lark-sharedConfig, login, identity, scopes, security
lark-calendarEvents, agenda, free/busy
lark-imMessages, groups, search, media
lark-doc / lark-drive / lark-sheets / lark-baseDocs, files, sheets, Base
lark-mail / lark-task / lark-contact / lark-wikiMail, tasks, directory, wiki
lark-event / lark-vc / lark-minutesEvents WS, meetings, minutes
lark-openapi-explorerExplore 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 credentials
  • lark-cli auth login --recommend: common scopes
  • Agent-friendly: auth login --no-wait for URLs; resume with device-code polling

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.


Official Resources

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