Lark/Feishu CLI tool for messaging, documents, spreadsheets, bitable, calendar, tasks, and generic API calls. Use when the user wants to interact with Lark/Feishu — send messages, read docs, query bitable records, manage calendar events, upload files, or call any Lark Open API.
lark-cli is a CLI tool for interacting with the Lark (Feishu) Open Platform. It wraps the Lark Open API into ergonomic subcommands.
# Check auth status
lark-cli auth status
# Send a message
lark-cli im +messages-send --chat-id <chat_id> --text "Hello"
# Read a spreadsheet
lark-cli sheets +read --spreadsheet <token> --range "Sheet1!A1:D10"
# Query bitable records
lark-cli base +record-list --base <base_token> --table <table_id>
# Generic API call
lark-cli api GET /open-apis/calendar/v4/calendars
--as user | bot | autoMost commands default to --as auto. Use --as user for user-scoped ops (search, calendar agenda) and --as bot for bot-scoped ops (send messages).
--format json | table | csv | ndjson | prettyDefault is json. Use --format table for human-readable output, --format csv for piping.
--page-all --page-size N --page-limit NAdd --page-all to automatically fetch all pages. --page-limit caps the number of pages (default 10).
| Token prefix | Resource |
|---|---|
oc_ | Chat ID |
ou_ | Open User ID |
om_ | Message ID |
omt_ | Thread ID |
bascn... | Base (Bitable) token |
tbl... | Table ID |
fld... | Field ID |
rec... | Record ID |
vew... | View ID |
Use lark-cli schema <service.resource.method> --format pretty to inspect any API method's parameters, types, and required scopes before calling it.
| Module | Description | Reference |
|---|---|---|
im | Messages, chats, threads, reactions, pins | references/im.md |
base | Bitable: tables, fields, records, views, dashboards, workflows | references/base.md |
docs | Documents: create, fetch, update, search | references/docs-drive.md |
drive | Files: upload, download, comments, permissions | references/docs-drive.md |
sheets | Spreadsheets: read, write, append, find, export | references/sheets.md |
calendar | Events, agenda, free/busy, scheduling | references/calendar-task.md |
task | Tasks, task lists, subtasks, assignments | references/calendar-task.md |
contact | User search, user info | references/api-auth.md |
api | Generic REST API calls | references/api-auth.md |
auth | Login, logout, scopes, status | references/api-auth.md |
# 1. Find the user's open_id
lark-cli contact +search-user --query "[email protected]" --format table
# 2. Send direct message (bot identity)
lark-cli im +messages-send --user-id <ou_xxx> --text "Hello from bot"
lark-cli base +record-list --base <token> --table <table_id> \
--filter '{"conjunction":"and","conditions":[{"field_name":"Status","operator":"is","value":["Done"]}]}' \
--page-all --format table
# Upload
lark-cli drive +upload --file ./report.pdf --parent <folder_token>
# Add permission
lark-cli api POST /open-apis/drive/v1/permissions/<file_token>/members \
--data '{"member_type":"openchat","member_id":"oc_xxx","perm":"view"}'
lark-cli <module> <command> --help for full flag documentation of any command.--dry-run to preview the API request without executing.lark-cli api <METHOD> <path>.+ prefixed commands (smart shortcuts) over raw resource commands when available.