Command line interface¶
The distribution is named ada-py, but the console script it installs is
ada — there is no ada-py command. Install the package, then call ada:
mamba create -n adaenv ada-py
conda activate adaenv
ada --help
The entry point lives in its own top-level package (ada_cli) so that
ada --help does not import the full CAD/FEM surface. Every subcommand
imports its implementation lazily, so an invocation only pays for what it uses.
One global option applies to all of them:
--log-levelLogging level for the commands that initialise the
adapackage (convert,view,audit repro,audit parity). DefaultINFO.
The command groups are convert, view, build, files, audit
and serve. The first two run entirely locally; the rest of this page notes
where a group talks to a hosted viewer instead.
ada convert¶
Convert a model to another format. Input formats: ifc, step/stp, xml, inp, fem, sat/acis. Output formats: ifc, step/stp, gltf/glb, xml, inp. The output format is inferred from the destination extension.
ada convert model.sat model.stp
ada convert model.ifc model.glb
--splitSplit ACIS/SAT bodies into individual faces.
--limitStop after this many geometries. Debugging aid; unset by default.
ada view¶
Open the built-in web viewer on a file.
ada view model.ifc
ada view model.ifc --renderer pygfx
--rendererOne of
react(default),pygfxortrimesh.--hostHost to bind the viewer websocket to. Default
localhost.--ws-portWebsocket port. Default
8765.--split,--limitAs for
ada convert.
ada build¶
Run the entrypoints declared in an ada_config.toml and push the artefacts
they produce to a viewer. The three subcommands share --config (default
ada_config.toml), --entrypoint (run only the named one) and
--output-dir (default .ada-build).
ada build runRun the entrypoints and stage the artefacts locally.
ada build uploadUpload the artefacts already under the output dir.
ada build run-and-uploadChain the two. This is the one to use in CI.
Uploading needs a target and a credential, read from ADAPY_VIEWER_URL and
ADAPY_VIEWER_TOKEN (the newer ADAPY_API_BASE / ADAPY_API_TOKEN pair
is accepted too, and wins when both are set). A .env in the working
directory is picked up automatically; real environment variables win over it.
ada files¶
List and move blobs in a viewer scope. Every subcommand takes --url,
--token and --scope, each defaulting to the matching environment
variable. A scope looks like project:my-slug or user:me.
ada files listList keys in the scope.
--prefixfilters,-l/--longadds sizes.ada files downloadDownload
KEYtoDEST(default: its basename in the working directory). Goes S3-direct through a presigned URL where the backend supports it;--via-apiforces the tunneled GET instead.ada files uploadUpload
SRCtoKEY(default: the basename ofSRC).--via-apiforces the tunneled PUT, which is subject to the direct-upload size cap.ada files deleteDelete the given keys, and/or everything under
--prefix.-y/--yesskips the confirmation prompt.
ada files list --scope project:my-slug -l
ada files upload model.glb versions/main/abc1234/model.glb
ada files delete --prefix debug/ --yes
ada audit¶
A read-only client over the viewer’s audit API, plus two local re-run paths.
Credentials come from ADAPY_API_TOKEN with the base URL from
ADAPY_API_BASE or ADAPY_BASE_URL; a bare host is accepted and gets
https:// prepended. Every subcommand accepts --url, --token and
--json (raw JSON instead of a table).
ada audit runsList recent regression-sweep runs.
--limit(default 20) and--beforepage through them.ada audit runShow one run’s per-cell jobs.
--failednarrows to failures,--formatto a single target format.ada audit logQuery the per-conversion audit log, filtered by
--source,--target,--status,--keyor--grep.ada audit perfHot paths across conversions — function-level by default, cell-level when
--run,--worker-tagor--triggeris given.ada audit profileFunction stats for a single audit row’s cProfile.
--sorttakescumtime(default),tottimeorncalls.ada audit fetchDownload one conversion’s source blob under
--out(default./audit_repro).ada audit logfileDownload a conversion’s captured stdout/stderr. Prints to stdout unless
--outnames a file.ada audit reproFetch a conversion’s source and run it locally, optionally against a different
--targetformat.ada audit wasm-sweepRe-run a remote run’s cells locally through the in-browser WASM engine (node-pyodide) and write a pass/fail report. Writes nothing back to the database.
ada audit parityCross-format visual-parity check on a local model: export to each of
--formats(defaultifc,xml,step), reload, and compare the visualized element counts.
ada audit runs --limit 5
ada audit run 42 --failed
ada audit repro 1234 --target step
ada serve¶
Run one of the long-lived server processes. Neither subcommand takes options — both are configured entirely through the environment.
ada serve apiRun the REST API under uvicorn.
ada serve workerRun the conversion worker (a NATS JetStream consumer).