← API Guide / Discovering the SolidCraft API

Discovering the SolidCraft API

Inspect installed native command IDs and live command input/output schemas.

List the installed native command registry

Instead of maintaining a parallel command catalogue, SCPC asks your installed native CLI what it supports:

python -m scpc --commands
# Or, inside Python:
from scpc import commands
registry = commands()

This calls solidcraft-cli commands. The exact result structure is defined by the SolidCraft version on your machine. No SCPC-generated signatures or hand-written parameter tables are used.

Get a command's live schema

With an authenticated, running SolidCraft desktop session, engine.describe returns the native input/output description for one command:

python -m scpc --describe solid.extrude
# Or, inside Python:
from scpc import describe
schema = describe("solid.extrude")

--describe uses the authenticated local GUI connection. It is not a standalone offline command. A missing GUI connection or unavailable schema is a real limitation; never invent parameters.

Command Explorer: later, not a dependency

A future Explorer can search the command registry, display the native parameter schema and export SCPC source. It should use the same commands() and describe() API, with a raw JSON editor when a typed field is unknown. The library works without a GUI, VS Code extension or Explorer.

Compatibility

The native regression tests currently qualify SolidCraft 0.30.1. For a different version, inspect its commands and engine.describe results, then test the actual geometry. A syntactically valid exported script is not a guarantee of compatibility.