Skip to main content

llms-mirror

PyPI version PyPI downloads

Mirror an official documentation site (via its llms.txt index) as plain Markdown, organized 1:1 by URL path, ready for LLM ingestion, RAG pipelines, and knowledge graphs.

Pure standard library for Markdown sites — no dependencies. Optional html2text extra for HTML-only sites. Mirrors Midtrans, Clerk, Canva, Xendit, Stripe, and Razorpay docs with one command.

Install

pip install llms-mirror          # Markdown sites (no deps)
pip install "llms-mirror[html]"  # HTML-only sites

Usage

# Full pipeline: crawl site -> Markdown tree -> llms-full.txt + README + INDEX
llms-mirror mirror https://stripe.com/docs/llms.txt --out stripe-docs

# From an already-mirrored directory, rebuild artifacts
llms-mirror full                # regenerate llms-full.txt
llms-mirror index               # regenerate README.md + INDEX.md

Options:

Flag Meaning
--out DIR output directory (default docs)
--workers N parallel downloads (default 8)
--retries N retries per page on transient errors (default 3)
--delay SEC min seconds between requests (rate-limit friendly)
--redact replace Stripe-style API keys (sk_test_...) and AWS keys with REPLACE_ME
--html pages are HTML; convert to Markdown (needs llms-mirror[html])
--strip-fm strip YAML frontmatter from pages
--no-llms-full skip the single-file corpus
--local-index reuse saved llms.txt instead of re-fetching (resume during throttling)
--no-git skip git init + commit

Output

docs/
├── llms.txt          # original official index (verbatim)
├── llms-full.txt     # entire corpus in one file
├── INDEX.md          # every page + first heading
├── README.md         # landing page
├── missing.md        # pages that failed to download (404 etc.)
└── <path>/.../*.md   # mirrored pages, URL structure preserved

Examples

License

MIT

Release files for llms-mirror 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llms-mirror 0.1.1
File Size Uploaded
llms_mirror-0.1.1.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llms-mirror 0.1.1
File Interpreter ABI Platform
llms_mirror-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size:16.1 kB

Release files / llms_mirror-0.1.1.tar.gz

Download URL llms_mirror-0.1.1.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d58a1368a1c72dfad6c7a63c198885667b416ab1023b2d3005a7a454d854b95d
BLAKE2b-256 checksum
How to use checksums
7faf7b31f7f7f8f4bf3ad7e890bd3ff32c8f466ba9b7732ec507960526c1f803
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / llms_mirror-0.1.1-py3-none-any.whl

Download URL llms_mirror-0.1.1-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e7d7c7aae6e7eacd63af2331451c11238cc79d4175352774a577e1a4ac649ed
BLAKE2b-256 checksum
How to use checksums
a7738c0f03c4a6de1d00ea3d2f1122002ef0fa749af17132d0c80e5e0cef79fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page