Skip to main content

docxtract

Universal Documentation Crawler, High-Density Markdown Extractor & BYOLLM Synthesis Toolkit

PyPI version License Open In Colab Python 3.10+ Model Context Protocol Ready BYOLLM


Built for LLM Context Windows (70%+ Token Noise Reduction):
Standard web scrapers dump megabytes of raw HTML, repetitive navigation menus, cookie banners, and script tags that exhaust context windows and dilute model attention. docxtract is specifically engineered to produce compact, high-density, concise Markdown extracts. It preserves code blocks, YAML schemas, markdown tables, and video walkthrough links while eliminating 70%+ of webpage noise—giving your local or cloud LLM pure, high-signal context with zero token bloat.


Why docxtract?

Feature Standard Web Scrapers (Firecrawl, Puppeteer) docxtract
Context Density High token bloat (navbars, footers, cookie banners) 70%+ noise stripped; pure content signal
Video Streams Stripped or lost Preserves <mux-player> M3U8, Loom, and YouTube embeds
Synthesis Engine Raw markdown dumps only Built-in multi-stage Map-Reduce into master_review.md
Local LLM Support Cloud API focused Native BYOLLM (llama.cpp, Ollama, vLLM, LM Studio)
Thinking Models Prompt bloat triggers context limits Token exhaustion safeguards for DeepSeek-R1
IDE Integration Custom scripts required Native Model Context Protocol (MCP) server for Claude & Cursor
User Interface CLI only Interactive Web UI (localhost:7860) & 1-Click Colab

Architecture

                       ┌─────────────────────────────────────────┐
                       │ Target Documentation / Course Portal    │
                       └────────────────────┬────────────────────┘
                                            │
                                            ▼
                       ┌─────────────────────────────────────────┐
                       │         docxtract Crawl Engine          │
                       │  - Cleans boilerplate, nav & footers    │
                       │  - Extracts Mux streams, iframes, video │
                       │  - Generates structured Markdown files  │
                       └────────────────────┬────────────────────┘
                                            │
                                            ▼
                       ┌─────────────────────────────────────────┐
                       │     Universal BYOLLM Client Layer       │
                       │  - llama.cpp (http://localhost:8080/v1) │
                       │  - Ollama (http://localhost:11434/v1)   │
                       │  - LM Studio / vLLM / OpenAI / Groq     │
                       └────────────────────┬────────────────────┘
                                            │
                                            ▼
                       ┌─────────────────────────────────────────┐
                       │   Master Review & Synthesis Engine      │
                       │  - Stage 1: Document Distillation       │
                       │  - Stage 2: Executive Synthesis         │
                       │  - Stage 3: Master Compendium Assembly  │
                       └─────────────────────────────────────────┘

Real-World Showcase

Check out the real-world extraction and synthesis generated from 12 articles of the Warp Software Factory engineering course: 👉 View the 1,220-line Master Technical Review

  • Raw HTML Size: ~115,000 tokens
  • docxtract Markdown Size: ~18,000 tokens (84% token reduction)
  • Synthesis Time: ~2 minutes with local Ollama (llama3.3)

Quickstart

1. Installation

Install via PyPI:

pip install docxtract-ai

Or install from source:

git clone https://github.com/raycollabs/docxtract.git
cd docxtract
pip install -e .

2. Launch the Web UI

docxtract ui

Open http://localhost:7860 in your browser. Configure your target URL, pick your model preset, test the endpoint, and run the pipeline!


CLI Usage

Test Endpoint Connection

# Check local llama.cpp
docxtract test-llm --base-url http://localhost:8080/v1

# Check local Ollama
docxtract test-llm --base-url http://localhost:11434/v1 --model llama3.3

Crawl Documentation

docxtract crawl https://www.warp.dev/learn --depth 2 --output ./output

Synthesize Master Review

docxtract synthesize ./output --base-url http://localhost:11434/v1 --model llama3.3

Model Context Protocol (MCP) Server

docxtract includes a native stdio MCP server for Claude Desktop, Cursor, and Windsurf. Your AI assistant can crawl and synthesize documentation directly inside your IDE!

Add to Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "docxtract": {
      "command": "docxtract",
      "args": ["mcp"]
    }
  }
}

Add to Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "docxtract": {
      "command": "docxtract",
      "args": ["mcp"]
    }
  }
}

Exposed MCP Tools:

  • crawl_docs: Crawls an entire doc portal into clean markdown.
  • extract_page: Instantly extracts a single documentation URL into dense markdown for prompt injection.
  • synthesize_docs: Synthesizes a folder of docs into master_review.md using local BYOLLM.

Documentation


License

Distributed under the Apache-2.0 License. See LICENSE for details.

Metadata

Release files for docxtract-ai 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docxtract-ai 0.1.0
File Size Uploaded Provenance Actions
docxtract_ai-0.1.0.tar.gz 21.5 kB Without provenance Details for docxtract_ai-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for docxtract-ai 0.1.0
File Interpreter ABI Platform Actions
docxtract_ai-0.1.0-py3-none-any.whl Python 3 none any Details for docxtract_ai-0.1.0-py3-none-any.whl

Total release size: 43.5 kB

Release files / docxtract_ai-0.1.0.tar.gz

Download URL docxtract_ai-0.1.0.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4418814d555b36b43e75fee35d2fabbd2f24704388c1fd951f21a60097b58056
BLAKE2b-256 checksum
How to use checksums
94f627c76f8e24149fb3aeb84e051ab04193bfeeca0fabe3e6ccd5b8730e557e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / docxtract_ai-0.1.0-py3-none-any.whl

Download URL docxtract_ai-0.1.0-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de1f8eb673cb51c32c38bbe70bf250656258cf0f0cd3f2c75619d733a7bd87de
BLAKE2b-256 checksum
How to use checksums
da470c9a42cdbaf5eda74b2549ee1a23ee7d4ae655edf3137de88e53ceab3778
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for docxtract-ai 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page