{"_id":"@shiftlabs/markit","name":"@shiftlabs/markit","dist-tags":{"latest":"0.6.1"},"versions":{"0.6.1":{"name":"@shiftlabs/markit","version":"0.6.1","description":"Convert anything to markdown. PDF, DOCX, PPTX, XLSX, HTML, EPUB, Jupyter, RSS, images, audio, URLs, and more. Works as a CLI and as a library.","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js","default":"./dist/index.js"},"./cli":"./dist/main.js"},"bin":{"markit":"dist/main.js"},"scripts":{"build":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc","prepublishOnly":"npm run build && napi prepublish -t npm --skip-gh-release","dev":"bun run src/main.ts","test":"bun test","format":"bunx biome format --write src/","format:rust":"cd rust && cargo fmt","lint":"bunx biome lint src/","lint:rust":"cd rust && cargo clippy","check":"bunx biome check src/","check:rust":"cd rust && cargo fmt --check && cargo clippy --all-targets -- -D warnings","check:all":"npm run check && npm run check:rust","build:native":"napi build --release --strip --platform --features napi --cargo-flags=--no-default-features --cargo-cwd rust","artifacts":"napi artifacts","verify":"npm run check:all && cd rust && cargo test && cd .. && npm run build:native && bun test && npm run build"},"engines":{"node":"^20.19.0 || >=22.12.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/shift-labs-ai/markit.git"},"homepage":"https://github.com/shift-labs-ai/markit#readme","bugs":{"url":"https://github.com/shift-labs-ai/markit/issues"},"keywords":["markdown","pdf","docx","html","converter","rust","agents"],"license":"MIT","devDependencies":{"@biomejs/biome":"^2.3.14","@napi-rs/cli":"2.18.4","@types/node":"^25.5.0","typescript":"^5.8.0"},"dependencies":{"chalk":"^5.6.2","commander":"^14.0.3"},"napi":{"name":"markit","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-unknown-linux-musl"]}},"optionalDependencies":{"@shiftlabs/markit-darwin-arm64":"0.6.1","@shiftlabs/markit-darwin-x64":"0.6.1","@shiftlabs/markit-linux-x64-gnu":"0.6.1","@shiftlabs/markit-linux-arm64-gnu":"0.6.1","@shiftlabs/markit-linux-x64-musl":"0.6.1","@shiftlabs/markit-linux-arm64-musl":"0.6.1"},"_id":"@shiftlabs/markit@0.6.1","gitHead":"4771a7c1cccbd1038784eba3c674cbce53c00208","_nodeVersion":"22.23.2","_npmVersion":"10.9.8","dist":{"integrity":"sha512-GHsT3pxRL+EaBLXwwz5RW5XVmunZuAR6wHUYTomfV8/+dD1JlJbuzgkEVmCDLn2DlPZbxCsN92M1NerLmkEcsQ==","shasum":"b01168f488feba8353bab5c22e874a26d1d89c0c","tarball":"https://registry.npmjs.org/@shiftlabs/markit/-/markit-0.6.1.tgz","fileCount":22,"unpackedSize":38981,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCuPZIxWg99o1rhKuJpmnDKgNNk9t3umtE8IcfXlYUc2AIgHBl+wiTBGvrusSjENnOsjZv5yV+pdbaBzvca4d1+lIU="}]},"_npmUser":{"name":"miclivs","email":"livsmichael@gmail.com"},"directories":{},"maintainers":[{"name":"miclivs","email":"livsmichael@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/markit_0.6.1_1786997934978_0.8651596042962353"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T20:18:54.747Z","0.6.1":"2026-08-17T20:18:55.156Z","modified":"2026-08-17T20:18:55.554Z"},"maintainers":[{"name":"miclivs","email":"livsmichael@gmail.com"}],"description":"Convert anything to markdown. PDF, DOCX, PPTX, XLSX, HTML, EPUB, Jupyter, RSS, images, audio, URLs, and more. Works as a CLI and as a library.","homepage":"https://github.com/shift-labs-ai/markit#readme","keywords":["markdown","pdf","docx","html","converter","rust","agents"],"repository":{"type":"git","url":"git+https://github.com/shift-labs-ai/markit.git"},"bugs":{"url":"https://github.com/shift-labs-ai/markit/issues"},"license":"MIT","readme":"# markit\n\nConvert anything to markdown. PDF, DOCX, PPTX, XLSX, HTML, EPUB, Jupyter, RSS, images, audio, URLs, and more. Works as a CLI and as a library.\n\n```bash\nnpm install -g @shiftlabs/markit\n```\n\n---\n\n## Quick Start\n\n```bash\n# Documents\nmarkit report.pdf\nmarkit document.docx\nmarkit slides.pptx\n\n# Data\nmarkit data.csv\nmarkit config.json\nmarkit schema.yaml\n\n# Web\nmarkit https://example.com/article\nmarkit https://en.wikipedia.org/wiki/Markdown\n\n# Media\nmarkit photo.jpg                          # EXIF metadata\nmarkit recording.mp3                      # Audio metadata\n\n# Text only, skipping image extraction\nmarkit report.pdf --no-images\n\n# Write to file\nmarkit report.pdf -o report.md\n\n# Pipe it\nmarkit report.pdf | pbcopy\nmarkit data.xlsx -q | napkin create \"Imported Data\"\n```\n\n---\n\n## Supported Formats\n\n| Format | Extensions | How |\n|--------|-----------|-----|\n| PDF | `.pdf` | Built-in Rust engine |\n| Word | `.docx` | Built-in Rust engine; headings, images, and tables |\n| PowerPoint | `.pptx` | Built-in Rust engine; slides, notes, and tables |\n| Excel | `.xlsx` | Built-in Rust engine; sheets become markdown tables |\n| HTML | `.html` `.htm` | Built-in Rust engine; scripts/styles stripped |\n| EPUB | `.epub` | Built-in Rust engine; spine-ordered chapters |\n| Jupyter | `.ipynb` | Built-in Rust engine; cells and outputs |\n| RSS/Atom | `.rss` `.atom` `.xml` | Built-in Rust engine; dated feed items |\n| CSV/TSV | `.csv` `.tsv` | Built-in Rust engine; markdown tables |\n| JSON | `.json` | Built-in Rust engine; formatted code block |\n| YAML | `.yaml` `.yml` | Built-in Rust engine; code block |\n| XML/SVG | `.xml` `.svg` | Built-in Rust engine; code block |\n| Images | `.jpg` `.png` `.gif` `.webp` | Built-in Rust metadata extraction |\n| Audio | `.mp3` `.wav` `.m4a` `.flac` | Built-in Rust metadata extraction |\n| ZIP | `.zip` | Built-in Rust recursive conversion |\n| URLs | `http://` `https://` | Rust fetcher with markdown negotiation |\n| Wikipedia | `*.wikipedia.org` | Built-in Rust main-content extraction |\n| Code | `.py` `.ts` `.go` `.rs` ... | Built-in Rust fenced code block |\n| Plain text | `.txt` `.md` `.rst` `.log` | Built-in Rust pass-through |\n\n\n---\n\n## Benchmarks\n\nNon-OCR PDF to Markdown: parsers that read the text layer already inside a\nPDF, with no OCR and no model calls. Measured on one machine, with image\nextraction off for every parser.\n\n| | markit | liteparse | anydoc |\n|---|---:|---:|---:|\n| olmOCR-bench score | **45.0%** | 38.8% | 31.2% |\n| shitty-pdf-bench text recovered | **100.0%** | 83.2% | 91.0% |\n| shitty-pdf-bench conversion time | **23.2s** | 55.4s | 322.2s |\n\nolmOCR-bench is AllenAI's public benchmark. shitty-pdf-bench is ours: 40\nhash-pinned public PDFs, 50,884 pages of semiconductor manuals, standards,\nRTL documents, scans, and malformed files.\n\nMethod, provenance, and per-category results are in\n[rust/BENCHMARKS.md](rust/BENCHMARKS.md); the harness that reproduces them\nis in [benchmark/](benchmark/).\n\n---\n\n## For Agents\n\nEvery command supports `--json`. Raw markdown with `-q`.\n\n```bash\nmarkit report.pdf --json       # Structured output for parsing\nmarkit report.pdf -q           # Raw markdown, nothing else\nmarkit onboard                 # Add instructions to CLAUDE.md\n```\n\n---\n\n## SDK\n\nmarkit is also a Node library. Every format uses the same bundled Rust engine as the CLI on supported macOS and Linux platforms—there is no second fallback implementation:\n\n```typescript\nimport { Markit } from \"@shiftlabs/markit\";\n\nconst markit = new Markit();\nconst { markdown } = await markit.convertFile(\"report.pdf\");\nconst { markdown } = await markit.convertUrl(\"https://example.com\");\nconst { markdown } = await markit.convert(buffer, { extension: \".docx\" });\n```\n\n---\n\n## CLI Reference\n\n```bash\nmarkit <source>                          # Convert file or URL\nmarkit <source> -o output.md             # Write to file\nmarkit <source> --json                   # JSON output\nmarkit <source> -q                       # Raw markdown only\nmarkit <source> --no-images              # Skip image extraction\nmarkit <source> -i ./images              # Extract images to a directory\ncat file.pdf | markit -                  # Read from stdin\nmarkit formats                           # List supported formats\nmarkit onboard                           # Add to CLAUDE.md\n```\n\n---\n\n## Development\n\n```bash\nbun install\nbun run build:native\nbun run dev -- report.pdf\nbun test\nbun run check\ncd rust && cargo test\n```\n\n## Distribution\n\nReleases publish `@shiftlabs/markit` plus six scoped native binary packages\nfor macOS and Linux (x64/ARM64, glibc/musl). npm selects the matching binary\nthrough `optionalDependencies`. The former `markit-ai` package is a deprecated\ncompatibility shim that re-exports this SDK.\n\n```bash\n# 1. Update the same version in package.json, rust/Cargo.toml,\n#    and npm/*/package.json.\n# 2. Verify locally.\nbun run verify\n\n# 3. Tag and push. GitHub Actions builds and publishes all seven packages.\ngit tag v0.6.0\ngit push origin v0.6.0\n```\n\nThe release workflow requires an npm automation token in the repository secret\n`NPM_TOKEN`. It publishes platform packages first through `napi prepublish`,\nthen `@shiftlabs/markit`, then the deprecated `markit-ai` shim, and finally\ncreates the GitHub release.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-f35ae9c22d201d3eb18ddbcd4e8aec1f"}