Compress local documentation context for coding agents.
Project description
docmancer
Compress documentation context so coding agents spend tokens on code, not docs.
Get Started | What It Does | Bench | Supported Agents | Docs
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.
Product shape: an MIT-licensed CLI on PyPI. You point it at a docs URL or local path with add, it indexes sections into a local SQLite database, and your coding agent calls docmancer query through an installed skill. There is no hosted query API, no servers, and no API keys on the core path. An optional benchmarking harness (docmancer bench) compares retrieval backends (SQLite FTS, Qdrant vector, RLM) on your own corpus.
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.pytest.org
docmancer query "How do I use fixtures?"
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
- Fetch docs from URLs, GitHub repos, or local paths and index them locally with SQLite FTS5.
- No vector database, no embedding model downloads, and no external API calls on the core path.
- Stores normalized sections in SQLite and writes extracted markdown/json files under
.docmancer/extracted/for inspection. - Supports GitBook, Mintlify, generic web crawl, GitHub markdown, local directories, and plain text/markdown files.
- Returns compact context packs with estimated token savings and source attribution.
- Optional benchmarking:
docmancer benchcompares FTS, Qdrant vector, and RLM retrieval backends on the same dataset with reproducible artifacts.
Benchmark retrieval backends
docmancer bench is a local harness for comparing retrieval backends on your own docs. FTS ships in the core install; Qdrant and RLM are experimental and behind optional extras.
# Core FTS backend. No extras required.
docmancer bench init
docmancer bench dataset create --from-corpus ./my-docs --size 30 --name mydocs
docmancer bench run --backend fts --dataset mydocs --run-id mydocs_fts
docmancer bench report mydocs_fts # single-run summary
# Optional experimental backends. Install the extras up front so pipx
# records them for the docmancer app (see "Optional Extras" below for
# alternatives).
pipx install 'docmancer[vector,rlm,judge]' --python python3.13
docmancer bench run --backend qdrant --dataset mydocs --run-id mydocs_qdrant
docmancer bench run --backend rlm --dataset mydocs --run-id mydocs_rlm
# Compare needs two or more run IDs.
docmancer bench compare mydocs_fts mydocs_qdrant mydocs_rlm
Every run writes config.snapshot.yaml, retrievals.jsonl, answers.jsonl, metrics.json, and report.md under .docmancer/bench/runs/<run_id>/. A content-hashed ingest_hash guards against comparing runs across drifted corpora. All backends see the same canonical section chunks so metrics are apples-to-apples. See wiki/Commands.md for the full command list and wiki/Configuration.md for tunables.
Legacy .docmancer/eval_dataset.json files are accepted read-only; convert them with docmancer bench dataset create --from-legacy <path>.
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 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 remove --all |
Remove everything indexed (keeps the config) |
docmancer doctor |
Check config, SQLite FTS5, index stats, and agent skill installs |
docmancer fetch <url> --output <dir> |
Download docs to markdown files without indexing |
docmancer init |
Create a project-local docmancer.yaml |
docmancer install <agent> |
Manual skill installation for a single agent |
docmancer bench ... |
Benchmarking harness (see the section above) |
Retrieval Shape
By default, query uses a 2400 token budget and returns markdown with 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.
Workflow
# 1. Add the docs your agent should see
docmancer add https://docs.pytest.org
docmancer add ./docs
# 2. Install a skill into your agent
docmancer install claude-code
# 3. Query from the CLI or from the agent
docmancer query "How do I use fixtures?"
All agents you install share the same local SQLite index.
Keeping Docs Up To Date
Run docmancer update to refresh all locally-added sources. Docmancer re-fetches each URL or re-reads each local path and updates the index in place.
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.
A bench: block can override bench paths and defaults:
index:
db_path: .docmancer/docmancer.db
extracted_dir: .docmancer/extracted/
bench:
datasets_dir: .docmancer/bench/datasets
runs_dir: .docmancer/bench/runs
backends:
k_retrieve: 10
k_answer: 5
Legacy eval: blocks are translated automatically with a deprecation warning.
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 github-copilot
docmancer install opencode
Claude Desktop receives a zip package that can be uploaded through Claude Desktop's Skills UI.
Optional Extras
| Extra | Enables |
|---|---|
docmancer[browser] |
Playwright-backed fetcher for JS-heavy sites |
docmancer[crawl4ai] |
Alternative fetcher for hard-to-scrape sites |
docmancer[vector] |
Qdrant vector backend for docmancer bench |
docmancer[rlm] |
RLM backend for docmancer bench |
docmancer[judge] |
LLM-as-judge answer scoring via ragas |
docmancer[ragas] |
Deprecated alias for [judge]; will be removed in the next minor |
Fresh install with extras (recommended):
pipx install 'docmancer[vector,rlm,judge]' --python python3.13
Adding extras to an existing pipx install (pipx won't re-read extras on a second pipx install; inject the deps into the existing venv instead):
pipx inject docmancer 'qdrant-client>=1.7.0' 'fastembed>=0.2.0' # [vector]
pipx inject docmancer 'rlm>=0.1.0' # [rlm]
pipx inject docmancer 'ragas>=0.2.0' # [judge]
Or reinstall with pipx install 'docmancer[...]' --force --python python3.13. Plain pip users can install any combination directly: pip install 'docmancer[vector,rlm,judge]'.
Quickstart | Wiki | PyPI | Changelog
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docmancer-0.4.0.tar.gz.
File metadata
- Download URL: docmancer-0.4.0.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fbb1931b547bf68225456cb719733a6d57c49ae4fa6d47ac7b7d85c660c3ae4
|
|
| MD5 |
f2fd6324e3aa59b439a0ea6b045d623a
|
|
| BLAKE2b-256 |
cd322b4c5c29a24c41af2b9a799b0118b4b94b4496d6d7cd6be2d33e8f864bee
|
Provenance
The following attestation bundles were made for docmancer-0.4.0.tar.gz:
Publisher:
publish.yml on docmancer/docmancer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docmancer-0.4.0.tar.gz -
Subject digest:
5fbb1931b547bf68225456cb719733a6d57c49ae4fa6d47ac7b7d85c660c3ae4 - Sigstore transparency entry: 1347371097
- Sigstore integration time:
-
Permalink:
docmancer/docmancer@38a43d5665463dde18cdf1a8a2fa8240c6db27c0 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/docmancer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@38a43d5665463dde18cdf1a8a2fa8240c6db27c0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file docmancer-0.4.0-py3-none-any.whl.
File metadata
- Download URL: docmancer-0.4.0-py3-none-any.whl
- Upload date:
- Size: 112.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1e5a05eb0da7419b3b777056b7cc5e89603b0607dc3d01e34ffc410bf55d853
|
|
| MD5 |
a42de7ff9cea558a79e8f44b85dd5820
|
|
| BLAKE2b-256 |
2b76fc311e5edbd77f672adf6527be8daeb08ea574a489354471e0697f38de40
|
Provenance
The following attestation bundles were made for docmancer-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on docmancer/docmancer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
docmancer-0.4.0-py3-none-any.whl -
Subject digest:
d1e5a05eb0da7419b3b777056b7cc5e89603b0607dc3d01e34ffc410bf55d853 - Sigstore transparency entry: 1347371345
- Sigstore integration time:
-
Permalink:
docmancer/docmancer@38a43d5665463dde18cdf1a8a2fa8240c6db27c0 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/docmancer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@38a43d5665463dde18cdf1a8a2fa8240c6db27c0 -
Trigger Event:
push
-
Statement type: