lark-cli: The Official Lark CLI That Puts 2500+ APIs in Your Terminal

Why This Tool Exists

AI has made a lot of things intuitive. But there’s one thing it hasn’t: calling Lark APIs.

If you want to send a message, fetch a calendar event, or add a row to a Base table through the API today, you need to understand Lark Open Platform’s entire API structure: the exact URL prefix, the authentication mechanism, the pagination cursor, the parameter serialization format, and the structure of every possible response. This isn’t silly for an API platform — it’s just expensive for every person who needs to use it.

You write one call, it feels fine. You make ten, your scripts turn into JSON-wrangling code golf. You make a hundred, and you’ve rebuilt an SDK that someone else should have written.

lark-cli is that SDK. It’s just written in a language everyone can already run: the terminal.

What It Is

lark-cli is the official Lark/Feishu CLI tool, maintained by the larksuite team. MIT licensed. Go-written. 13.8k GitHub stars.

Instead of writing code to call APIs, you type commands in your terminal. Instead of reading API docs to find the right endpoint, you get curated shortcuts that just work. Instead of manually serializing parameters, you pass them like normal CLI flags.

It covers 18 business domains: calendar, messages, docs, Base, Sheets, Slides, tasks, email, meetings, attendance, approvals, OKRs, and more. 200+ curated commands. 26 AI Agent Skills — think of them as predefined operation templates that Agents use to interact with Lark.

Three-Layer Architecture

The core design decision here is a three-layer command system — different granularities for different use cases.

Layer 1: Shortcuts

Prefixed with +, these are friendly wrappers designed for both humans and AI agents. Smart defaults, table-formatted output, one-shot results.

# View today's agenda
lark-cli calendar +agenda

# Send a message to a group chat
lark-cli im +messages-send --chat-id "oc_xxx" --text "Hello"

# Create a Markdown document
lark-cli docs +create --api-version v2 --doc-format markdown --content $'<title>Weekly Report</title>\n# Progress\n- Completed feature X'

Each shortcut tells you “what to do” without needing to know request body structure, headers, or JSON serialization. The result is printed directly to your terminal — you don’t parse returned JSON.

Layer 2: API Commands

Automatically generated from Lark OAPI metadata, curated through evaluation and quality gates — 100+ curated commands mapped 1:1 to platform endpoints. For situations where you need precise parameter control or want to use specific API paths:

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

This is an “officially curated API layer” — essentially a convenient API reference in terminal form.

Layer 3: Universal API Calls

When you need any API, use the api command to call any Lark Open Platform endpoint directly:

lark-cli api GET /open-apis/calendar/v4/calendars
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\"}"}'

This covers 2500+ Lark Open Platform APIs. The three-layer approach is simple: humans use Layer 1, advanced users use Layer 2, and people who need full autonomy use Layer 3. Most people only need Layer 1.

Agent-Native Design

This is what makes lark-cli stand out.

It’s not a human-friendly CLI that was later retrofitted for agents. It was designed natively for both humans and agents simultaneously — two tracks, concurrent design.

26 Pre-built Skills

lark-calendar      Calendar schedules (create/update)
lark-im            Send messages, group management, message search
lark-doc           Docs creation, read, update, search
lark-base          Base tables (fields, records, views, dashboards)
lark-meeting       Meeting records and minutes artifacts
lark-okr           OKR query and creation
lark-skill-maker   Custom skill creation framework
... (26 total)

Each Skill defines clear parameter structures, defaults, and output formats. An agent doesn’t need to manually assemble JSON or read API docs — tell it “check my calendar” and the Skill handles every detail automatically.

Agent-mode Login

Login for agents is asynchronous — it won’t block agent execution:

lark-cli auth login --domain calendar --no-wait
# Returns validation URL immediately without blocking
# Resume polling later with device-code
lark-cli auth login --device-code <CODE>

Identity Switching

The same command can run as user or as bot:

# As user: view calendar agenda
lark-cli calendar +agenda --as user

# As bot: send a message
lark-cli im +messages-send --as bot --chat-id "oc_xxx" --text "Hi"

This gives flexibility for automation — the same tool can run interactively in your terminal or be embedded as a sub-component in a multi-agent system.

Quick Start

Three steps from zero to running.

Step 1: Install

npx @larksuite/cli@latest install

Done. Requires Node.js (npm/npx).

For source builds, you need Go 1.23+ and Python 3:

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

Step 2: Configure Your App

lark-cli config init

Interactive guide walks you through it. Enter your App ID and App Secret, choose deployment scope (all org / specific departments / only yourself). It generates an authorization link you click in the browser to complete setup.

Or create a new app in one command:

lark-cli config init --new

Step 3: Login and Use

lark-cli auth login --recommend
lark-cli calendar +agenda

The --recommend flag automatically selects the most commonly used permission scopes. After login, you’re ready.

Run lark-cli calendar +agenda and it lists your calendar agenda directly in table format — no browser, no Lark app, no API docs.

Real-World Examples

Three practical scenarios.

1. Automated Daily Briefing

Run one command in your terminal each morning to send a calendar summary to a group chat:

lark-cli calendar +agenda | lark-cli im +messages-send --chat-id "oc_xxx"

Pair with cron or launchd and it sends automatically every day.

2. Document Operations at Scale

# Search all docs containing "Q3 Report"
lark-cli docs +search --keyword "Q3 Report" --format table

# Batch export to JSON
lark-cli docs search --keyword "Q3 Report" --page-all --format json

3. Writing to Base Tables

# Create a new record in a Base table
lark-cli base +record-create --table "Invoice Log" --fields '{"number":"F2026061001","amount":"5200","status":"Pending"}'

Things to Know

Security Design Is Intentional

lark-cli has considered security carefully:

  • Input injection protection: CLI parameters go through strict type validation
  • Output sanitization: Terminal output automatically strips sensitive info
  • Credential storage: Uses OS-native keychains (macOS Keychain, Linux Secret Service, Windows Credential Manager)

But it also has explicit risk warnings: since it supports AI agent invocation, model hallucination, uncontrolled execution, and prompt injection risks still exist. When an agent executes something on your behalf, it could perform high-risk actions — delete events, send messages to everyone, modify thousands of Base records. The official recommendation: treat your Lark bot as a private assistant, not a group chat member.

Team/CI Scope Is Limited

lark-cli is built around a single app credential. If you need multiple enterprise app credentials in one project, you run config init multiple times to switch between identity and scope. It’s not CI/CD friendly — there’s no service account input mechanism, credentials must go through interactive authorization. Teams wanting to embed it in deployment pipelines will hit friction.

Curated Commands Are a Subset

The 200+ shortcut commands cover core everyday operations. Lark Open Platform has 2500+ APIs total. If you’re on some edge case not covered by shortcuts, you’ll jump to Layer 3 (manual api calls) or read the API docs directly. This isn’t a flaw — a curated scope means a better out-of-the-box experience. You just need to know where the boundary is.

Conclusion

lark-cli solves a simple problem that’s been underestimated: calling Lark APIs daily is too much work.

If you want to write automation scripts, quickly debug Lark endpoints, or manage your daily Lark tasks from the terminal, it works well — one command, no browser, no docs needed. Pay attention to its boundaries: it’s not a CI tool, edge-case APIs require manual calls, agent invocations carry risks you need to actively manage.

200+ curated commands, 2500+ universal APIs as backup, 26 agent-ready Skills — lark-cli turns Lark Open Platform from “open API docs and figure it out” into a single terminal command.

Repo: https://github.com/larksuite/cli npm: @larksuite/cli

Related Posts

Book2Skills: turn books into agent skills that actually work

Book2Skills: turn books into agent skills that actually work

Book2Skills is an open-source project that distills classic book methodologies into structured AI ag ...

Matt Pocock's Skills: 122k Stars and a TDD Method That Actually Works

Matt Pocock's Skills repository sits at 222k installs and 122k stars not because it's revolutionary. ...

Tell Claude to Draw: Diagrams with /drawio in Claude Code

Tell Claude to Draw: Diagrams with /drawio in Claude Code

You're describing an architecture to Claude Code. The response includes detailed ASCII art that almo ...

Obsidian Skills: teach agents to actually work with your knowledge base

AI agents can write code and browse web pages. But ask one to edit your actual documents — good luck ...