FA

firecrawl/anydoc

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

2.3万 stars 质量 74 趋势 86MIT

火爬/Anydoc 是从 https://github.com/firecrawl/anydoc. 导入的特工技能候选人。

概览

火爬/Anydoc 是从 https://github.com/firecrawl/anydoc. 导入的特工技能候选人。

概述(AI 翻译)

快速 Rust 库,可将文档(Word、PowerPoint、Excel、OpenDocument、RTF、EPUB、CSV 和 PDF)转换为干净的 GitHub 风格 Markdown。包含 Node.js、Python 和浏览器(WebAssembly)的绑定。

由 Firecrawl 开发,能在个位数毫秒内将任何办公文档转换为 LLM 兼容的 Markdown,无论格式如何都能保持一致输出。它支持 Firecrawl 解析,如果你不想自己运行,托管的 API 还能提供相同的转换,还有我们为 anydoc 无法读取的扫描页面提供 OCR 模型。

试试你的浏览器:演示页面以WebAssembly形式运行库,文件会在本地转换,永远不会离开你的电脑。

快速开始

特工技能

Anydoc作为特工技能发布,所以你的特工可以读取它遇到的任何文档:

该技能教代理用 anydoc CLI 转换文档。可支持 Claude Code、Codex、Cursor、OpenCode 及其他兼容代理。

CLI

npx 在首次运行时下载你平台的预建二进制文件。对于永久的 anydoc 命令,请用 npm install -g @firecrawl/anydoc 全局安装。运行 anydoc --help 以获取所有选项。

Node.js

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

anydoc

Fast Rust library that converts documents (Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF) into clean GitHub-Flavored Markdown. Includes bindings for Node.js, Python, and the browser (WebAssembly).

Built by Firecrawl to turn any office document into LLM-ready Markdown in single-digit milliseconds, with one consistent output no matter which format goes in. It powers Firecrawl Parse, so if you’d rather not run it yourself, the hosted API gives you the same conversion plus our OCR models for the scanned pages anydoc can’t read on its own.

Try it in your browser: the demo page runs the library as WebAssembly, so files are converted locally and never leave your machine.

Quick start

Agent skill

anydoc ships as an Agent Skill, so your agent can read any document it runs into:

npx skills add firecrawl/anydoc

The skill teaches the agent to convert documents with the anydoc CLI. Works with Claude Code, Codex, Cursor, OpenCode, and any other compatible agent.

CLI

npx @firecrawl/anydoc report.docx               # Markdown to stdout
npx @firecrawl/anydoc slides.pptx -o slides.md  # or to a file
npx @firecrawl/anydoc - --format csv < data.csv # read stdin
npx @firecrawl/anydoc scan.pdf --ocr hosted     # scanned pages via Firecrawl Parse

npx downloads the prebuilt binary for your platform on first run. For a permanent anydoc command, install globally with npm install -g @firecrawl/anydoc. Run anydoc --help for all options.

Node.js

npm install @firecrawl/anydoc
import { toDocument, toMarkdown, toMarkdownBytes } from '@firecrawl/anydoc';

// From a file path:
const markdown = await toMarkdown('report.docx');

// To enable OCR:
const markdown = await toMarkdown('report.docx', { ocr: 'hosted' );

// From bytes, with the format detected from the content:
const fromBytes = await toMarkdownBytes(bytes);

// Or name it, which signature-less formats (CSV) need:
const fromCsv = await toMarkdownBytes(bytes, 'csv');

// Or stop at the document model, which also carries embedded assets:
const document = await toDocument(bytes);
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add firecrawl/anydoc
新手?先看 mcpskill.org 教程 →