SkillsMar 30, 2026·1 min read

Lark CLI Skill: Drive — File & Folder Management

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

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.

Frequently Asked Questions

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.

Citations (3)
🙏

Source & Thanks

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

Part of the Lark CLI Official Skills Collection on TokRepo.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets