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).
Two modes in one driver:
bim blender convert spawns blender --background, runs the conversion, exits. No visible window. Suitable for batch pipelines.bim blender launch opens Blender with its UI visible. A background Python server binds a random local port and writes a discovery file. bim blender exec sends Python snippets over TCP -- changes appear in the open Blender window in real time.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 * |
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().
| Verb | What it does |
|---|---|
bim blender version | Driver version |
bim blender doctor [--blender-version BLENDER_VERSION] | Check bim-blender environment: managed Blender install, Bonsai addon, bridge addon version; lists all managed installs when called without --blender-version |
bim blender status [--blender-version BLENDER_VERSION] | Show managed Blender install info and any running session (pid, port, alive) |
bim blender convert --in FILE --out FILE [--in-format IN-FORMAT] [--blender-version BLENDER_VERSION] | Convert between 3D file formats headlessly (FBX, glTF/GLB, OBJ, USD, BLEND; IFC requires --component bonsai) |
bim blender install [--component COMPONENT] [--dry-run] [--blender-version BLENDER_VERSION] | Install managed Blender (and optionally Bonsai) into %LOCALAPPDATA%\bim-cli\blender\ |
bim blender upgrade [--component COMPONENT] [--blender-version BLENDER_VERSION] | Upgrade managed Blender and/or Bonsai to the latest pinned versions |
bim blender instances [--blender-version BLENDER_VERSION] | List running managed Blender instances with their PIDs, ports, and open files |
bim blender launch [--file FILE] [--timeout N] [--reuse] [--headless] [--blender-version BLENDER_VERSION] | Start managed Blender; --headless for a persistent background session, default opens UI |
bim blender quit [--pid N] [--all] [--blender-version BLENDER_VERSION] | Close a managed Blender instance. Auto-selects when exactly one instance is running. |
bim blender kill [--pid N] [--all] [--blender-version BLENDER_VERSION] | Terminate a managed Blender instance (alias for quit) |
bim blender exec [--code CODE] [--file FILE] [--pid N] [--timeout N] [--blender-version BLENDER_VERSION] | Execute a Python snippet against a running Blender instance |
bim blender run [--file FILE] [--code CODE] [--glb FILE] [--render FILE] [--args ARGS] [--blender-version BLENDER_VERSION] | Execute a bpy script headlessly and optionally export GLB / render a PNG still |
bim blender bim-pdf --input FILE --output FILE [--views VIEWS] [--scale SCALE] [--cut-height CUT_HEIGHT] [--section-axis SECTION_AXIS] [--blender-version BLENDER_VERSION] | Export a Blender/IFC model to a multi-page PDF with orthographic views (floor plan, section, elevation) using headless Blender rendering |
| Verb | What it does |
|---|---|
bim blender ifc.info --in FILE [--blender-version BLENDER_VERSION] | Read IFC metadata: schema version, project name, element counts by type, GlobalId of top-level IfcProject |
bim blender ifc.validate --in FILE [--blender-version BLENDER_VERSION] | Validate an IFC file via IfcOpenShell; returns {valid, errors[], warnings[]} with per-issue severity and instance pointers |
bim blender ifc.convert --in FILE --out FILE [--schema SCHEMA] [--dry-run] [--blender-version BLENDER_VERSION] | IFC schema migration via IfcOpenShell: converts between IFC2X3, IFC4, IFC4X3 schemas; element count preserved within tolerance |
bim blender ifc.to-pdf --in FILE --out FILE [--view VIEW] [--scale N] [--blender-version BLENDER_VERSION] | Export a bim-pdf package from an IFC file (headless, requires Bonsai): renders a plan-view PDF and writes marks.json, elements.json, scales.json, titleblock.json sidecars in the canonical bim-pdf format |
bim blender ifc.export-pdf --in FILE --out FILE [--no-pack] [--dry-run] [--titleblock TITLEBLOCK] [--project-name PROJECT_NAME] [--sheet-prefix SHEET_PREFIX] [--blender-version BLENDER_VERSION] | Export a bim-pdf package from an IFC source via IfcOpenShell (requires Bonsai). Produces a floor-plan PDF (one page per storey) plus bim-pdf/v1 JSON sidecars (levels, elements, scales, annotations with coordinate_space). Coordinate space: PDF user-space points, bottom-left origin, Y-up. Pass --out ending in .bimpdf to also produce a packed archive. |
bim blender install --component all
bim blender convert --in model.ifc --out model.glb
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