Command line and MCP
Everything you do in BIMopen is a command. A click on Wall and two points in the plan run
the same wall command you can type yourself. This chapter describes the command line of the
window, the bimopen-cli program, which runs the same commands without a window, and the MCP
server, through which an AI agent can model, check and render a project.
The command line in the window
The command line sits under the drawing area. Its upper part is the log; its last row is where you type.
- You do not need to click it first: whatever you type while no other field is being edited goes there.
- Enter runs the line. The command is echoed in the log after a
>, followed by its result; an error is shown in red and changes nothing. - Up and Down bring back the lines typed before.
- On the left of the row, the prompt says what is expected:
Command:when no tool is active, or the request of the active tool, such asWALL next point [Esc to finish]:. helplists every command with a line of description;help wallshows the usage of one. ? ▸ Commands in the top bar does the same ashelp.
Typed shortcuts start the tools
A command typed without arguments starts the interactive tool, as if you clicked its button:
WA (or wall) starts the wall tool, DR the door tool, VG opens Visibility and Graphics. The
same command with arguments does the work at once, without the tool: wall 0,0 5,0 draws a
wall from the origin to 5 m along x.
Command names, their short forms and their arguments are the same in every language of the
interface; most also accept an Italian name, such as muro for wall. Parameter names, type
names and view names follow the language of the interface: in English you type
set Free Height 2.7m, in Italian set Altezza libera 2.7m. The
keyboard shortcuts chapter lists every short form.
Points and lengths
| You type | It means |
|---|---|
3,4 |
The point x = 3 m, y = 4 m |
@2,0 |
2 m along x and 0 along y from the previous point |
@4<90 |
4 m from the previous point, at 90° (angles counter-clockwise from the x axis) |
2.7m, 270cm, 2700mm |
A length with its unit |
2.7 or 2,7 |
A length in metres: at the command line a number without unit is in metres |
For example, wall 0,0 @6,0 @4<90 0,4 c draws a 6 × 4 m rectangle; the final c closes it.
Warning
At the command line set Free Height 2700 means 2700 metres. Write the unit:
2700mm. In the element panel, instead, a number without unit is in the project's
units, millimetres in a new project.
Arguments in JSON
Every command also takes its arguments as a JSON object, which gives access to all its options.
The usage line of help lists them:
wall 0,0 10,0 {"height":3.2,"location":"Linea d'asse del muro"}
roof walls {"slope":30,"overhang":0.5}
sheet A102 Plans {"title_block":"A3"}
export doors.csv {"schedule":"doors"}
Commands you will use often
| Command | What it does |
|---|---|
new, sample |
A new project, the sample project |
open house.bpr, save house.bpr |
Opens and saves a project |
undo, redo |
Undoes and redoes the last change |
view 3d, view Ground Floor |
Opens the default 3D view, or the plan of a level |
wall, door, window, floor, roof |
Model elements: see the usage with help |
select walls, select all, deselect |
Selects by category, everything, nothing |
set <parameter> <value> |
Sets a parameter of the selection, as in the element panel |
type <type name> |
Changes the type of the selection, or of the next element |
move 1,0, copy 0,3, rotate 90 |
Modifies the selection |
delete |
Deletes the selection |
list walls, params 102, info |
Lists elements, the parameters of one, a summary of the project |
schedule doors |
Shows a schedule at the command line |
export house.ifc |
Exports IFC, SVG, PNG, CSV or USD (.usdz, .usda), by the file's extension |
walk, collision, walksettings, liveview |
Walk mode: a walk computed, Disable Collision, the step climbed, the live view (see Live view and walk mode) |
walkthrough |
Walkthroughs: makes one from the points clicked, changes its frame, total frames and frames per second, speed, acceleration and turn smoothness, adds and removes keyframes (see Walkthrough) |
camera |
Perspective views: makes a camera view from two points, moves its camera, its field of view, far clip plane and crop region, resets its target (see Perspective views) |
bundle house.zip |
Project bundle: the project and the files it uses in one .zip; open house.zip unpacks and opens it |
Every element has a number, its id, shown in brackets after it is created:
Door «Single swing door 80x210» in wall 102 (106). Commands accept it where they need an
element: params 106, delete 106.
Clipboard, types and groups
The commands of Copy, cut and paste, Transfer type and Groups. Without ids they work on the selection.
| Command | Example | What it does |
|---|---|---|
copyclip |
copyclip 102 103 |
Copies the elements to the clipboard |
cut |
cut 102 |
Cuts the elements to the clipboard |
paste |
paste 4,0 |
Pastes at the point; without a point, in the same place; {"mode":"view"} in the active view, {"mode":"levels","levels":[…]} on levels, {"mode":"views","views":[…]} in views, by id or by name |
matchtype |
matchtype 102 105 106 |
The elements after the first take its type, if they are of the same category |
group (GP) |
group 102 103 104 Bathroom |
A new group of the elements, with its name (detail_name: the name of the attached 2D group); with "empty":true (and "detail":true for a 2D group) a group with no members, to fill in the editor |
placegroup |
placegroup 10,0 Bathroom {"level":"First Floor"} |
A new copy of the group at the point, on the level; rotation in degrees, view for a 2D group |
ungroup |
ungroup 120 |
The members of the copy become ordinary elements |
groupedit |
groupedit {"group":120,"add":[130],"remove":[121]} |
Adds and removes members of a copy and updates the other copies |
groupsync |
groupsync 120 |
The other copies of the group are made again from this one |
groupexclude |
groupexclude 121 keep |
The members leave their copy only; with keep (Move to project) they stay in the project as ordinary elements |
grouprestore |
grouprestore 120 |
The members excluded from the copy come back |
grouptype |
grouptype {"name":"Bathroom","rename":"Bathroom A"} |
Renames (rename), duplicates (duplicate) or deletes ("delete":true) a group without copies; "duplicate":true takes the next free number |
groupattach |
groupattach {"group":120,"detail":"Bathroom dimensions"} |
Shows in the active view (or view) the attached 2D group with the copy; "show":false hides it |
groupdetach |
groupdetach 130 |
A copy of an attached 2D group, with no dimensions or tags, becomes a 2D group of its own |
groups |
groups |
The groups of the project, with their copies and attached 2D groups |
bimopen-cli
bimopen-cli runs BIMopen without a window: to convert files, to build a project from a
script, to check a model, or to serve agents over MCP. Build it with
cargo build --release -p bimopen-cli.
bimopen-cli info <file>
bimopen-cli convert <in> <out> [--level NAME] [--view 3d] [--schedule walls|doors|windows|floors|rooms|materials]
bimopen-cli run [<file> | --sample] [--cmd LINE]… [--script FILE] [--save FILE] [--export FILE]…
bimopen-cli commands
bimopen-cli mcp [<file> | --sample]
| Subcommand | What it does |
|---|---|
info <file> |
A summary of the project and, in JSON, its levels, element counts and active view |
convert <in> <out> |
Opens <in> (.bpr or .ifc) and writes <out>: .ifc, .svg or .png of a plan (the lowest level, or --level), .png of the 3D view (--view 3d), .csv of a schedule (--schedule), or .bpr |
run |
Opens a file, the sample, or a new project, then runs the options in order: --cmd one line, --script a file of lines (empty lines and lines starting with # are skipped), --save and --export a file |
commands |
Every command, with its description and usage |
mcp |
The MCP server on standard input and output |
--version |
The version |
The messages are in the language of the environment variable BIMOPEN_LANG (it, en, de,
fr, es, ar), or of the system (LANG), or Italian. bimopen-cli ends with code 0 when
everything worked, 1 when a command failed (the message says which), and 2 when the arguments
are wrong (it prints the usage).
export BIMOPEN_LANG=en
bimopen-cli run --script house.txt --save house.bpr --export house.ifc
bimopen-cli convert house.bpr plan.svg
bimopen-cli convert house.bpr doors.csv --schedule doors
bimopen-cli convert house.bpr first.png --level "First Floor"
bimopen-cli convert house.bpr house-3d.png --view 3d
bimopen-cli convert model.ifc model.bpr
A script is a text file with one command per line, exactly as typed at the command line:
The schedules are written as CSV with ; between the columns, the headings in the language of
the messages and a total row at the end.
MCP: BIMopen for AI agents
The Model Context Protocol (MCP) lets an AI agent use programs as tools. bimopen-cli mcp
is an MCP server: it speaks JSON-RPC 2.0 on standard input and output, one message per line,
and keeps one project open for the whole conversation. Without a file it starts from a new
project; --sample starts from the sample house.
To add it to an agent, give the agent the command to start. For example, in Claude Code:
or, in a client configured with JSON:
The server offers seven tools:
| Tool | Arguments | What it does |
|---|---|---|
command_line |
line |
Types a line at the command line, exactly as a person would |
execute |
command, args |
Runs a command with its arguments in JSON |
inspect_model |
– | A summary: levels, element counts, active view, selection |
query_elements |
category (optional) |
The elements, with id, category and name: walls, doors, windows, floors, rooms, roomseps, grids, levels, types |
get_params |
id |
Every parameter of an element |
schedule |
kind |
A schedule: walls, doors, windows, floors, rooms or materials |
render |
view, width, height, yaw, pitch |
A PNG image of a view: 3d, the name of a level for its plan, of a section, elevation, callout or free 2D view, or the number or name of a sheet; yaw and pitch turn the 3D camera, in degrees |
The answers carry the message of the command and, when there is one, its data in JSON, such as the ids of the elements created. An agent can check its own work by asking for a render.
Tip
Ask the agent to render the plan and the 3D view after each step: it sees what it built and corrects itself.