Command line and MCP
Read and edit plan files from the terminal, or let an AI assistant do it.
A plan is a file, and the clearline tool works on that file directly. It is also an MCP server, so an AI assistant can read a plan and change it.
The tool is not available as a download yet. It will be published together with the app.
Commands
clearline read Keller.clearline # print the plan as text
clearline apply Keller.clearline '<json>' # apply commands
clearline apply Keller.clearline - # read the commands from stdin
clearline guide # print the command reference
clearline mcp Keller.clearline # run as an MCP server on stdio
read prints a summary: every wall with its clear length, the rooms with their area, openings with their clearances, objects, routes and totals. It is written to be quoted back when editing.
apply takes a JSON array of commands, or {"commands": [...]}. The call is atomic: if one command fails, the file is unchanged and the error says why. If the plan is open in the app, the document follows and the change is one undo step.
An example
clearline apply Bath.clearline '[
{"op":"room","id":"bath","x":0,"y":0,"width":250,"depth":180,"kind":"drywall"},
{"op":"opening","id":"door","wall":"bath-s","kind":"door","x":60},
{"op":"fixture","id":"wc","kind":"toilet","wall":"bath-w","y":120},
{"op":"tap","id":"tap-wc","x":0,"y":120,"supply":"cold","label":"WC","height":15}
]'
Numbers are in the plan’s units (centimetres unless changed); 240mm or 4m override. x is right, y is up. A room bath creates the walls bath-s, bath-e, bath-n, bath-w.
What commands there are
| Command | Does |
|---|---|
new, set |
Start a plan; name, units, grid, default thicknesses and height |
room |
A rectangular room from its inside corner, width and depth |
partition |
A wall across the room at an x or y |
wall |
A wall between two corners or points |
length |
Set a wall’s clear length, and which end moves |
shift, move |
Move a wall sideways; move a corner |
join |
Join two corners where their walls cross |
opening |
A door or window, including pocket sliding doors |
fixture |
An object from the library, on a wall or free |
run |
A cable or pipe route |
zone |
A floor heating zone |
tap |
A water tap point |
guide |
A helper line |
layer |
Show, hide or lock a layer |
patch |
Change an existing wall, opening, object, route, zone, tap or guide |
delete |
Remove something by its id |
clearline guide prints the full reference with every field.
MCP
Add the server to your assistant’s MCP configuration, with the path of the plan it should work on:
{
"mcpServers": {
"clearline": {
"command": "/path/to/clearline",
"args": ["mcp", "/path/to/Plan.clearline"]
}
}
}
The server offers two tools: read_plan returns the plan summary, apply_plan applies commands. Ask the assistant for “a bathroom of 2.5 by 1.8 m in drywall with the door on the south wall”, and watch it appear in the open document.
The plan content is passed to the assistant you connect. Nothing is sent anywhere else.