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 | Registry | 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: the open-source CLI on PyPI is the main distribution. You can pull versioned, pre-indexed packs from the public registry at www.docmancer.dev, or add docs from URLs and local paths and index them yourself. Either way, sections land in a local SQLite database on your machine. There is no hosted "query API": retrieval runs in the CLI, so your agent loop stays local-first.
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 pull pytest
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
- Pull pre-indexed packs from the public registry, or add docs from any URL or local path.
- Uses SQLite FTS5 by default. No vector database, no embedding model download, no external API calls.
- Stores normalized sections in SQLite and writes extracted markdown/json files under
.docmancer/extracted/for inspection. - Supports GitBook, Mintlify, GitHub markdown, local directories, and plain text/markdown files.
- Returns compact context packs with estimated token savings and source attribution.
Registry
The docmancer registry at www.docmancer.dev is a hosted catalog of pre-indexed, version-aware documentation packs derived from package-registry metadata (PyPI, npm, and similar) and published documentation URLs. You can search for a pack, pull a specific version, and query it locally without re-crawling the source site.
docmancer search langgraph
docmancer pull langgraph-sdk
docmancer pull pytest@9.0 # optional version pin
docmancer packs # list installed packs
Trust model
Packs use a three-tier trust model:
- Official: provenance traced to package registry metadata (PyPI, npm, Go, Crates.io, RubyGems).
- Maintainer verified: maintainer has claimed ownership through the registry.
- Community: user-submitted (via
publish); requires--communityto pull and should passaudit.
In APIs and manifests, trust tier values use snake case (for example maintainer_verified).
Project manifest
Declare your project's documentation stack in docmancer.yaml:
packs:
pytest: "9.0"
uv: "0.11"
langgraph-sdk: "0.3"
Then run docmancer pull with no arguments to install everything. Share the manifest with your team so everyone has the same docs context.
Open Source and the Registry
The docmancer package on PyPI is MIT-licensed open source. The core workflows that run on your machine (add, update, query, list, inspect, remove, doctor, setup, and install) stay free and fully usable without a commercial plan; your index and queries stay local.
The hosted registry at www.docmancer.dev is optional. It provides search, pre-built pack downloads, and account-based flows like publish and auth. Paid offerings (organization registry use, priority support, and similar) apply to the hosted service, not the open-source CLI. If you never touch the registry, you still have a complete local docs tool.
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 pull [pack[@version]] |
Pull a pack from the registry (or all packs from manifest) |
docmancer search <query> |
Search the public registry for available packs |
docmancer publish <url> |
Submit a docs URL to the registry for indexing |
docmancer packs |
List locally installed registry packs |
docmancer packs sync |
Sync installed packs with manifest (additive by default; use --prune to drop mismatched or undeclared packs) |
docmancer audit <path> |
Scan a local pack archive or extracted directory for suspicious patterns |
docmancer auth login |
Authenticate with the registry (OAuth device code flow) |
docmancer auth status |
Show authentication and subscription tier |
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, docset root, or installed pack |
docmancer doctor |
Check config, SQLite FTS5, index stats, registry, 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 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
The recommended workflow combines registry packs with custom docs:
# 1. Pull pre-indexed packs for your stack
docmancer pull pytest
docmancer pull uv
# 2. Add project-specific or internal docs
docmancer add https://internal-docs.company.com
docmancer add ./docs
# 3. Query (registry packs + local docs)
docmancer query "How do I use the uv pip interface?"
Registry packs and locally indexed docs live in the same SQLite index. Queries search both seamlessly.
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.
For registry packs, run docmancer packs sync to apply the packs: pins in docmancer.yaml (install anything missing and flag version mismatches). Bump versions in the manifest when you want newer pack releases, then sync again. Use docmancer packs sync --prune to remove packs that no longer match the manifest.
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.
Add a packs: section to declare your project's documentation stack:
index:
db_path: .docmancer/docmancer.db
extracted_dir: .docmancer/extracted/
packs:
pytest: "9.0"
uv: "0.11"
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.
Quickstart | Wiki | Registry | PyPI
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.3.4.tar.gz.
File metadata
- Download URL: docmancer-0.3.4.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 |
0cdfb77a731d0bfa21fec9592c3b7254fd0f3b0b574458f7b1aa7e0aef10649e
|
|
| MD5 |
2b9d07bf759a6c1a1b897b3d5ea1d4fb
|
|
| BLAKE2b-256 |
587cade3b851b1bb6d9873c3824c2fbf0004726304223921fd159cfea553ef0d
|
Provenance
The following attestation bundles were made for docmancer-0.3.4.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.3.4.tar.gz -
Subject digest:
0cdfb77a731d0bfa21fec9592c3b7254fd0f3b0b574458f7b1aa7e0aef10649e - Sigstore transparency entry: 1312129600
- Sigstore integration time:
-
Permalink:
docmancer/docmancer@9efb49530a9048a8aca4eaa93aeed2afd7bfb7be -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/docmancer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9efb49530a9048a8aca4eaa93aeed2afd7bfb7be -
Trigger Event:
push
-
Statement type:
File details
Details for the file docmancer-0.3.4-py3-none-any.whl.
File metadata
- Download URL: docmancer-0.3.4-py3-none-any.whl
- Upload date:
- Size: 100.6 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 |
9d9ae3e162947589f63975b7c2466774faf802dc83385ef04a4dbb10c7655ad1
|
|
| MD5 |
129c149eda546ce520bd3b17b2cd3467
|
|
| BLAKE2b-256 |
5bc532a7436977501d8adf639111bcde2b8fcd4b3c6a8e8e08a37c167b275c5e
|
Provenance
The following attestation bundles were made for docmancer-0.3.4-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.3.4-py3-none-any.whl -
Subject digest:
9d9ae3e162947589f63975b7c2466774faf802dc83385ef04a4dbb10c7655ad1 - Sigstore transparency entry: 1312129703
- Sigstore integration time:
-
Permalink:
docmancer/docmancer@9efb49530a9048a8aca4eaa93aeed2afd7bfb7be -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/docmancer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9efb49530a9048a8aca4eaa93aeed2afd7bfb7be -
Trigger Event:
push
-
Statement type: