feishu-docx CLI
A CLI and skill that export Feishu and Lark docs, sheets and wikis to Markdown and let an agent read or append to them.
- 276 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The Feishu app gets rights to write, delete files and manage permissions.
- The App Secret is stored in a config on the machine running the CLI.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/feishu-docxDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The Feishu app gets rights to write, delete files and manage permissions.
- The App Secret is stored in a config on the machine running the CLI.
This is third-party code. Review the repository files before installing.
What it does
feishu-docx is a Python CLI with a bundled skill at `.skills/feishu-docx/SKILL.md` that turns Feishu and Lark documents into Markdown. The `export` command handles documents, Sheets, Bitable tables and wiki nodes, saving images and attachments locally. Write commands create documents, append Markdown and update single blocks. Other commands export a WeChat article and create a Feishu doc from it, walk a whole wiki space while keeping its hierarchy, and manage cloud-space files. PDF and browser-based export come as optional extras.
Who it is for. Teams whose knowledge lives in Feishu or Lark and whose agents need those documents as context, without manual copy-paste.
Good fit when
- A wiki space must be exported to Markdown with its nesting kept, as a backup.
- An agent in Claude Code or Codex answers a question from an internal Feishu knowledge base.
- A WeChat article has to become a Feishu document with the single `create --url` command.
- A report must come out as PDF with a branded CSS template and a cover logo.
Not a fit when
- Documents live in Google Docs or Notion: the tool only knows Feishu and Lark.
- The Feishu app cannot be granted write and file-management permissions.
- Two-way sync is needed: export targets Markdown, and rebuilding complex blocks is not promised.
Example request
Export the wiki space from this link into wiki_backup up to depth 5 and list the documents that could not be read.Limitations
You need the App ID and App Secret of a Feishu app; the tenant_access_token mode works without OAuth, while OAuth mode brings user-level permissions. Python 3.11 or newer is required. Browser export installs Playwright and Chromium, and PDF needs a separate WeasyPrint extra. The latest repository update is from September 2026. Write and file-management operations change live documents, so try them on a test space first. Complex blocks may be simplified when exported to Markdown.
How to disable. Remove the package with `uv tool uninstall feishu-docx` and delete the skill folder from the agent project. Saved App ID and secret live in the CLI config, so clear them separately and disable the Feishu app in the developer console.
FAQ
How do I export a Feishu doc to Markdown?
Run `feishu-docx export "<link>" -o ./docs`. The Markdown file and images appear in the chosen folder.
Is OAuth needed to read documents?
No, `feishu-docx config set --app-id ... --app-secret ...` is enough by default, and the app token is issued and refreshed automatically. Enable OAuth with `feishu-docx config set --auth-mode oauth` and then `feishu-docx auth` when user-level permissions are needed.
How do I export a private doc through a browser?
Install `feishu-docx[browser]`, run `playwright install chromium` and call `feishu-docx export-browser "<link>" --storage-state ./storage_state.json` with a saved session.
Which document blocks are supported on export?
Headings, lists, tasks, code, quotes, tables, columns, callouts, images, boards, embedded Sheets and Bitable, synced blocks and attachments. Drawing boards are saved as images.
How do I export a branded PDF?
Install `feishu-docx[pdf]` and add flags: `feishu-docx export "<link>" --pdf --pdf-template ./brand.css --pdf-logo ./logo.svg`. `--syntax-style` sets the code highlight theme.
Discussion
No questions or reviews yet.
Related
CLI toolsA document pipeline skill: anything to markdown, markdown to clean html and publisher-grade docx, and html back to markdown
A skill and CLI that turn Markdown into DOCX, PDF, PPTX, XLSX, PNG and about a dozen more formats, all computed locally
A Firecrawl skill and CLI that lets your agent convert Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV and PDF to Markdown on your own machine
A skill plus the docx program: the agent fills forms, edits tables and reviews Word files with tracked changes
The fl CLI puts a folder of Markdown and HTML online as a site in one command and returns the URL and a claim link to an agent.
docx-skill-4-cn-paper: a Word skill for Chinese papers
docx-skill-4-cn-paper
The docx-editor-cn skill builds Word files to Chinese university rules: margins, fonts, native formulas and three-line tables
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| feishu-docx (this card) | no | 276 | ||
| feishu-cli | no | 1,448 | Another Feishu CLI; feishu-docx adds wiki-space export, browser export and branded PDF output | |
| Feishu-MCP | no | API key | 750 | Exposes MCP server tools; feishu-docx works as a CLI with a skill and writes Markdown to disk |
README in short
The package ships as a CLI with a Textual terminal interface. It exports documents, sheets and wikis to Markdown, writes back to Feishu and manages cloud-space files. The skill in `.skills/` connects these capabilities to Claude Code, Codex, Cursor and OpenCode.