Skip to content

KjellKod/doc2md

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

166 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

doc2md

Client-side conversion, no doc2md upload backend. Local files stay in your browser.


A browser-based tool that converts documents to Markdown. Drop in a file or import a document URL, convert it in the browser, review the result, download .md. The Node package and CLI also accept direct remote document URLs.

(Quest) Built for people entering AI-assisted workflows who need a frictionless way to turn existing documents into Markdown for tools like Claude Code, Codex, coding agents, or text-first editing.

Supported formats: .md .docx .xlsx .pdf .csv .tsv .pptx .html .txt .json

Quick Start

Run locally:

git clone https://github.com/KjellKod/doc2md.git
cd doc2md
npm install
npm run dev

Open http://localhost:5173/ in your browser.

The live site now includes an Install & Use tab for the package, tarball, and portable skill paths.

Use As A Package, CLI, Or Skill

If you want automation, batch jobs, MCP/server-side preprocessing, or a reusable function call, use @doc2md/core. Public npm publication is not planned at this time, so start with the beginner-first INSTALL.md guide and then use Using @doc2md/core for the package and API details.

import { convertDocuments } from "@doc2md/core";

const result = await convertDocuments(
  ["/absolute/path/resume.pdf", "/absolute/path/notes.docx"],
  {
    outputDir: "/absolute/path/out",
    maxDocuments: 10
  }
);

The package writes markdown files to disk and returns structured metadata about each document. If you want a copyable agent wrapper, use .skills/doc-to-markdown/, which delegates to the same package contract.

See INSTALL.md for global and project-local tarball install steps, and Using @doc2md/core for API examples, CLI usage, output behavior, and skill setup.

Single file with a project-local install:

npx doc2md /absolute/path/resume.pdf -o ./out

Multiple files in one run:

npx doc2md /absolute/path/a.pdf /absolute/path/b.docx -o ./out

Command line access:

doc2md /absolute/path/resume.pdf -o ./out

Agent instructions using skills:

/doc2md convert /absolute/path/resume.pdf and <some instruction>

Principles

  • Client-side first — local files are processed in the browser, and remote URLs are fetched directly by it
  • Honest over magical — PDFs degrade gracefully with clear warnings
  • Simple over clever — common cases handled well, no fake completeness

Architecture

doc2md is a browser-first tool: conversion runs in the browser, output stays local, and there is no backend, server-side worker, or server path in the current product. Local files never leave the browser; remote document URLs are downloaded directly by it and still avoid any doc2md-owned upload path. The PDF converter does use a browser-side PDF.js worker as an implementation detail. See docs/architecture.md for the bounded design and format limits.

Documentation


License

This project is licensed under the MIT License.

doc2md is built with Quest — vetted by Dexter and narrated by Jean-Claude, for a deliberate and robust engineering tool. An initiative through CandidTalentEdge.

About

Document to Markdown

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors