Documentation
Start with a guide, then keep the reference open while you work. The reference pages are the same files as docs/ in the repository, so they always match the release.
Guides
- Install and your first diagramInstall the Yantra CLI, write a three-card diagram with a walkthrough, validate it and build one offline HTML file, in about five minutes.
- Diagrams from your codebaseSet up Claude Code, Cursor, Codex or Antigravity with yantra init, then ask for architecture, sequence, ER and lifecycle diagrams of your repository.
- One-page answers and chartsAnswer one question on one printable page: the headline first, then points, metrics, charts, comparisons and diagrams, in one offline HTML file.
- Import Mermaid, PlantUML, draw.io, VisioTurn Mermaid, PlantUML, draw.io and Visio files into Yantra diagrams or answer pages with yantra import, then review the warnings and add a walkthrough.
- Use with Claude.ai, ChatGPT, any chatMake Yantra diagrams and answer pages in Claude.ai, ChatGPT, Gemini or any chat with the playground's prompt, the Claude.ai skill or a custom GPT.
- Python SDKBuild Yantra diagrams and answer pages in Python with the niyankhadka-yantra SDK, then validate, build HTML, export SVG and import Mermaid or draw.io.
- Embedding and sharingShare Yantra output as one offline HTML file, SVG, PNG or Markdown; link to a step with the URL hash; embed a diagram with an iframe; print and brand it.
- Releases and self-hostingHow Yantra releases work, how to pin a version, and how to host the MCP server over HTTP for Claude.ai and ChatGPT, or this website, yourself.
Reference
- Authoring diagramsHow to write a Yantra diagram by hand or with an agent: workflow, budgets, groups, trees, sequence views, data models, languages and validation codes.
- Answer pagesAn answer page explains one question on one printable page: the answer first, then the evidence.
- Import: draw.io, PlantUML, VisioTurn draw.io, Visio and PlantUML files into Yantra diagrams and answer pages with yantra import, then review the warnings and add a walkthrough.
- Import: MermaidTurn Mermaid flowcharts, sequence, state, ER and class diagrams, mind maps, journeys and charts into Yantra diagrams and answer pages with yantra import.
- Coding agentsSet up Claude Code, Cursor, Codex, Antigravity or any agent that can run a command or call an MCP server to write, validate and build Yantra diagrams.
- AI chatsUse Yantra from Claude.ai, ChatGPT, Gemini or any other chat: the chat writes the JSON and the playground validates, previews and downloads it.
- Remote MCP serverServe Yantra's MCP tools over HTTP with yantra mcp --http, for Claude.ai and ChatGPT connectors and other clients that reach a server by URL.
- ArchitectureHow Yantra turns a JSON payload into a diagram: the shared geometry core, the viewer, the standalone build and the tests, and where each part lives.
- ChangelogAll notable changes to Yantra are documented here. The format follows Keep a Changelog, and the project uses Semantic Versioning.