Skip to main content

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:

  1. Settings & membersSettingsExport content

For individual pages:

  1. 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

  1. Upload to your favorite AI agent (Claude, ChatGPT, etc.)
  2. Include in your prompts: "Here's my workspace structure: [attach notion-llms.txt]"
  3. 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:

  1. Use LLMS.txt for overview: "This workspace map was created on [date]. Use it to understand my documentation structure."
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notion_to_llms_txt-0.1.1.tar.gz (35.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

notion_to_llms_txt-0.1.1-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

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

Hashes for notion_to_llms_txt-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d12cd7331108559b8ad7fe5715a1222a956d845c80404f6698a401bf9cd97840
MD5 bb7874499fcd765fa9459b6b3c7d092d
BLAKE2b-256 602851674ba6955983f113d2fdc321fc9723d6647646eb75c7bccc2526c0b8d4

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file notion_to_llms_txt-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for notion_to_llms_txt-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 19357854f9d45be3d49506f61b016ad92b87362f92c18c70442fcffc503484de
MD5 3863dc4c41107a19db04c39f33cfc2d8
BLAKE2b-256 b121ba2b07ee6a0f44569f2c5552e2d3319965c0aa6fce7f5ddb426d73520747

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page