notion-to-llms-txt
🤖 Convert your Notion workspace exports into AI-friendly LLMS.txt format
The Problem
When working with AI agents like Claude, ChatGPT, or coding assistants, you often need to explain "where things are" in your Notion workspace. Without context about your documentation structure, AI agents:
- ❌ Can't efficiently navigate your knowledge base
- ❌ Don't know which pages contain relevant information
- ❌ Waste time with ineffective searches
- ❌ Miss important documentation that could solve problems faster
The Solution
notion-to-llms-txt creates a structured map of your entire Notion workspace that AI agents can instantly understand. Think of it as a "table of contents" optimized for AI consumption.
What You Get
✅ Instant workspace overview - AI agents know exactly what documentation exists
✅ Proper page prioritization - Important pages (larger content) appear first
✅ Direct Notion links - AI can guide you to specific pages when needed
✅ Hierarchical structure - Preserves your workspace organization
Installation
Option 1: UV (Recommended)
# Install UV if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install notion-to-llms-txt
uv tool install notion-to-llms-txt
Option 2: pip
pip install notion-to-llms-txt
Usage
Step 1: Export from Notion
For workspace admins:
- Settings & members → Settings → Export content
For individual pages:
- Click ⋯ (three dots) on any page → Export
Export settings:
- Format: Markdown & CSV
- Content: No files or images
- ✅ Include subpages
Extract the downloaded ZIP file to a folder.
📖 Official Notion export guide
Step 2: Generate LLMS.txt
notion-to-llms-txt /path/to/extracted/notion-export
Advanced filtering options:
# Exclude small pages and customize output
notion-to-llms-txt /path/to/export --min-chars 200 --snippet-length 50
# See all options
notion-to-llms-txt --help
Step 3: What You Get
The tool generates a notion-llms.txt file like this:
# Notion Workspace
> Notion page structure and links overview
## Projects
- [AI Development Guidelines](https://notion.so/abc123...): Complete guide for AI project workflows
- [Product Roadmap 2025](https://notion.so/def456...): Strategic planning and feature priorities
- [Engineering Standards](https://notion.so/ghi789...): Code review and deployment processes
## Team Documentation
- [Onboarding Checklist](https://notion.so/jkl012...): New team member setup guide
- [Meeting Notes Archive](https://notion.so/mno345...): Historical meeting records and decisions
Recommended Usage
🎯 Share with AI Agents
- Upload to your favorite AI agent (Claude, ChatGPT, etc.)
- Include in your prompts: "Here's my workspace structure: [attach notion-llms.txt]"
- Place in Notion: Create a "AI Agent Resources" page and paste the content
🚀 Best Practice: Combine with Notion MCP
LLMS.txt provides a snapshot of your workspace structure but isn't real-time. For optimal AI assistance:
- Use LLMS.txt for overview: "This workspace map was created on [date]. Use it to understand my documentation structure."
- Use Notion MCP for details: "For the latest content and detailed information, access pages directly via Notion MCP."
This combination gives AI agents both structural context and live data access.
💡 Example Conversations
Before notion-to-llms-txt:
"Can you help me find our deployment process documentation?"
AI: "I don't have access to your Notion workspace. Could you search for deployment-related pages?"
After notion-to-llms-txt:
"Can you help me find our deployment process documentation?" [includes LLMS.txt]
AI: "Based on your workspace structure, check the 'Engineering Standards' page at https://notion.so/ghi789... - it likely contains your deployment processes."
🔄 Keep It Updated
Re-run the tool whenever you:
- Add major new pages or sections
- Reorganize your workspace structure
- Want to refresh AI agent knowledge
What is LLMS.txt?
LLMS.txt is a proposed standard for providing structured information to Large Language Models. It's like a robots.txt for AI - a simple way to help AI agents understand your content structure.
Requirements
- Python 3.11+
- UV package manager
- Notion workspace with export access
Development
See CLAUDE.md for development context and contributing guidelines.
License
Apache 2.0 - see LICENSE for details.
Metadata
Release files for notion-to-llms-txt 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 | Provenance | |
|---|---|---|---|---|
| notion_to_llms_txt-0.1.1.tar.gz | 35.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| notion_to_llms_txt-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.2 kB
Release files / notion_to_llms_txt-0.1.1.tar.gz
| Download URL | notion_to_llms_txt-0.1.1.tar.gz |
|---|---|
| Size | 35.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d12cd7331108559b8ad7fe5715a1222a956d845c80404f6698a401bf9cd97840
|
|
BLAKE2b-256 checksum How to use checksums |
602851674ba6955983f113d2fdc321fc9723d6647646eb75c7bccc2526c0b8d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2025.
Transparency logRelease files / notion_to_llms_txt-0.1.1-py3-none-any.whl
| Download URL | notion_to_llms_txt-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19357854f9d45be3d49506f61b016ad92b87362f92c18c70442fcffc503484de
|
|
BLAKE2b-256 checksum How to use checksums |
b121ba2b07ee6a0f44569f2c5552e2d3319965c0aa6fce7f5ddb426d73520747
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2025.
Transparency logSecurity for notion-to-llms-txt 0.1.1
Provenance
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for notion_to_llms_txt-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2025.
Transparency logA 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.