Skip to main content

Compress local documentation context for coding agents.

Project description

docmancer

Compress documentation context so coding agents spend tokens on code.

PyPI version License: MIT Python 3.11 | 3.12 | 3.13

Docmancer fetches documentation, normalizes it into inspectable sections, indexes those sections with SQLite FTS5, and returns compact context packs with source attribution. The goal is agentic runway: your agent should burn tokens on implementation, tests, and debugging, not on rereading entire documentation sites.

In a typical agentic coding session, raw docs pages can consume 30 to 40 percent of the context window. Docmancer compresses that overhead by 60 to 90 percent, so the agent stays sharp longer, runs more iterations before context degradation, and produces more output per session.

Quickstart

pipx install docmancer --python python3.13

docmancer setup
docmancer add https://docs.example.com
docmancer query "How do I authenticate?"

setup creates ~/.docmancer/docmancer.yaml, initializes ~/.docmancer/docmancer.db, and installs detected agent skills. Use setup --all for non-interactive installation across all supported agents.

What It Does

  • Uses SQLite FTS5 by default. No Qdrant server, no embedding model download, no vector database startup.
  • Stores normalized sections in SQLite and writes extracted markdown/json files under .docmancer/extracted/ for inspection.
  • Supports documentation URLs, GitHub README and docs markdown, local directories, and markdown/text files.
  • Returns compact context packs with estimated docs-token savings and agentic runway.

Commands

Command What it does
docmancer setup Create config/database and install detected agent skills
docmancer setup --all Non-interactively install all supported agent integrations
docmancer add <url-or-path> Fetch or read documentation and index normalized sections
docmancer update Re-fetch and re-index all existing docs sources
docmancer update <source> Re-fetch and re-index a specific source
docmancer query <text> Return a compact markdown context pack
docmancer query <text> --format json Return the same context pack as JSON
docmancer query <text> --expand Include adjacent sections around matches
docmancer query <text> --expand page Include the full matching page, subject to the token budget
docmancer list List indexed docsets or sources
docmancer inspect Show SQLite index stats and extract locations
docmancer remove <source> Remove a source or docset root
docmancer doctor Check config, SQLite FTS5, index stats, and agent skill installs
docmancer init Create a project-local docmancer.yaml
docmancer install <agent> Advanced/manual skill installation for a single agent

Retrieval Shape

By default, query uses a 2400 token budget and returns markdown. It includes a summary like:

Context pack: ~900 tokens vs ~4800 raw docs tokens (81.2% less docs overhead, 5.33x agentic runway)

The savings are estimates, but the direction is explicit: compress docs overhead so the remaining token budget goes into useful agent work.

Keeping Docs Up To Date

Run docmancer update to refresh all indexed sources. Docmancer re-fetches each URL or re-reads each local path and updates the index in place. Only the content that changed gets reprocessed.

To update a single source:

docmancer update https://docs.example.com

Project-Local Config

Global config is stored under ~/.docmancer/ by default. To use a project-local index:

docmancer init
docmancer add ./docs

The generated docmancer.yaml points to .docmancer/docmancer.db and .docmancer/extracted inside the project. If no project config exists, docmancer falls back to the global config.

Supported Agents

setup detects common agent installations. Manual installation remains available:

docmancer install claude-code
docmancer install claude-desktop
docmancer install codex
docmancer install cursor
docmancer install cline
docmancer install gemini
docmancer install opencode

Claude Desktop receives a zip package that can be uploaded through Claude Desktop's Skills UI.

Evals

docmancer eval is available as an optional quality layer for benchmarking compression quality. It compares raw docs context against docmancer context packs and measures whether token reduction degrades answer quality.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docmancer-0.3.0.tar.gz (366.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docmancer-0.3.0-py3-none-any.whl (78.2 kB view details)

Uploaded Python 3

File details

Details for the file docmancer-0.3.0.tar.gz.

File metadata

  • Download URL: docmancer-0.3.0.tar.gz
  • Upload date:
  • Size: 366.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docmancer-0.3.0.tar.gz
Algorithm Hash digest
SHA256 48e1348c59bd47bf90b1d0ad6ba69941179c345edba850cbd4bd8b57ad73ea1d
MD5 235aade1ea7cddca89e65091a5186e75
BLAKE2b-256 f83075c7dc35f930fb0d8f5dd88b5cb5a4d137c2ea0e144ea88e92d19644fd7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for docmancer-0.3.0.tar.gz:

Publisher: publish.yml on docmancer/docmancer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docmancer-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: docmancer-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 78.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docmancer-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e4970c0701f032aa7bd8b37e34ea3ef7361ab3efb4a134e6e8c6bd7e279d7f75
MD5 0fb86e094b000b794e0d97dc4f22a6fb
BLAKE2b-256 af99754e6e9d9f2bfa2c7b0725cfb87595e824db7c5d33a08a19e523dc2c8551

See more details on using hashes here.

Provenance

The following attestation bundles were made for docmancer-0.3.0-py3-none-any.whl:

Publisher: publish.yml on docmancer/docmancer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page