SkillsMar 30, 2026·1 min read

Lark CLI Skill: Docs — Document Creation & Editing

Lark/Feishu CLI skill for cloud documents. Create from Markdown, read/update content, insert images, search documents.

TL;DR
Automate Lark/Feishu document creation and editing from Markdown via the CLI.
§01

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.

§02

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.

§03

How to use

  1. Install the Lark CLI and the docs skill:
npm install -g @larksuite/cli
npx skills add larksuite/cli -y -g
  1. Configure authentication:
lark-cli config init
lark-cli auth login --recommended
  1. Create a document from Markdown:
lark-cli docs create --title 'Release Notes v2.1' --content-file notes.md
§04

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
§05

Related on TokRepo

§06

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

Does this skill work with both Lark and Feishu?+

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.

Can I use this skill in CI/CD pipelines?+

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.

What Markdown features are supported?+

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.

Can I read document content back as Markdown?+

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.

How do I handle permissions for shared documents?+

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)
🙏

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