Skip to main content Switch to mobile version contaix 0.0.37 Tools to make contexts for AI
pip install contaix==0.0.37 Copy PIP instructions
Tools to make contexts (knowledge bases) for AI.
contaix turns diverse sources — code repos, documentation sites, file collections — into clean markdown contexts for AI agents to consume.
pip install contaix Skills
This package ships agent skills you can install into any agent host with gh skill (don't have it? install gh):
gh skill install thorwhalen/contaix contaix-acquire-docs --agent claude-code gh skill install thorwhalen/contaix contaix-docs-to-markdown gh skill install thorwhalen/contaix contaix-web-aggregate Skill Use it when… contaix-acquire-docs acquiring a tool's docs (plus OpenAPI/MCP/GraphQL specs) as one agent-ready markdown bundle, cheapest source first contaix-docs-to-markdown converting a documentation website into a single clean markdown file contaix-web-aggregate aggregating arbitrary (non-docs) web pages into structured markdown, with manual control The last two were named contaix_docs_to_markdown and contaix_web_aggregate until 2026-11: skill names must be lowercase and hyphenated. A copy installed under an old name keeps working; reinstall it under the new name to get updates.
Documentation site → single markdown file
from contaix.web import site_to_markdown site_to_markdown( "https://fal.ai/docs/documentation", output_file="~/Downloads/fal_ai_docs.md", verbose=True, ) site_to_markdown first probes the site for a publisher-provided /llms-full.txt bundle (Mintlify, Docusaurus, Fern, and others ship one). If found, it returns that directly — one HTTP request, clean markdown, no scraping. Otherwise it falls back to discovering navigation, fetching every page (with caching), and aggregating.
To bypass the fast path or grab the bundle yourself:
from contaix.web import find_llms_full_url, fetch_llms_full bundle_url = find_llms_full_url("https://fal.ai/docs") # str or None markdown = fetch_llms_full("https://fal.ai/docs") # str or None Code base → single markdown file
from contaix import code_aggregate # A local package md = code_aggregate("contaix") # A directory md = code_aggregate("/path/to/project") # A GitHub repo (downloaded via hubcap) md = code_aggregate("https://github.com/addaix/contaix") # Save instead of return code_aggregate("contaix", egress="/tmp/contaix_code.md") Files → markdown
from contaix import bytes_to_markdown, bytes_store_to_markdown_store from dol import Files # Single file (auto-detects format) md = bytes_to_markdown(open("report.pdf", "rb").read(), input_format="pdf") # A whole folder src = Files("/path/to/documents") target = {} bytes_store_to_markdown_store(src, target) Markdown conversion is delegated to dn.src and supports PDF, DOCX, XLSX, PPTX, HTML, IPYNB, and more.
PDFs convert to flat text under ### Page N headers by default: fast and light. When the tables and section headings matter, pass Docling as the PDF converter (pip install 'dn[docling]'; it installs torch and downloads models on first use, and is 50 to 200 times slower):
from dn.docling_pdf import docling_converters md = bytes_to_markdown(pdf_bytes, input_format="pdf", converters=docling_converters()) bytes_store_to_markdown_store(src, target, converters=docling_converters()) markitdown was weighed for the same job and not adopted: it was no better than dn on these formats and turned two-column PDF prose into false tables.
Cleanup of messy markdown (e.g. ChatGPT exports)
from contaix import remove_hyperlink_crap, remove_improperly_double_newlines # Reads from clipboard if no arg, copies result back clean = remove_hyperlink_crap() Pure transforms live in dn.repair; the contaix wrappers add clipboard integration.
URLs in prose → article PDFs
from contaix import extract_urls, download_articles, verify_urls # Inspect what URLs are in a string list(extract_urls("[OpenAI](https://openai.com) and https://anthropic.com")) # -> [('OpenAI', 'https://openai.com'), ('https://anthropic.com', 'https://anthropic.com')] # Verify they resolve verify_urls(["https://openai.com", "https://anthropic.com"]) # -> {'https://openai.com': 200, 'https://anthropic.com': 200} # Download as PDFs (delegates to pdfdol) download_articles(some_md_string, save_dir="~/Downloads/articles") Package Map
contaix/ web.py # site_to_markdown, find_llms_full_url, RSC extraction code.py # code_aggregate, PackageCodeContexts, GitHub fetch markdown.py # bytes_to_markdown (delegates to dn.src) urls.py # extract_urls, verify_urls, download_articles aggregation.py # aggregate_store with deduplication and chunking util.py # markdown_of_site, scrape utilities, clipboard helpers skills.py # discover/install OTHER ecosystem packages' skills contaix's own agent skills live at the repo root in skills/ (gh-distributed — see the Skills section above), symlinked into .claude/skills/.
Functions are the primary interface; classes are reserved for stateful workflows (e.g. PackageCodeContexts).
dol store abstractions for file/data access throughout.
Smart defaults with keyword-only configurability — out of the box for common cases, fully parameterizable when needed.
Pure transforms live in domain packages (dn, pdfdol); contaix is the orchestration and UX layer.
Optional dependencies
pdfdol — for download_articles and PDF round-trips (pip install contaix[pdf])
dn[all] — for the full set of file-format converters (pip install contaix[all])
dn — pure markdown conversion and repair
pdfdol — PDF reading, writing, and format conversion
dol — store abstractions used everywhere
scraped — scraping primitives
hubcap — GitHub repo access
Released: Dec 1, 2026
MIT View SPDX License List
ai context documentation github llm markdown pdf rag scraping
Development Status 4 - Beta
Intended Audience Developers
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Software Development :: Libraries :: Python Modules
Text Processing :: Markup
Release files for contaix 0.0.37
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 387.8 kB
Release files / contaix-0.0.37.tar.gz
Release files / contaix-0.0.37-py3-none-any.whl
Security for contaix 0.0.37
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Dec 1, 2026 2 release files No provenance
Nov 30, 2026 2 release files No provenance
Nov 24, 2026 2 release files No provenance
Nov 23, 2026 2 release files No provenance
Nov 22, 2026 2 release files No provenance
Oct 20, 2026 2 release files No provenance
Oct 13, 2026 2 release files No provenance
Oct 12, 2026 2 release files No provenance
Sep 22, 2026 2 release files No provenance
Jun 21, 2026 2 release files No provenance
Jun 16, 2026 2 release files No provenance
May 27, 2026 2 release files No provenance
May 14, 2026 2 release files No provenance
May 2, 2026 2 release files No provenance
Sep 5, 2025 2 release files No provenance
Sep 4, 2025 2 release files No provenance
Jun 12, 2025 2 release files No provenance
Jun 2, 2025 2 release files No provenance
May 22, 2025 2 release files No provenance
Apr 18, 2025 2 release files No provenance
Apr 4, 2025 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from 1875753











