cli-anything-freecad
Complete CLI harness for FreeCAD — 258 commands across 17 groups covering ALL workbenches.
Prerequisites
FreeCAD must be installed: freecadcmd must be in PATH.
Installation
Basic Usage
Preview, Live Preview, and Motion
FreeCAD is currently the deepest preview integration in this branch.
Preview commands:
Typical quick bundle artifacts:
hero.pngfront.pngtop.pngright.png
Live preview persists:
session.json- immutable bundle directories
trajectory.json
preview live status --json is intended for agents and includes a compact
trajectory_summary in addition to _session_dir, current bundle refs, and
_trajectory_path.
Viewer commands:
Motion commands remain separate from preview and are used for final truthful frame rendering and showcase videos:
Command Groups (258 commands)
document (5) — Document management
part (29) — 3D primitives, boolean, transforms, operations
sketch (26) — 2D constrained sketching
body (38) — PartDesign features
material (8) — PBR materials with engineering properties
assembly (11) — Assembly management
mesh (16) — Mesh operations
techdraw (15) — Technical drawings
draft (33) — 2D drafting
measure (12) — Measurement and analysis
surface (6) — Surface operations
fem (12) — Finite Element Analysis
cam (10) — CNC machining
spreadsheet (7) — Parametric data tables
import (13) — Import CAD/mesh files
export (3) — Export to 17 formats
session (4) — Undo/redo
JSON Output
All commands support --json. Responses include structured data. Errors: {"error": "message"}.
Error Handling
- Missing FreeCAD: Clear install instructions
- Invalid types: Lists valid options
- Index out of range: Reports valid range
- File exists: Use
--overwrite
Agent Preview Notes
- Use
preview capture --jsonwhenever geometric changes need visual verification. - Use
preview live startfor iterative build loops; prefer poll mode when the project file is being saved repeatedly. - Use
preview live status --jsonas the cheap status probe before reading the fulltrajectory.json. - Treat
_bundle_diras a single snapshot only; the stable live identity is_session_dirplus_trajectory_path. - Use
cli-hub previews ...only to inspect/open already-published previews.

