Lark CLI Skill: Drive — File & Folder Management
Lark/Feishu CLI skill for cloud drive. Upload/download files, create folders, manage permissions and comments.
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.
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.
How to use
- Install the Lark CLI and the Drive skill:
npm install -g @larksuite/cli
npx skills add larksuite/cli -y -g
- Configure authentication (one-time setup):
lark-cli config init
lark-cli auth login --recommend
- 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>
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'
Related on TokRepo
- Automation tools -- Explore other CLI-based automation workflows
- Task management tools -- Combine file management with project tracking
Common pitfalls
- Forgetting to run
lark-cli auth loginbefore 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 lsoutput. - Large file uploads over slow connections may time out. Use the
--retryflag for reliability on unstable networks.
Frequently Asked Questions
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.
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.
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.
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.
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)
- Lark Open Platform— Lark CLI provides command-line access to Lark platform features
- Lark Drive API Docs— Lark Drive API supports file upload, download, and permission management
- npm Registry— npm package for Lark CLI installation
Related on TokRepo
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
Related Assets
Claude-Flow — Multi-Agent Orchestration for Claude Code
Layers swarm and hive-mind multi-agent orchestration on top of Claude Code with 64 specialized agents, SQLite memory, and parallel execution.
ccusage — Real-Time Token Cost Tracker for Claude Code
CLI that reads ~/.claude logs and breaks down Claude Code token spend by day, session, and project — pluggable into your statusline.
SuperClaude — Workflow Framework for Claude Code
Adds 16+ slash commands, 9 cognitive personas, and a smart flag system to Claude Code in one pipx install.