llms-mirror
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
- https://github.com/naelrudd/midtrans-docs-llm-agents (589 pages)
- https://github.com/naelrudd/clerk-docs-llm-agents (2343 pages)
- https://github.com/naelrudd/xendit-docs-llm-agents (336 pages)
- https://github.com/naelrudd/stripe-docs-llm-agents (473 pages)
- https://github.com/naelrudd/canva-docs (392 pages)
- https://github.com/naelrudd/razorpay-docs-llm-agents
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)
| File | Size | Uploaded | |
|---|---|---|---|
| llms_mirror-0.1.1.tar.gz | 7.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|