|
| 1 | +# LLMs |
| 2 | + |
| 3 | +Kysely provides LLM-friendly documentation to help AI tools like **Cursor**, **Windsurf**, **GitHub Copilot**, **ChatGPT**, **Claude**, and **Claude Code** understand and work with it. |
| 4 | + |
| 5 | +`llms.txt` documentation is automatically generated and kept up-to-date with each push on GitHub and is based on the [llms.txt standard](https://llmstxt.org/). |
| 6 | + |
| 7 | +## Documentation Structure |
| 8 | + |
| 9 | +The [llms.txt](https://kysely.dev/llms.txt) file acts as a summary and index to all the docs pages. |
| 10 | + |
| 11 | +The [llms-full.txt](https://kysely.dev/llms-full.txt) file includes all of the Kysely docs in a single file. |
| 12 | + |
| 13 | +## Usage with AI Tools |
| 14 | + |
| 15 | +### Cursor |
| 16 | + |
| 17 | +In Cursor, you can reference the documentation using the `@Docs` feature: |
| 18 | + |
| 19 | +1. Type `@Docs` in your prompt |
| 20 | +2. Reference the Kysely documentation URL: `https://kysely.dev/llms-full.txt` |
| 21 | +3. Ask questions about Kysely queries, types, or database operations |
| 22 | + |
| 23 | +### Windsurf |
| 24 | + |
| 25 | +For Windsurf users: |
| 26 | + |
| 27 | +1. Reference the documentation using `@https://kysely.dev/llms-full.txt` |
| 28 | +2. Or add it to your `.windsurfrules` file for persistent access |
| 29 | + |
| 30 | +### ChatGPT & Claude |
| 31 | + |
| 32 | +When using ChatGPT or Claude: |
| 33 | + |
| 34 | +1. Mention that you're using Kysely |
| 35 | +2. Reference the documentation URL: `https://kysely.dev/llms-full.txt` |
| 36 | +3. The AI will fetch and use the documentation to provide accurate answers |
| 37 | + |
| 38 | +### GitHub Copilot |
| 39 | + |
| 40 | +While Copilot doesn't directly support external documentation, you can: |
| 41 | + |
| 42 | +1. Include relevant documentation snippets in your comments |
| 43 | +2. Reference query builder methods and types accurately for better suggestions |
| 44 | + |
| 45 | +### Claude Code |
| 46 | + |
| 47 | +For Claude Code users: |
| 48 | + |
| 49 | +1. Reference the documentation by mentioning the URL: `https://kysely.dev/llms-full.txt` |
| 50 | +2. Ask Claude Code to analyze the documentation for specific Kysely patterns |
| 51 | +3. Use commands like: `claude -p "Using the Kysely docs at https://kysely.dev/llms-full.txt, help me build a type-safe query"` |
| 52 | + |
| 53 | +## Example Prompts |
| 54 | + |
| 55 | +Here are some example prompts you can use with AI tools: |
| 56 | + |
| 57 | +- "Using Kysely, how do I build a type-safe SELECT query with JOINs?" |
| 58 | +- "Show me how to define a database schema interface for Kysely" |
| 59 | +- "How can I use transactions with Kysely?" |
| 60 | +- "Create a complex query with subqueries and aggregations" |
| 61 | +- "How to handle database migrations with Kysely?" |
0 commit comments