Lovely Docs
Hierarchically optimized documentation for AI coding agents
Why Lovely Docs?
AI coding tools work best when given access to up-to-date documentation.
Lovely Docs places the documentation inside a folder ( lovely-docs/ by default) in your project. The documentation is available in both condensed and fulltext forms - noise is removed from pages, and
content summaries are created for each directory.
Your coding agent should have an easy time searching and reading the documentation using its built-in tools, and you can also
directly point it to any particular file using @lovely-docs/... or equivalent mechanism.
You can also use Lovely Docs MCP Server , but a local folder works better for AI coding agents.
Want me to add more libraries or have feedback? Reach out on Discord or .
Tokens ain't cheap, buy me a coffee .
Quick Start
Note: The Lovely Docs CLI is written in TypeScript, but your project can be written in any language
npx -y lovely-docs@latest init
npx -y lovely-docs@latest list
npx -y lovely-docs@latest add sveltejs/svelte
Directory structure
You can experiment with the installed. So far I found that "Diegst only" without directory summaries and llm map works best in Windsurf and Antigravity, but give it a try and let me know how it goes.
Install directory summaries?
Example rules
You can add the following rule to your .cursorrules or similar configuration to help your AI agent use the documentation effectively:
We have dehydrated documentation in lovely-docs/. When you start a new session, check what's available. Refer to the docs first time you use a feature of a documented library.
Or a more agressive
We have curated, dehydrated documentation in lovely-docs/ WORKFLOW: 1. At the START of EVERY session, run: list_dir on lovely-docs/ 2. If documentation exists for a library you're about to use, read the relevant sections before using a feature for the first time.
MCP Server
You can run a Lovely Docs MCP server locally. Or you can access the one I'm running publicly.
Read the docs the way your agent sees them over MCP
{
"mcpServers": {
"lovely-docs": {
"command": "npx",
"args": [
"-y",
"lovely-docs@latest",
"mcp"
]
}
}
}File → Preferences → Cursor Settings → Features → MCP Servers → "Add New MCP Server" → Paste configuration