Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
larksuite avatar

Lark Drive

  • 388k installs
  • 15.9k repo stars
  • Updated July 28, 2026
  • larksuite/cli

lark-drive is a CLI skill for managing files and folders in Feishu cloud storage.

About

lark-drive provides CLI access to Feishu cloud storage (Drive/cloud disk), enabling file and folder management, local file imports, document copying, permission governance, and comment management.

  • Upload, download, and manage files and folders in Feishu cloud storage
  • Import local files (Word, Markdown, Excel, CSV, PPTX) as Feishu documents
  • Copy documents, manage permissions, add comments, and track versions

Lark Drive by the numbers

  • 388,448 all-time installs (skills.sh)
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

lark-drive capabilities & compatibility

Use cases
documentation
Runs
Remote server
Pricing
Bring your own API key
npx skills add https://github.com/larksuite/cli --skill lark-drive

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs388k
repo stars15.9k
Security audit3 / 3 scanners passed
Last updatedJuly 28, 2026
Repositorylarksuite/cli

How do you upload files to Feishu cloud drive?

Upload, download, import files and manage Feishu cloud storage from your agent or CLI.

Who is it for?

Agents and automation needing to upload, download, or organize files in Feishu cloud storage.

Skip if: Skip lark-drive for live Base record queries or formula design after import—hand off to lark-base for table operations.

When should I use this skill?

User needs to upload or download cloud files, organize drive folders, import local documents, or manage Feishu file permissions and comments.

What you get

Uploaded or imported cloud files, updated folder structure, file metadata, comments, and permission settings.

  • imported cloud documents
  • organized drive folders

By the numbers

  • Skill version 1.0.0 using lark-cli drive v1 API
  • Imports Word, Markdown, Excel, CSV, and .base snapshot formats

Files

SKILL.mdMarkdownGitHub ↗

drive (v1)

CRITICAL — 开始前 MUST 先用 Read 工具读取 [`../lark-shared/SKILL.md`](../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

修改标题

  • 使用 drive files patch 命令,通过new_title字段可以修改标题,支持 docx、sheet、bitable、file、wiki、folder 类型

核心概念

文档类型与 Token

飞书开放平台中,不同类型的文档有不同的 URL 格式和 Token 处理方式。在进行文档操作(如添加评论、下载文件等)时,必须先获取正确的 file_token

文档 URL 格式与 Token 处理

URL 格式示例Token 类型处理方式
/docx/https://example.larksuite.com/docx/doxcnxxxxxxxxxfile_tokenURL 路径中的 token 直接作为 file_token 使用
/doc/https://example.larksuite.com/doc/doccnxxxxxxxxxfile_tokenURL 路径中的 token 直接作为 file_token 使用
/wiki/https://example.larksuite.com/wiki/wikcnxxxxxxxxxwiki_token⚠️ 不能直接使用,需要先查询获取真实的 obj_token
/sheets/https://example.larksuite.com/sheets/shtcnxxxxxxxxxfile_tokenURL 路径中的 token 直接作为 file_token 使用
/drive/folder/https://example.larksuite.com/drive/folder/fldcnxxxxfolder_tokenURL 路径中的 token 作为文件夹 token 使用

Wiki 链接特殊处理(关键!)

知识库链接(/wiki/TOKEN)背后可能是云文档、电子表格、多维表格等不同类型的文档。不能直接假设 URL 中的 token 就是 file_token,必须先查询实际类型和真实 token。

处理流程

1. 使用 `wiki.spaces.get_node` 查询节点信息

   lark-cli wiki spaces get_node --params '{"token":"wiki_token"}'

2. 从返回结果中提取关键信息

  • node.obj_type:文档类型(docx/doc/sheet/bitable/slides/file/mindnote)
  • node.obj_token真实的文档 token(用于后续操作)
  • node.title:文档标题

3. 根据 `obj_type` 使用对应的 API

obj_type说明使用的 API
docx新版云文档drive file.comments.*docx.*
doc旧版云文档drive file.comments.*
sheet电子表格sheets.*
bitable多维表格bitable.*
slides幻灯片drive.*
file文件drive.*
mindnote思维导图drive.*
查询示例
# 查询 wiki 节点
lark-cli wiki spaces get_node --params '{"token":"wiki_token"}'

返回结果示例:

{
  "node": {
    "obj_type": "docx",
    "obj_token": "xxxx",
    "title": "标题",
    "node_type": "origin",
    "space_id": "12345678910"
  }
}

资源关系

Wiki Space (知识空间)
└── Wiki Node (知识库节点)
    ├── obj_type: docx (新版文档)
    │   └── obj_token (真实文档 token)
    ├── obj_type: d

Related skills

How it compares

Use lark-drive for cloud file storage and imports; switch to lark-doc or lark-base for editing imported document bodies or table records.

FAQ

Should Excel imports use lark-drive or lark-base?

lark-drive must handle local Excel, CSV, and .base snapshot imports via lark-cli drive +import --type bitable first. lark-base only operates on existing Base tables after the import completes.

What file types can lark-drive import?

lark-drive imports local Word, Markdown, Excel, CSV, and .base snapshot files into Feishu online docx, sheet, or bitable formats using lark-cli drive +import with the appropriate --type flag.

Is Lark Drive safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.