Convert Notion exports to LLMS.txt format for AI agents
Project description
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.
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 notion_to_llms_txt-0.1.1.tar.gz.
File metadata
- Download URL: notion_to_llms_txt-0.1.1.tar.gz
- Upload date:
- Size: 35.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d12cd7331108559b8ad7fe5715a1222a956d845c80404f6698a401bf9cd97840
|
|
| MD5 |
bb7874499fcd765fa9459b6b3c7d092d
|
|
| BLAKE2b-256 |
602851674ba6955983f113d2fdc321fc9723d6647646eb75c7bccc2526c0b8d4
|
Provenance
The following attestation bundles were made for notion_to_llms_txt-0.1.1.tar.gz:
Publisher:
release.yml on tyo-yo/notion-to-llms-txt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
notion_to_llms_txt-0.1.1.tar.gz -
Subject digest:
d12cd7331108559b8ad7fe5715a1222a956d845c80404f6698a401bf9cd97840 - Sigstore transparency entry: 346320172
- Sigstore integration time:
-
Permalink:
tyo-yo/notion-to-llms-txt@23d27c7acad7469698be048a3a18c9ca13d11da8 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tyo-yo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@23d27c7acad7469698be048a3a18c9ca13d11da8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file notion_to_llms_txt-0.1.1-py3-none-any.whl.
File metadata
- Download URL: notion_to_llms_txt-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19357854f9d45be3d49506f61b016ad92b87362f92c18c70442fcffc503484de
|
|
| MD5 |
3863dc4c41107a19db04c39f33cfc2d8
|
|
| BLAKE2b-256 |
b121ba2b07ee6a0f44569f2c5552e2d3319965c0aa6fce7f5ddb426d73520747
|
Provenance
The following attestation bundles were made for notion_to_llms_txt-0.1.1-py3-none-any.whl:
Publisher:
release.yml on tyo-yo/notion-to-llms-txt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
notion_to_llms_txt-0.1.1-py3-none-any.whl -
Subject digest:
19357854f9d45be3d49506f61b016ad92b87362f92c18c70442fcffc503484de - Sigstore transparency entry: 346320174
- Sigstore integration time:
-
Permalink:
tyo-yo/notion-to-llms-txt@23d27c7acad7469698be048a3a18c9ca13d11da8 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tyo-yo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@23d27c7acad7469698be048a3a18c9ca13d11da8 -
Trigger Event:
release
-
Statement type: