Revit automation from the command line

Most Revit automation tools require a Revit plugin, a Python environment, or a Dynamo graph. bim-cli is one Windows binary. It connects to your running Revit session over a local TCP bridge and runs commands against the live model. No admin rights, no Revit restart, no per-seat license.

Export sheets, update parameters, extract schedules, and process PDFs -- all from a terminal or AI assistant. Revit stays open; bim-cli handles the commands.

Export sheets to PDF

Export one sheet or every sheet in the model. The sheets go to a folder — one PDF per sheet, named by sheet number. Add --bim to write 6 JSON sidecars alongside each PDF.

export the full drawing set with BIM data
bim revit export --all-sheets --bim --output ./drawings/
{"ok":true,"data":{"sheets":47,"out":"drawings/"}}

Revit's own PDF engine handles the export — vector output, embedded element IDs, the same quality as File > Export > PDF. bim-cli drives it from the terminal without touching the Revit UI.

Batch export details ->

Bulk-update parameters

Read parameter values from an Excel file and write them back into Revit elements. Hundreds of elements at once, no Revit dialog boxes.

write parameter values from Excel
bim revit exec --file update-assembly-codes.cs
{"ok":true,"updated":247,"skipped":3}

The --file flag runs an arbitrary C# script against the live Revit API. Any parameter, any element category, any logic you can write in C# or describe to an AI assistant.

Bulk parameter update details ->

Extract schedules to Excel

Pipe a Revit schedule directly to an Excel file. No schedule view export dialog, no text file intermediate, no reformatting.

export a schedule to Excel
bim revit exec "..." | bim excel write doors.xlsx
{"ok":true,"rows":47,"columns":["Mark","Type","Width","Height","Level"],"path":"doors.xlsx"}

Schedule to Excel details ->

Run arbitrary Revit API code

bim revit exec compiles and runs a C# snippet against the live model on Revit's main thread. No Visual Studio, no .NET SDK, no add-in project -- just a string or a .cs file.

count warnings in the active model
bim revit exec "return doc.GetWarnings().Count;"
{"ok":true,"result":14}
list all room names and areas
bim revit exec "return new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Rooms).Cast<Room>().Where(r => r.Area > 0).Select(r => new { r.Name, r.Number, area = Math.Round(r.Area, 1) }).ToList();"

Every Revit API type is available in the execution context: doc, app, uiDoc, uiApp. Return any JSON-serializable value and it comes back as stdout.

Automate with an AI assistant

Your AI coding tool (Claude Code, Cursor, Codex) can install bim-cli, inspect the model, and run commands without you touching the terminal. Describe the task; the assistant handles the commands.

paste into your AI coding tool
Automate a Revit task using bim-cli.

Step 1 -- install bim-cli if not already installed: powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "iwr -useb https://bimcli.com/install.ps1 | iex"

Step 2 -- refresh PATH: pwsh: $env:Path += ";$env:LOCALAPPDATA\bim-cli"

Step 3 -- check the model is open and orient: bim revit status bim describe --json

Then describe what you need done in the model. Examples:

  • "Export all A- sheets to PDF in C:\drawings"
  • "List all rooms with area under 50 sqft"
  • "Set the Assembly Code on all exterior walls to match doors.xlsx"

Headless Revit with Claude Code ->

Install

One command, no admin rights required.

install
iwr -useb https://bimcli.com/install.ps1 | iex

Works on Revit 2024, 2025, and 2026. The installer detects your Revit version automatically and places the add-in in %APPDATA%\Autodesk\Revit\Addins\. Nothing leaves your machine.