Skills2026年3月30日·1 分钟阅读

Lark CLI Skill: Drive — File & Folder Management

Lark/Feishu CLI skill for cloud drive. Upload/download files, create folders, manage permissions and comments.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 17/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
CLI Tool
安装
Stage only
信任
信任等级:Community
入口
Lark CLI Skill: Drive — File & Folder Management
安全暂存命令
npx -y tokrepo@latest install 3e66318a-71d0-4d04-81f5-2576064a8b14 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

TL;DR
Manage Lark/Feishu cloud drive files from the command line with upload, download, permissions, and folder operations.
§01

What it is

The Lark CLI Drive skill adds cloud drive management capabilities to the Lark (Feishu) command-line interface. It lets you upload files, download documents, create folder hierarchies, and manage sharing permissions without opening the Lark web app. The skill integrates with the Lark Open API to perform drive operations directly from your terminal.

This skill is built for developers and teams who use Lark/Feishu as their collaboration platform and want to automate file operations. It is particularly useful for CI/CD pipelines that need to push build artifacts to shared drives, or for scripts that sync local directories with cloud storage.

§02

How it saves time or tokens

Instead of navigating the Lark web interface to upload files or adjust permissions, you run a single command. Batch operations that would take minutes of clicking become one-line scripts. The CLI also enables automation in shell scripts and cron jobs, removing the need for manual file management entirely.

§03

How to use

  1. Install the Lark CLI and the Drive skill:
npm install -g @larksuite/cli
npx skills add larksuite/cli -y -g
  1. Configure authentication (one-time setup):
lark-cli config init
lark-cli auth login --recommend
  1. Use drive commands to manage files:
# Upload a file
lark-cli drive upload ./report.pdf --folder <folder-token>

# Download a file
lark-cli drive download <file-token> -o ./downloads/

# Create a folder
lark-cli drive mkdir 'Project Assets' --parent <parent-token>

# List folder contents
lark-cli drive ls <folder-token>
§04

Example

# Batch upload all PDFs in a directory to a Lark folder
for file in ./reports/*.pdf; do
  lark-cli drive upload "$file" --folder <folder-token>
  echo "Uploaded: $file"
done

# Set sharing permissions
lark-cli drive share <file-token> \
  --user user@example.com \
  --permission view

# Add a comment to a file
lark-cli drive comment <file-token> 'Review completed, approved for release'
§05

Related on TokRepo

§06

Common pitfalls

  • Forgetting to run lark-cli auth login before drive commands results in authentication errors. The token expires periodically, so re-auth may be needed.
  • Folder tokens are not the same as folder names. You need the token from the Lark URL or from lark-cli drive ls output.
  • Large file uploads over slow connections may time out. Use the --retry flag for reliability on unstable networks.

常见问题

What is the Lark CLI Drive skill?+

It is a plugin for the Lark command-line interface that adds cloud drive file operations. You can upload, download, list, share, and comment on files stored in Lark/Feishu drive without using the web interface.

Does this skill work with Feishu as well as Lark?+

Yes. Lark and Feishu share the same API backend. The CLI automatically detects your region based on your authentication credentials and routes requests to the correct endpoint.

Can I use this in CI/CD pipelines?+

Yes. The CLI supports non-interactive authentication via environment variables or stored tokens. This makes it suitable for automated pipelines that need to upload build artifacts or reports to shared Lark drives.

What file size limits apply?+

The Lark Open API supports uploads up to 20MB for single-part uploads. For larger files, the CLI uses multipart upload automatically. Check current Lark API documentation for the latest limits as they may change.

How do I find a folder token?+

Open the folder in Lark web app and copy the token from the URL. Alternatively, run lark-cli drive ls on a parent folder to list child folders with their tokens.

引用来源 (3)
🙏

来源与感谢

Created by LarkSuite. Licensed under MIT. larksuite/cli — 4,100+ GitHub stars

Part of the Lark CLI Official Skills Collection on TokRepo.

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产