Skip to content
Projets

À propos

A fast, lightweight HTML to Markdown converter optimized for LLM consumption. Uses proven parsing libraries to deliver clean, well-structured markdown with intelligent content extraction and noise filtering.

Développement web et applicatif

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

get-md

A fast, lightweight HTML, PDF, DOCX, and Markdown to Markdown converter optimized for LLM consumption — built by the Nano Collective, a community collective building AI tooling not for profit, but for the community. Everything we build is open, transparent, and driven by the people who use it.

Lightning-fast (<100ms) with optional AI-powered conversion using a local LLM model. Pass in HTML, PDF, DOCX, Markdown files, or a URL and get clean, structured Markdown back — as a library or from the command line.


Build Status Coverage Version NPM Downloads NPM License Repo Size Stars Forks

Quick Start

npm install @nanocollective/get-md
import { convertToMarkdown } from "@nanocollective/get-md";

const result = await convertToMarkdown("https://example.com");
console.log(result.markdown);

Or use the CLI:

npx @nanocollective/get-md https://example.com -o output.md
npx @nanocollective/get-md handbook.pdf -o output.md
npx @nanocollective/get-md document.docx -o output.md

Mermaid Diagrams

Diagrams are usually the first casualty of an HTML-to-Markdown conversion. get-md handles them four ways — the Diagrams & Mermaid guide covers each in full:

  • Preserved — a ```mermaid fence already in your HTML or Markdown comes out unchanged. On by default, no extra dependencies.
  • Recovered — when a docs site has already rendered a diagram to <svg>, get-md pulls the original source back out of the DOM. On by default.
  • Reconstructed — diagrams drawn into a PDF can be rebuilt by a remote vision model. Opt-in, best-effort; needs pdfjs-dist and @napi-rs/canvas.
  • Validated — validateMermaid: true parses every Mermaid block and annotates the ones that fail, keeping the original so you can repair it. Opt-in; needs mermaid.
npm install mermaid
const result = await convertToMarkdown(source, {
  inputType: "markdown",
  validateMermaid: true,
});

Run examples/mermaid-diagrams.ts to see all of it working offline.

Documentation

Full documentation is available online at docs.nanocollective.org or in the docs/ folder:

  • Getting Started — Installation, requirements, and your first conversion
  • API Reference — Full reference for the library API
  • CLI — Command-line interface usage and options
  • Guides — LLM-powered conversion, Mermaid diagrams, React Native, and configuration tips
  • Configuration — Config files and options reference
  • Community — Contributing, Discord, and how to help

Community

The Nano Collective is a community collective building AI tooling for the community, not for profit. We'd love your help.

Explorer des projets similaires

Chargement…