Command-line interface
Setup adds rthyme to your Windows user PATH. Open a new terminal after installation. Contributors can run the corresponding source command through project.cmd cli.
Discover commands and versions
rthyme --help
rthyme --version
rthyme version --json
rthyme sessions --json
Version output separates the executing CLI, development checkout and registered installation. Update commands target the installed copy. Native commands require a running compatible add-in and an explicit session.
Version 0.13.0 uses protocol 14 and package 0.13.0-checks.1; install matching CLI, MCP and add-in binaries together. Version 0.10.0 used protocol 8 and package 0.10.0-timberfold.4.
Inspect a chosen session
Use an absolute binding path returned by sessions. Confirm process, document and view; do not select a process simply because it appears first.
$session = 'C:\Test\sessions\session-id.json'
rthyme inspect --session $session --json
Captures contain private model paths and metadata. Model events invalidate them; reopening creates a new document identity.
Discover open documents
Read-only document discovery is available at Home. Install matching protocol-14 binaries first:
rthyme list-documents --session $session --limit 1 --request-id CALLER_GUID --json > C:\Test\documents.json
rthyme list-documents --session $session --capture C:\Test\documents.json --offset NEXT_OFFSET --limit 1 --json
Use each page's exact nextOffset; its captured target and inventory token must still agree with native state. Open/close or metadata changes require a new capture and first page. A returned ID identifies an already-open document; listing does not activate or authorize editing it. Flags include dirty, active, family, linked, workshared, read-only and saved-path state. No file is hashed or saved. Supplying --request-id lets callers retain the original read identity for recovery; recovered pages describe the original point in time. Keep captures private.
The read-only flag reports Revit's dynamic document state, not whether its disk file can be overwritten. Explicit save independently refuses native IsReadOnlyFile with read_only_file, even when the document is editable in memory or already clean. It does not save elsewhere or discard edits.
Inspect parameters
rthyme inspect-elements --session $session --element ELEMENT_UNIQUE_ID --json > C:\Test\parameters.json
rthyme inspect-elements --session $session --element ELEMENT_UNIQUE_ID --capture C:\Test\parameters.json --parameter-offset 20 --json
Replace 20 with the actual returned nextParameterOffset; stop at null. Parameters include exact IDs, typed raw values, shared status/GUID, built-in identity and native hasValue. Names alone are not identity, and assigned does not mean useful or nonempty. See parameter identity.
Native command inventory
| Command | Purpose |
|---|---|
sessions | Discover bindings; optional --directory ABSOLUTE_PATH |
inspect | Read document/view context, optionally to a JSON capture |
list-documents | Read visible session document IDs/flags; continue with exact --capture PREVIOUS_RESULT --offset NEXT_OFFSET |
inspect-elements | Read paged parameters for --element UNIQUE_ID |
rename-view | Rename the exact view using --capture ABSOLUTE_FILE and --name NAME |
view-range get | Read all four planes into JSON |
view-range set | Apply --range SETTINGS_FILE against --capture RANGE_RESULT |
room-dimensions preview | Plan a pair for --room UNIQUE_ID |
room-dimensions create | Create the exact --capture PREVIEW_RESULT pair |
timberfold inspect | Inspect exterior-shell scope/profile; optional --profile and --scope JSON files |
timberfold preview | Retain a layout under fresh --run-id GUID; optional profile/scope |
timberfold generate | Generate from --preview-run-id GUID under a fresh --run-id GUID |
timberfold reconcile | Check --generation-run-id GUID against the current native kit under a separate --run-id GUID |
timberfold status | Read retained --run-id GUID progress/outcome |
timberfold cancel | Cooperatively cancel retained --run-id GUID |
timberfold verify | Rehash retained --run-id GUID evidence |
get-operation | Recover an outcome using --request-id GUID |
run-query, run-modify | Trusted C# with source, capture, trust and request ID |
tool save, tool show | Save or retrieve a reusable tool definition by ID without connecting to Revit |
tool run | Run an exact saved-tool digest with validated inputs, native capture, trust and request ID |
tool verify | Check a saved tool's retained native operation against its declared result-check plan |
result-check prepare, result-check verify | Prepare an explicit workflow result-check plan before an action, then verify its retained outcome |
update check, update download, update install | Check/download/install a release |
Native commands take --session ABSOLUTE_FILE. rthyme --help gives exact flags. Generic parameter editing is exposed through MCP; there is no CLI set-parameters command.
Saved Revit tools
Save a complete definition and preserve its returned digest. The Agent can create the definition from a plain-language request; external callers can supply the same JSON contract.
rthyme tool save --id TOOL_GUID --definition C:\Test\tool.json --json
rthyme tool show --id TOOL_GUID --json
rthyme tool run --id TOOL_GUID --digest DEFINITION_SHA256 --inputs C:\Test\inputs.json --session $session --capture C:\Test\capture.json --request-id NEW_REQUEST_GUID --trusted true --json
tool save and tool show do not require a Revit session. tool run requires an absolute input JSON file containing an object that matches the definition, a successful fresh inspection capture, explicit trust and the exact digest from save/show. It uses the existing trusted host; query tools roll back current-document changes and modify tools create one Undo item. Optional --budget-ms uses the existing 100–30000 ms cooperative bound.
To run a saved test assertion, add --test TEST_NAME to tool run. It executes only that assertion as a rollback query, using the supplied inputs. Run the main tool and assertion explicitly in the test's disposable fixture, refreshing the capture between calls. A definition's not_run status records that saving did not qualify it; successful native execution alone is not proof of a passing test. Preserve the original request ID for get-operation recovery after uncertainty. See execution and source-hash limits.
Workflow result checks
A saved tool's optional resultChecks plan is prepared before its main action and checked automatically after definite native success. tool run reports the original operation independently of its check result. Tools saved without a plan keep their existing execution behavior. tool verify checks the original retained request without running the action again.
Use result-check prepare and result-check verify when another caller owns the action sequence. Preparation uses a fresh inspection capture, the original action request ID, the declared plan, input object and intended expanded-source SHA-256. Verification must retain those exact identities and recover the authoritative native result. It reports expected/observed comparisons and permitted/unexpected added, modified and deleted IDs. See plan fields.
rthyme result-check prepare --session $session --capture C:\Test\capture.json --request-id ORIGINAL_ACTION_GUID --plan C:\Test\plan.json --inputs C:\Test\inputs.json --source-sha256 ACTION_SOURCE_SHA256 --trusted true --json
# Execute the exact action only after successful preparation, retaining its request ID.
rthyme result-check verify --session $session --request-id ORIGINAL_ACTION_GUID --plan C:\Test\plan.json --inputs C:\Test\inputs.json --source-sha256 ACTION_SOURCE_SHA256 --trusted true --json
rthyme tool verify --session $session --request-id ORIGINAL_ACTION_GUID --id TOOL_GUID --digest DEFINITION_SHA256 --inputs C:\Test\inputs.json --trusted true --json
Plan and input paths must be absolute JSON files. --source-sha256 identifies the exact action source; it is distinct from a saved definition's digest. Saved-tool verification resolves the action's expanded source from that definition and its original inputs. Optional --budget-ms uses the existing cooperative 100–30000 ms bound. Verification returns exit 1 when either the original operation failed or its verification status is not passed; inspect the returned original outcome and verification.status separately. Recovering an already retained check reports the original checked state, rather than certifying later model changes.
An Applied operation can have a failed or uncertain check. That does not undo or reject its already committed model change. Inspect the operation and report before another edit; these commands never automatically replay, repair, Undo, save or sync. Native observation is outside a writable model transaction but retains full-process trusted C# permissions. Use the exact flags from rthyme --help and keep input/plan/capture files private.
TimberFold cutting kits
rthyme timberfold inspect --session $session --json
rthyme timberfold preview --session $session --run-id NEW_PREVIEW_GUID --json
rthyme timberfold status --session $session --run-id PREVIEW_GUID --json
rthyme timberfold generate --session $session --preview-run-id PREVIEW_GUID --run-id NEW_GENERATION_GUID --json
rthyme timberfold status --session $session --run-id GENERATION_GUID --json
rthyme timberfold verify --session $session --run-id GENERATION_GUID --json
rthyme timberfold reconcile --session $session --generation-run-id GENERATION_GUID --run-id NEW_RECOVERY_GUID --json
rthyme timberfold cancel --session $session --run-id SAME_GUID --json
Replace GUID placeholders with retained identities. Starts acknowledge acceptance; poll status until terminal. Generate requires PreviewReady. Generation creates annotation-only native documentation in one Undo group and writes cutting/guide files; it never saves the source RVT. Status/cancel use separate control channels. Verify rehashes delivered evidence; Reconcile checks current native documentation read-only and retains separate evidence. Preserve the original ID and exact request after a lost response; do not start another generation to resolve uncertainty.
KitReady means digital checks passed. Physical calibration, cutting and assembly remain outstanding; ManufacturingReady stays false. See TimberFold usage, supported geometry and the small physical-test download.
A checked rename
Try only on a disposable project:
rthyme inspect --session $session --json > C:\Test\view.json
# Review the captured document and view before continuing.
rthyme rename-view --session $session --capture C:\Test\view.json --name 'Level 1 - Test' --json
The operation checks identity and prior values, verifies native readback and creates one Undo item. It does not save or synchronize. Use native Undo to restore the name. Reinspect after changes. If completion is uncertain, recover the original request and inspect native state before another write.
Updates and errors
rthyme update check --json
rthyme update download --destination C:\Test\Downloads
# Preserve unsaved work and close Revit first.
rthyme update install
Check process exit status, structured outcome and diagnostics; do not infer native success from text alone. See updates, recovery and troubleshooting.