@cadcrawl/cad-toolbox
v0.3.0
Published
NPX CLI for inspecting and rendering STEP, STL, 3MF, and PDF CAD assets.
Readme
@cadcrawl/cad-toolbox
cad-toolbox is an NPX CLI for inspecting and rendering local CAD and drawing files. It is meant for agents and scripts that need compact engineering metadata plus optional PNG previews.
Supported inputs:
.step .stp .stl .3mf .pdfRun
npx @cadcrawl/cad-toolbox inspect .\part.step --fields metadata,renders --view iso-front --output-dir .\.tmp\cad-toolboxSkill
Install the agent skill:
npx skills add cadcrawl/cad-toolboxCommands
cad-toolbox info <file>
cad-toolbox render <file>
cad-toolbox inspect <file>
cad-toolbox batch <dir-or-json>Commands write compact structured output to stdout. It is JSON-like, but STEP tree is printed as an ASCII block for readability. Rendered PNG files are reported in renders.
Each PNG has a sibling <render>.cad-toolbox.json sidecar containing the source file hash and render parameters. Existing PNGs are reused only when that sidecar matches; if the source hash or render options change, the PNG is regenerated.
Fields
metadata,tree,text,renders,allmetadata is the single container for engineering facts:
{
"modified_at_iso": "2026-02-09T16:20:01.750Z",
"bounding_box": {
"min": [0, 0, 0],
"max": [100, 30, 0.6],
"size": [100, 30, 0.6]
},
"geometry": { "mesh_count": 1, "vertex_count": 36, "triangle_count": 12 }
}CAD metadata includes modification time, bounding box, geometry counts, and materials/colors when present. PDF metadata includes modification time and page count. PDF text is capped at 200 characters unless --full-text is passed.
Examples
npx @cadcrawl/cad-toolbox info part.step --fields metadata
npx @cadcrawl/cad-toolbox inspect part.step --fields metadata,tree,renders --view iso-front --output-dir renders
npx @cadcrawl/cad-toolbox render part.step --views front,top,right --output-dir renders
npx @cadcrawl/cad-toolbox render part.step --view custom --camera 1,2,3 --width 1600 --height 1200 --output part.png
npx @cadcrawl/cad-toolbox inspect drawing.pdf --fields metadata,text,renders --page 1 --output-dir renders
npx @cadcrawl/cad-toolbox inspect drawing.pdf --fields metadata,text --full-text
npx @cadcrawl/cad-toolbox batch .\archive --fields metadataPDF rendering is page-based. CAD projection parameters do not apply to PDFs.
License
PolyForm Noncommercial License 1.0.0.
