usage

Examples

Real workflows for hybrid docs retrieval, local file ingest, and deliberate memory.

Updated

Ingest a local docs folder

docmancer docs add ./docs

Mixed file formats are fine. Markdown, text, PDF, DOCX, RTF, and HTML parsers all ship in the base install.

Add a docs site

docmancer docs add https://docs.pytest.org

Docmancer detects the platform and chooses the fetch strategy:

Detected platform: generic
Indexed sections with SQLite FTS5 + sqlite-vec dense vectors

Add a GitHub repo

docmancer docs add https://github.com/vercel/next.js

Extracts the README and docs/ directory.

Query with hybrid mode and explain

docmancer docs query "How do I parametrize a pytest fixture?" --mode hybrid --explain

Each result is annotated with the per-source rank that contributed (lexical#1, dense#3, sparse#2).

Query with JSON output

docmancer docs query "pytest fixture scope" --format json

Useful for piping into other tools.

Expand context to full pages

docmancer docs query "Next.js middleware" --expand
docmancer docs query "Next.js middleware" --expand page

--expand includes adjacent sections; --expand page returns full pages within the token budget.

Increase the token budget

docmancer docs query "OAuth 2.0 flow" --budget 3000

The default is 2400 tokens.

Skip vectors for a quick lexical-only run

docmancer docs add ./docs --no-vectors
docmancer docs query "exact error message text" --mode lexical

Useful when you want fast FTS5 without the embedding pass.

Update a source

docmancer docs sync https://docs.pytest.org
docmancer docs sync

The second form re-fetches every source. Unchanged sections skip re-embedding via the content-hash cache.

Record a decision and read it back

docmancer write $'# Schema changes\n\nEvery schema change needs rollback notes.' \
  --path constraints/schema-changes.md \
  --scope project

docmancer ask "what do we require for schema changes?"
docmancer timeline --limit 10

Then review the file before committing:

git diff -- .docmancer/tree/

Manage the scale-profile Qdrant process

docmancer qdrant status
docmancer qdrant down
docmancer qdrant up
docmancer qdrant logs

These only apply on --profile scale. The default local profile has no daemon to manage.

Remove and clear

docmancer docs remove https://docs.pytest.org
docmancer docs remove --all

--all clears the index but keeps your config.