bim-blender

Use bim-blender to convert IFC and other 3D files headlessly, or drive a live Blender session from the command line. Supports FBX, glTF/GLB, OBJ, USD, and BLEND natively -- IFC read/write requires the free Bonsai add-on. Your AI assistant can batch-convert files, load IFC models, and place geometry in a scene you're actively working in.

Headless format conversion and live Blender control via a local TCP bridge. One install command sets up a managed Blender 4.5.10 LTS -- no manual Blender setup required.

Install managed Blender: bim blender install -- downloads Blender 4.5.10 (~395 MB) to %LOCALAPPDATA%\bim-cli\blender\. No admin, no system-wide Blender install required. Run once, idempotent.

Add IFC support: bim blender install --component bonsai -- adds the free Bonsai extension (~118 MB).

How it works

Two modes in one driver:

Convert -- format matrix

Supported conversions. * = requires bim blender install --component bonsai.

From To Requires Bonsai
IFC FBX, glTF/GLB, OBJ, USD, BLEND Yes *
FBX glTF/GLB, OBJ, USD, BLEND No
glTF/GLB FBX, OBJ, USD, BLEND No
OBJ FBX, glTF/GLB, USD, BLEND No
USD FBX, glTF/GLB, OBJ, BLEND No
BLEND IFC *, FBX, glTF/GLB, OBJ, USD IFC only *

exec globals

These variables are pre-injected into every bim blender exec snippet:

Variable Type Availability
bpy Blender Python API module always
bpy.context active context always
bpy.data data block access always
bonsai Bonsai module when Bonsai installed
tool bonsai.tool helpers when Bonsai installed
ifcopenshell IfcOpenShell module when Bonsai installed

Return a value by assigning to _. Non-JSON-serializable results fall back to repr().

Verbs

Verb What it does
bim blender install download and install managed Blender 4.5.10 LTS
bim blender install --component bonsai add Bonsai IFC add-on to the managed install
bim blender install --component all Blender + Bonsai in one step
bim blender upgrade upgrade managed install to latest pinned versions
bim blender doctor check install health; each failed check includes a fix command
bim blender status show installed versions and paths
bim blender convert --in FILE --out FILE headless format conversion; format detected from extension
bim blender launch open managed Blender with UI; waits for bridge to bind
bim blender instances list live Blender instances with pid, port, open file
bim blender exec --code "PYTHON" run Python against a live Blender instance
bim blender exec --file script.py run a .py file
bim blender kill --pid PID terminate a specific Blender instance
bim blender kill --all terminate all managed Blender instances

Example: batch IFC to glTF

bim blender install --component all
bim blender convert --in model.ifc --out model.glb

Example: co-edit with an agent

bim blender launch
bim blender exec --code "bpy.ops.mesh.primitive_cube_add(location=(2, 0, 0))"
bim blender exec --code "_ = bpy.context.active_object.location[:]"

The cube appears in the open Blender window. The second command reads back whatever you've moved it to.

For agent use: /blender/llms.txt