Repository avatar
AI Tools
v0.8.1
active

complydoc

io.github.complydoc/complydoc

Open documents with personal details masked and hidden instructions taken out, on your machine.

Documentation

complydoc

Get document loading right.

Compare loaders, trace every step and evaluate what reaches your model.

PyPI Tests Documentation License


The complydoc viewer: a LangChain ingestion pipeline traced step by step, each loader, splitter, vector store and embedding call on a time axis with its time, cost and the identifiers it passed on

A PDF can say one thing to a person and another to your model. White text, tiny type, an IBAN behind a black bar: it's all still in the text layer, and most loaders pass it straight through. complydoc shows what your loaders actually extracted, flags hidden text and personal and financial identifiers before they're embedded, and traces every ingestion step with its time and cost. Nothing leaves your machine.

Works with LangChain, LlamaIndex, Unstructured, Haystack, Docling, LlamaParse, Azure Document Intelligence, Marker, Chonkie and the common vector stores and embedding APIs.

Try it

uv tool install complydoc
complydoc ui ./documents

complydoc ui audits the folder and opens the viewer on it, served from your machine. To see a hidden clause caught, try the one-page contract in examples/hidden_clause.pdf.

In your assistant

complydoc mcp lets Claude, Cursor or any MCP client open documents with personal and financial details masked and hidden instructions taken out. In Claude Code:

/plugin install complydoc --marketplace complydoc/complydoc

Elsewhere, run it with uvx complydoc mcp; it is in the MCP Registry as io.github.complydoc/complydoc. Claude Desktop installs it from the extension on the releases page. See Documents into an assistant, cleaned.

Observe a pipeline

import complydoc as cd

with cd.observe("contracts-ingest"):
    documents = PyMuPDF4LLMLoader("contract.pdf").load()
    chunks = splitter.split_documents(documents)
    vector_store.add_documents(chunks)

Every loader, splitter, embedding call and vector store becomes a step, with its settings, time, tokens, cost and the identifiers it passed on. Open it with complydoc ui.

What it shows

  • Traces of each ingestion step, and how runs compare over time.
  • Loader diffs: each loader's reading of a page side by side, with the page itself.
  • Identifiers from Europe, the Americas, India and Australia, checksum-validated and masked until you choose to see them.
  • Hidden content: text a reader does not see and a model does, and instructions written to a model.
  • Evals: the facts a document must keep, checked on every reading.
  • Chunks and cost: splitters side by side, and tokens priced across models.

In CI

- uses: complydoc/complydoc@v0.8.1
  with:
    path: documents
    policy: policy.yaml

complydoc check fails when a folder breaks your rules; finance, legal and hr ship as ready policies. See GitHub Action.

More

If complydoc is useful to you, a star helps other engineers find it.

PYPI
complydoc
Install Command
pip install complydoc
Runtime: uvx