feishu-cli-docs

Read, create, edit, import, and export Feishu documents via feishu-cli commands.

1.4k|142|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/riba2534/feishu-cli --skill feishu-cli-docs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feishu-cli-docs
Source: https://github.com/riba2534/feishu-cli/tree/main/skills/feishu-cli-docs
Command: npx skills add https://github.com/riba2534/feishu-cli --skill feishu-cli-docs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Working with Feishu (Lark) documents programmatically requires navigating docx, wiki, and sheet APIs, token types, and block structures. This Skill gives an AI agent a unified entry point to read, summarize, create, edit, import, and export Feishu documents and cloud-drive Markdown files through the feishu-cli command line.

Core Features & Use Cases

  • Read and analyze documents: Export docx, wiki, and sheet content to Markdown, inspect block structure, outlines, and headings, and download embedded images for multimodal analysis.
  • Create and edit docx: Create documents, append, overwrite, replace sections by title, find-and-replace, and insert callouts, tables, images, and whiteboard blocks with atomic update modes.
  • Markdown import and export: Convert Markdown to Feishu docx with Mermaid/PlantUML/SVG diagrams rendered as editable whiteboards, and export docx/wiki/sheet back to Markdown, PDF, Word, or Excel.
  • Native .md file management: Upload, fetch, diff, patch, and overwrite raw .md files in Feishu Drive while preserving the file token.
  • Use Case: Ask the agent to import a local report.md containing Mermaid diagrams into Feishu as a formatted docx, then grant your account full access and share the link.

Quick Start

Ask the agent to read a Feishu document URL and summarize it, or to import a local Markdown file into Feishu as a new document with a given title.

Frequently Asked Questions about feishu-cli-docs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I import a Markdown file into Feishu as a document?

Run feishu-cli doc import with the Markdown file path and a --title flag. The CLI converts headings, lists, tables, callouts, and Mermaid/PlantUML/SVG code blocks into native Feishu docx blocks and editable whiteboards.

How do I read or summarize a Feishu document from a URL?

Use feishu-cli doc export for /docx/ URLs, wiki export for /wiki/ URLs, or sheet export --format markdown for /sheets/ URLs. For large documents, use doc read --outline or --heading to fetch only the sections you need.

How do I replace one section of an existing Feishu document?

Use feishu-cli doc content-update with --mode replace_range and --selection-by-title to target a heading, supplying new content via --markdown-file. This performs an atomic update without appending duplicates or recreating the document.

Does Feishu doc import support Mermaid and PlantUML diagrams?

Yes, mermaid, plantuml, puml, and svg fenced code blocks are converted to editable Feishu whiteboards during doc import. Eight Mermaid diagram types are supported, with automatic retry and fallback to code blocks on rendering failures.

What is the difference between doc import and markdown create in feishu-cli?

doc import converts Markdown into a rendered Feishu docx for reading and collaboration, while markdown create stores the raw .md file unchanged in Feishu Drive. Use markdown overwrite to update the same file while keeping its file token and share links stable.

Why does Feishu document export fail with permission errors?

Errors like code=1770032 forBidden mean the app token lacks access to the document. Enable docx:document:readonly or wiki:wiki:readonly scopes in the Feishu open platform console, then run feishu-cli auth login to authorize a user token.