Lark CLI Skill: Docs — Document Creation & Editing
Lark/Feishu CLI skill for cloud documents. Create from Markdown, read/update content, insert images, search documents.
Safe staging for this asset
This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.
npx -y tokrepo@latest install c8177caa-c12a-40d9-8966-14b4155476c7 --target codexStages files first; activation requires review of the staged README and plan.
What it is
Lark CLI Docs is a skill for the Lark (Feishu) CLI that automates cloud document operations. It lets you create documents from Markdown, read and update existing doc content, insert images, and search across your document library -- all from the command line or scripts.
This skill targets developers and teams using Lark/Feishu for documentation who want to automate repetitive document tasks. It is particularly useful for CI/CD pipelines that generate release notes, teams that sync documentation from code repositories, and anyone who prefers writing in Markdown over the Lark web editor.
How it saves time or tokens
Manually creating and formatting documents in the Lark web UI is slow for repetitive tasks. This skill lets you batch-create documents from Markdown files, which means documentation generated by AI agents or build scripts flows directly into your Lark workspace without copy-pasting.
For AI-assisted workflows, an agent can generate Markdown content and push it to Lark in a single command, eliminating the human step of opening a browser and pasting content.
How to use
- Install the Lark CLI and the docs skill:
npm install -g @larksuite/cli
npx skills add larksuite/cli -y -g
- Configure authentication:
lark-cli config init
lark-cli auth login --recommended
- Create a document from Markdown:
lark-cli docs create --title 'Release Notes v2.1' --content-file notes.md
Example
Search for documents and update one with new content:
# Search for documents by title
lark-cli docs search --query 'API Reference'
# Update a document by ID
lark-cli docs update --doc-id 'doxcn1234567890' \
--content-file updated-api-reference.md
# Insert an image into a document
lark-cli docs insert-image --doc-id 'doxcn1234567890' \
--image-path ./architecture-diagram.png
Related on TokRepo
- AI tools for documentation -- Tools for automated documentation workflows
- AI tools for automation -- CLI-based automation tools
Common pitfalls
- The Lark API has rate limits. Batch-creating many documents in rapid succession triggers throttling. Add delays between requests or use the batch API when available.
- Markdown-to-Lark conversion does not support all Markdown extensions. Complex tables and footnotes may lose formatting.
- Authentication tokens expire. Set up token refresh in your CI/CD pipeline to avoid failures in long-running jobs.
- Document IDs are required for update and delete operations. Store the ID returned by the create command for later use.
Frequently Asked Questions
Yes. Lark is the international version and Feishu is the Chinese version of the same platform. The CLI skill works with both, but you need to configure the correct API endpoint during 'lark-cli config init' depending on which platform you use.
Yes. The CLI is designed for scripting. Use service account authentication (app credentials) rather than personal login for automated pipelines. The auth token can be stored as a CI/CD secret.
Standard Markdown features are supported: headings, bold, italic, code blocks, lists, links, and images. Advanced features like Mermaid diagrams or custom HTML may not convert correctly to Lark document format.
Yes. The 'lark-cli docs read' command retrieves document content. The output format depends on the CLI version, but Markdown export is supported for most document types.
Document permissions are inherited from the Lark workspace. When creating documents programmatically, they default to private. Use the Lark API or web UI to set sharing permissions after creation, or specify a target folder with pre-configured permissions.
Citations (3)
- Lark Developer Docs— Lark CLI provides command-line access to Lark platform features
- Lark Official— Lark is the international version of Feishu by ByteDance
- Lark Open Platform— Lark open API supports document CRUD operations
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
Lark CLI Skill: Skill Maker — Create Custom Skills
Lark/Feishu CLI skill for creating reusable custom skills. Wrap atomic APIs or orchestrate multi-step workflows.
Lark CLI Skill: Wiki — Knowledge Base Management
Lark/Feishu CLI skill for knowledge base. Create and manage knowledge spaces, organize document nodes and shortcuts.
Lark CLI Skill: Tasks — Todo & Project Management
Lark/Feishu CLI skill for task management. Create todos, track progress, manage subtasks, assign members, set reminders.
Lark CLI Skill: Contact — User & Org Directory
Lark/Feishu CLI skill for contacts. Search users by name/email/phone, get user profiles, query org structure.