AIFeed

Show HN: Docxtract – Turn docs into clean LLM context and study guides

Original text(via HN AI)

docxtract

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

PyPI version
PyPI version
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?

FeatureStandard Web Scrapers (Firecrawl, Puppeteer)docxtract
Context DensityHigh token bloat (navbars, footers, cookie banners)70%+ noise stripped; pure content signal
Video StreamsStripped or lostPreserves <mux-player> M3U8, Loom, and YouTube embeds
Synthesis EngineRaw markdown dumps onlyBuilt-in multi-stage Map-Reduce into master_review.md
Local LLM SupportCloud API focusedNative BYOLLM ( llama.cpp , Ollama, vLLM, LM Studio)
Thinking ModelsPrompt bloat triggers context limitsToken exhaustion safeguards for DeepSeek-R1
IDE IntegrationCustom scripts requiredNative Model Context Protocol (MCP) server for Claude & Cursor
User InterfaceCLI onlyInteractive 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

  • Overview & Capabilities
  • Architecture & Internals
  • BYOLLM Configuration Guide (llama.cpp, Ollama, vLLM, Cloud)
  • Web UI User Guide
  • Google Colab Deployment Guide
  • CLI Reference
  • Community Launch & Distribution Kit

License

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

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗