Mirror official docs (via llms.txt) as plain Markdown for LLM ingestion and RAG.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llms_mirror-0.1.1.tar.gz.
File metadata
- Download URL: llms_mirror-0.1.1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d58a1368a1c72dfad6c7a63c198885667b416ab1023b2d3005a7a454d854b95d
|
|
| MD5 |
0d7add009d84879db2fa0267e9101075
|
|
| BLAKE2b-256 |
7faf7b31f7f7f8f4bf3ad7e890bd3ff32c8f466ba9b7732ec507960526c1f803
|
File details
Details for the file llms_mirror-0.1.1-py3-none-any.whl.
File metadata
- Download URL: llms_mirror-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e7d7c7aae6e7eacd63af2331451c11238cc79d4175352774a577e1a4ac649ed
|
|
| MD5 |
1032a6865998bc68b5d5af3a160e80c4
|
|
| BLAKE2b-256 |
a7738c0f03c4a6de1d00ea3d2f1122002ef0fa749af17132d0c80e5e0cef79fd
|