Try SolidCraft in the browser above first; the CLI is for when you want the same modelling without a window. solidcraft-cli is the headless tool that comes with SolidCraft, the free open-source parametric CAD app. Everything below comes from the official docs and the tool's own usage text. Release checked: v0.18.4, published 2026-10-21 (as of 2026-10-22). If you are here for AI agents, the SolidCraft MCP server page covers that side in full.
What the CLI is for
SolidCraft runs as a desktop app, a browser app, a headless CLI and an MCP server, and the README's point is that all four run the same commands. The command registry is one list; the toolbar, a script, solidcraft-cli exec, the control channel and MCP all call the same ids such as sketch.create or solid.extrude.
That gives the CLI four jobs:
- Build a part from a script and write it out as STEP, STL, 3MF or another format, with no window and no clicking.
- Measure a script, a saved design or an imported STEP file: volume, area, faces and the rest, as JSON.
- Picture a part as a PNG, either a quick viewport snapshot or a studio render.
- Serve MCP so Claude Code or another agent can model through it.
Where to get it
The CLI ships with the app rather than as a separate download in most cases:
| System | Where the CLI is |
|---|---|
| Windows | In the installer and portable zip, next to the desktop app |
| Linux | In the AppImage, .deb, .rpm and Flatpak packages |
| Linux snap | Installed as solidcraft.cli (note the dot), so solidcraft.cli --version checks it |
| macOS | A separate file on the release page: solidcraft-cli-<version>-macos-universal.zip |
| From source | cargo run --release -p solidcraft-cli -- <subcommand> |
The desktop executable is solidcraft and the CLI is solidcraft-cli; designs are .solidcraft files. Every package also ships a tiny solvecraft-cli alias from the product's previous name, which just forwards to solidcraft-cli so older scripts keep working. Download links for each platform are on the SolidCraft download page.
The subcommands
From the tool's usage text:
| Command | What it does |
|---|---|
run <script.json | design.solidcraft | part.step> [--out FILE]... |
Build the input and write the outputs; --in starts from an existing design or STEP file with the script run on top |
eval <input> (alias inspect) |
Measurements as JSON |
script <design.solidcraft> [--out script.json] |
The design's history as a command script that run and eval replay |
snapshot <input> --out shot.png |
A viewport picture, with view, camera, size, section and per-body options |
render <input> --out image.png |
A studio render, with --setup, size and --transparent |
exec <command> [json-params] |
Run one command on an empty design |
commands |
The command registry as JSON |
mcp |
The MCP server on stdio |
gpu |
The adapters a headless picture can use and which one the policy picks |
crashes, licences, icon, recipe, oracle, fuzz, bench-* |
Crash reports, licence text, the app icon, and the project's own test and benchmark tools |
Add --debug to any command for SolidCraft's log on stderr.
A script, and running it
A script is a JSON list of commands. The example from the docs makes a filleted block:
{"commands": [
{"command": "sketch.create", "params": {"plane": "XY"}},
{"command": "sketch.rectangle.two_point", "params": {"p0": [0, 0], "p1": [40, 30]}},
{"command": "solid.extrude", "params": {"distance": 20}},
{"command": "solid.fillet", "params": {"edges": [[0, 0, 10]], "radius": 3}}
]}
Run it and export in one line:
solidcraft-cli run script.json --out part.step
The repository's own example is examples/bracket.json, which the README runs as run examples/bracket.json --out bracket.step. A timeline feature that fails fails the run, and nothing is written; --allow-errors writes anyway. The STEP file page covers what goes into STEP and what the other export formats keep.
Useful flags on run:
--save FILEkeeps the result as a.solidcraftdesign as well as exporting it.--resultsprints each command's result, and--json-out FILEsends that JSON to a file as plain UTF-8, which matters on Windows PowerShell, where>would add a byte-order mark.--timingsprints how long each command took, and--profilesplits each one into boolean, tessellation and other time, so you can find the slow step in a long script.
Measuring a part
solidcraft-cli eval examples/bracket.json
solidcraft-cli eval part.step
eval prints the measurement as JSON: volume, area, faces and so on. It takes a script, a saved design or an imported STEP file, so it also works as a quick check on a file someone sent you.
Snapshots and renders
solidcraft-cli snapshot examples/bracket.json --out bracket.png
solidcraft-cli snapshot part.solidcraft --out photo.png --view Photo
solidcraft-cli snapshot plate.solidcraft --out cut.png --tool Pin --section z=12
solidcraft-cli render examples/render-studio.json --out product.png
snapshot looks from the iso view by default. --view takes front, back, top, bottom, left, right or the name of a view saved in the design with view.save; --camera JSON takes any camera in the same form the MCP screenshot tool uses. --no-grid and --no-axes leave out the ground grid and origin axes. --tool NAME draws one body solid and everything else see-through, and --section z=12 cuts the model at a plane so the inside shows, which the docs suggest for checking what a cut or join is about to do. --body "Plate:opacity=0.25" sets one body's opacity or colour.
Pictures are drawn on the GPU with the viewport's own pipelines. A machine without a GPU falls back to a software one, and with neither the CPU rasterizer draws it without surface-analysis colours. SOLIDCRAFT_GPU=auto|hardware|software|cpu chooses, and solidcraft-cli gpu lists what is available.
One command, or a whole design as a script
exec runs a single command on an empty design, which is the quickest way to see what a command returns:
solidcraft-cli exec solid.box '{"length": 20, "width": 10, "height": 5}'
solidcraft-cli commands
script goes the other way: it turns a saved design's history into a script that rebuilds it. The docs use it to turn a bug that only shows on one design into a one-file reproduction:
solidcraft-cli script part.solidcraft --out repro.json
solidcraft-cli eval repro.json
The MCP server
solidcraft-cli mcp starts a Model Context Protocol server on stdio. Headless it runs its own design session; --in starts it from a design or script, and --connect 127.0.0.1:PORT bridges it to a running desktop app started with --control PORT so you can watch the agent work. Files the agent's tool calls can reach are confined unless you pass --allow-path DIR or --allow-any-path. For Claude Code the setup is one line, claude mcp add solidcraft -- solidcraft-cli mcp; the MCP page has the Claude Desktop config, the tools and an example session.
What the CLI does not do
- It is not a different modeller. It runs the same commands as the app, so anything the app cannot model, the CLI cannot either.
- It does not slice or cut toolpaths. Export STL or 3MF and hand off to a slicer; CAM is listed as deferred on the project roadmap.
- It has no window. For interactive work use the desktop app, or the browser version at the top of this page.
Start by running solidcraft-cli commands once to see the registry, then write a four-line script like the one above. From there, the home page has the browser app for trying commands by hand, and the tutorial shows the same block-and-holes part built in the UI.