opencalque
v2.4.0
Published
Draw 2D floor plans as JSON: walls, doors, rooms, furniture. Check, measure, export PDF, DXF, SVG.
Maintainers
Readme
OpenCalque
Free, open-source 2D floor plans, stored as plain JSON. This package is the command line and the MCP server of OpenCalque: an AI agent or a script draws, edits, checks and exports architectural plans with it (walls, doors, windows, rooms, furniture, dimensions, sheets). The same drawings open in the editor at opencalque.com and in the desktop app.
For an AI agent (MCP)
npx -y opencalque mcpWith Claude Code:
claude mcp add opencalque -- npx -y opencalque mcpFor Claude Desktop, Cursor, VS Code or any other MCP client, add this to its servers:
{ "opencalque": { "command": "npx", "args": ["-y", "opencalque", "mcp"] } }The agent opens or creates a .opencalque file with open_drawing (give it an absolute path), reads the guide once with read_guide, then edits with apply_operations and looks at the result with describe_drawing, check_drawing, measure_drawing and view_drawing (a picture of the plan). npx -y opencalque mcp plan.opencalque starts on one file.
From the command line
npx opencalque new plan.opencalque "My flat"
npx opencalque apply plan.opencalque ops.json # a JSON array of operations
npx opencalque check plan.opencalque # rooms that do not close, walls drawn twice…
npx opencalque png plan.opencalque --out plan.png
npx opencalque pdf plan.opencalque --out plan.pdf
npx opencalque guide # the format and the operations, written for an AI agent
npx opencalque --help # every commandAlso: describe, quantities (rooms and their areas, walls, doors), svg, dxf, import (DXF), schema, validate.
The format
A drawing is JSON in millimetres, with a published JSON Schema: document, operations. Every edit is a small JSON operation, the same ones the editor uses. A guide for language models is at opencalque.com/llms-full.txt. Drawings saved since version 1.0 keep opening in every later version.
PDF export of Chinese, Japanese or Korean text needs the fonts of a checkout or the desktop app; this package carries only Noto Sans.
MIT licence. Source, issues and the desktop app: github.com/laurent512/opencalque.
