lark-drive

Installation
Summary

Manage files, folders, and documents in Lark Drive with upload, download, import, comments, and permissions.

  • Upload and download files; create folders; copy, move, and delete files; import local Word/Markdown/Excel/CSV/PPTX and Base snapshots as cloud documents
  • Add full-text or block-level comments to docs, sheets, slides, and files; manage comment replies and reactions; subscribe to comment change events
  • Manage document permissions, transfer ownership, and apply for access; update file titles across docx, sheet, bitable, file, folder, and wiki types
  • Auto-unwrap wiki URLs to underlying document types (docx, sheet, bitable, slides, file); inspect document metadata and view access records
  • Sync local directories with Drive folders using hash-based or timestamp-based diffing; version history, export, and secure label management
SKILL.md

drive (v1)

CRITICAL — 开始前 MUST 先用 Read 工具读取 ../lark-shared/SKILL.md,其中包含认证、权限处理

导入分流规则: 如果用户要把本地 Excel / CSV / .base 快照导入成 Base / 多维表格 / bitable,必须优先使用 lark-cli drive +import --type bitable。不要先切到 lark-baselark-base 只负责导入完成后的表内操作。

快速决策

  • 用户要搜文档 / Wiki / 电子表格 / 多维表格 / 云空间对象,优先使用 lark-cli drive +search。自然语言里"最近我编辑过的"、"我创建的"、"最近一周我打开过的 xxx"、"某人创建的 docx" 等直接映射到扁平 flag,避免手写嵌套 JSON。老的 docs +search 进入维护期、后续会下线,不要新增对它的依赖。
  • 用户要把本地 .xlsx / .csv / .base 导入成 Base / 多维表格 / bitable,第一步必须使用 lark-cli drive +import --type bitable
  • 用户要把本地 .md / .docx / .doc / .txt / .html 导入成在线文档,使用 lark-cli drive +import --type docx
  • 用户要在 Drive 里上传、创建、读取、局部 patch 或覆盖更新原生 .md 文件(不是导入成 docx),切到 lark-markdown
  • 用户要查看、下载、回滚或删除文件的历史版本,使用 drive +version-historydrive +version-getdrive +version-revertdrive +version-delete;这组命令同时支持 --as user--as bot,自动化场景优先 --as bot
  • 用户要把本地 .xlsx / .xls / .csv 导入成电子表格,使用 lark-cli drive +import --type sheet
  • 用户要在云空间里新建文件夹,优先使用 lark-cli drive +create-folder
  • 用户要把本地文件上传到知识库 / 文档库里的某个 wiki 节点下时,仍然使用 lark-cli drive +upload --wiki-token <wiki_token>;不要误切到 wiki 域命令。
  • lark-base 只负责导入完成后的 Base 内部操作(表、字段、记录、视图),不要在“本地文件 -> Base”这一步提前切到 lark-base
Installs
226.7K
Repository
larksuite/cli
GitHub Stars
14.0K
First Seen
Mar 28, 2026
lark-drive — larksuite/cli