Repository navigation
Releases: niyankhadka/yantra
Release list
v1.2.0
Books and reading modes, a reworked playground, walkthrough settings and mini charts that
never hide data.
Added
- Books (
"kind": "book",docs/books.md,schemas/yantra-book.schema.json): several
answer pages read in order in one offline file, with a cover (title, summary, contents) and
2-12 chapters, inline or{ "$ref": "chapter.json" }. Every chapter is validated as an
answer page (book/*codes); the CLI (build,validate,export -f md,schema book,
docs books,new --book), the MCP server (yantra_get_schemakindbook), the
playground, the viewer's gallery and the Python SDK (Book) take them. Example:
examples/book-checkout-explained.json. - Reading modes for answer pages and books: scroll, book (one screen at a time,
like an e-reader, breaking between blocks; previous / next, swipe, edge taps, keys,
progress, text size) and present (one row of blocks per slide).meta.readingsets how
it opens; the reader's mode and place are kept in their browser, and#read=/#at=in
the URL open a given mode and place. Books add a contents menu. - Answer pages:
span: "third"puts three blocks in a row, and asectionblock groups
blocks under a heading (one level; its blocks count towards the budgets). - Walkthrough settings:
meta.story(open,collapsedoroff) sets how the storyboard
opens, and a toolbar button (keyW) turns story mode off (nothing dimmed, no storyboard)
and on; the reader's choice is kept per diagram, and#story=offoverrides both. The
collapsed storyboard is one slim bar: count, step title, back / next, present, expand. - The playground: Examples and templates, a searchable picker grouped by kind (starters
first), with purpose-first names and a one-line description; a start screen to describe
the diagram in words and copy the prompt; a resizable editor (drag or arrow keys) that can
be hidden, a full-screen preview, and the layout remembered. - Starter templates for every kind (
src/core/starters.js): flow, sequence, state machine,
ER, class, org chart, mind map, answer page and book, used by the playground and by
yantra new --kind <kind>. - Python SDK:
Book,Diagram.story(),Page.reading(),Page.section()and
blocks.section();span="third".
Changed
- Mini charts on cards show more and never drop data silently: bar charts take 8 rows, then
a "+N more" row; donuts take 6 slices, then merge the rest into an "Other" slice. Both
open the card's Details, which lists every value. Thechart/too-many-pointswarning says
how to show everything (a chart card takes the samedata, up to 12 bars). - The chat prompts, the Claude.ai skill, the GPT instructions and the agent skills describe
mini chart limits, thirds, sections, reading modes and books. - The playground opens on the start screen on a first visit (later visits reopen the draft).
- New README and website screenshots of the current viewer, with books, slides and the
playground added to the README gallery and the website's diagram kinds; the answer pages
guide covers layout, reading modes and books.
Fixed
- A mini donut's legend no longer overlaps itself when it is taller than the donut.
- Validation findings from a diagram embedded in a page (or a panel) start with the block
they come from again (blocks[2] "Title": …); the diagram's own message replaced it.
v1.1.1
The website, a context-aware Copy prompt in the playground and search-engine setup, plus
README, keyword and link updates for the npm and PyPI pages.
Added
- The Yantra website, https://yantra.nbk.com.np/ (
site/,npm run build:site): a landing
page with a live demo, the docs rendered fromdocs/*.mdwith search, eight step-by-step
guides (site/guides/), a 404 page, a sitemap and social cards. - The playground's Copy prompt follows the editor: with an empty editor it copies the
instructions and a request line; with valid JSON it adds the diagram or page and asks for
a change; with findings it adds them and asks for a fix. An options box takes the request
and offers Instructions only (playground/prompt.js, docs/chat.md). - Website search-engine support: a unique title and description per page, JSON-LD
structured data (software, website with docs search, FAQ, articles and breadcrumbs), a
sitemap withlastmoddates, a web manifest and touch icons, related guides at the end of
each guide,/docs/?q=to open the docs search, and optional Google and Bing verification
tags fromYANTRA_SITE_GOOGLE_VERIFICATION/YANTRA_SITE_BING_VERIFICATION.
Changed
- The README is reorganised around a gallery of diagram kinds and links to the website docs;
its images use absolute URLs so they show on npm. The contributing, support, security,
trademark and Python SDK pages and the docs intros are tidied, and the npm keywords and
PyPI metadata are updated. - The playground moved to https://yantra.nbk.com.np/playground/; old
/#example=...links
are forwarded there. The chat packs, README and docs link to the new address. package.jsonhomepageand the Python package's Homepage and Documentation URLs point to
the website.npm run build:playgroundbuilds the whole site (site/vite.config.js, which replaces
playground/vite.config.js); the Pages workflow runsnpm run build:site.
Fixed
- The Pages workflow deploys the playground; its Pages check skipped the deploy even when
Pages was enabled.
Install
npm i -g @niyankhadka/yantra # or: npx @niyankhadka/yantra init --all
pip install niyankhadka-yantra # Python SDK (import yantra)Website and docs: https://yantra.nbk.com.np/ · Playground: https://yantra.nbk.com.np/playground/
Full changelog: v1.1.0...v1.1.1
v1.1.0
Requires Node.js 20.19 or later (22.12 or later on Node 22); Node 18 is no longer supported.
Added
TRADEMARKS.md: the code is MIT; the Yantra name and logo follow the trademark policy.- A Sponsor button (Buy Me a Coffee) and a "Support the project" section in the README.
yantra initsets up a project for coding agents in one step: the portable Yantra skill
(/yantra, and automatic use for diagram requests), the MCP server
(npx -y @niyankhadka/yantra mcp,cmd /c npxon Windows) and short rules, for Claude
Code, Cursor, Codex and Antigravity (--claude,--cursor,--codex,--antigravity,
--all). Existing files are kept unless--force, MCP configs are merged,AGENTS.md
gets a marked section, and--dry-runpreviews. Seedocs/agents.md.- A portable skill in
skills/yantra/SKILL.md(shipped in the npm package) with guidance for
diagrams drawn from a codebase: architecture with drill-down, ERDs from the schema,
sequence diagrams for auth and payment flows. yantra schema [diagram|page]andyantra docs [authoring|pages|mermaid|import|agents]print
the schemas and guides, for agents without the MCP server.- Python SDK:
yantra.init_project(path, agents=[...]). - A browser playground for JSON written by AI chats (
playground/, deployed to GitHub Pages
at https://yantra.nbk.com.np/ by.github/workflows/pages.yml): paste a diagram
or answer page, see the validation findings (translatable) and the live result, and download
standalone HTML, SVG, PNG, Markdown or JSON. It runs offline once loaded, has a "Copy prompt
for your chat" button and loads any gallery example. - Chat packs in
chat/: a copyable prompt for any chat, a Claude.ai skill
(npm run pack:skillwritesdist-chat/yantra-skill.zip) and a custom GPT pack
(instructions, conversation starters, knowledge files;npm run pack:gpt). Seedocs/chat.md. yantra mcp --http [--port 8787] [--host 127.0.0.1]: the MCP server over Streamable HTTP
for clients that connect by URL. Binds localhost, checksOriginandHost, takes an
optional bearer token (YANTRA_MCP_TOKEN) and has no file access unless
YANTRA_INPUT_ROOT/YANTRA_OUTPUT_ROOTare set;yantra_buildthen returns the HTML
as an embedded resource. Deploy guide and security model:docs/remote-mcp.md.
Changed
- The single-file HTML assembly moved from
lib/build.jstosrc/core/standalone.js, so the
playground builds the same file in the browser. The MCP tools moved tomcp/tools.js,
shared by both transports. - Requires Node.js 20.19 or later (22.12 or later on Node 22); Node.js 18 reached end of
life. CI tests Node 20, 22 and 24. - The viewer is built with Vite 8.
Fixed
yantra devfrom an installed package uses a Vite installed next to it.
Install
npm i -g @niyankhadka/yantra # or: npx @niyankhadka/yantra init --all
pip install niyankhadka-yantra # Python SDK (import yantra)Playground: https://yantra.nbk.com.np/
Full changelog: v1.0.1...v1.1.0
v1.0.1
A maintenance release: the code that draws diagrams and pages is unchanged from 1.0.0.
Changed
- npm releases use trusted publishing and are staged for approval on npmjs.com; the release workflow no longer needs an npm token.
- The README installs from npm and PyPI and shows their version badges.
- CI and release workflows use
actions/checkout,setup-nodeandsetup-pythonv7.
Fixed
- Tests run on Node.js 18, and failing tests are reported as CI annotations.
Install
npm i -g @niyankhadka/yantra # or: npx @niyankhadka/yantra build diagram.json
pip install niyankhadka-yantra # Python SDK (import yantra)Full changelog: v1.0.0...v1.0.1
v1.0.0
The first public release of Yantra: interactive, step-by-step diagrams and one-page answers, shipped as a single offline HTML file.
Describe the parts of a system or process, how they connect and the story to tell, in JSON (or import a Mermaid, PlantUML, draw.io or Visio sketch). Yantra lays it out, routes the edges, checks the rendered geometry and writes one HTML file that works offline, with a walkthrough readers can step through.
Highlights
- Automatic layout and routing: layered, tree and mind-map layouts, orthogonal edges with placed labels; no coordinates needed.
- Validator: stable codes for schema, references, story, budgets and the rendered geometry, in every mode and view.
- Walkthroughs: scenarios and steps that focus cards and animate the active path, with autoplay, camera follow and a present mode.
- Diagram kinds: flow, sequence, state machines (start/end dots, choices, fork/join bars, regions), ER and class diagrams (table cards, crow's-foot and UML ends, field-row edges), org charts, decision trees, mind maps, and charts inside cards.
- Deep hierarchies: groups nested up to six levels in one frame, fold to any depth, zoom into a group; drill-down detail diagrams up to eight levels with breadcrumbs.
- Answer pages: the answer first, then blocks such as steps, metrics, comparisons, tables, timelines, FAQs, embedded diagrams and charts (bar, column, line, area, pie, donut, gantt, matrix), with a contents row.
- Import: Mermaid (flowchart, sequence, state, ER, class, mind map, gantt, pie, timeline, journey, quadrant), PlantUML, draw.io (including PNG exports) and Visio
.vsdx. - Output: single-file offline HTML, SVG, PNG and Markdown, in light and dark themes.
- Languages: the viewer in 18 languages, including right-to-left (Arabic, Hebrew, Persian, Urdu), with width-aware text for CJK, Devanagari and Arabic.
- Accessibility: full keyboard control, a shortcuts side panel (
?), URL-hash state and WCAG contrast tests on the theme tokens. - Tooling: a CLI (
validate,build,export,screenshot,import,new,examples), an MCP server with sandboxed file access, an agent skill and a Python SDK.
Install
Needs Node.js 18 or later.
npm i -g @niyankhadka/yantra # or: npx @niyankhadka/yantra build diagram.json
pip install niyankhadka-yantra # Python SDK (import yantra)See the README to get started, and the CHANGELOG for the full list of changes.