Sandbox
@svd-ai-lab/sim-cli

CLI for CAE scans, solver checks, and live sessions

sim reads existing CAE files and turns them into structured text and JSON for an agent to inspect. It can also detect local solver installs, validate scripts before execution, and hold a solver session open so the agent can work in small verified steps.

219 stars22 forksPythonUpdated 9d ago
Who it's for

Builders who want their agent to read CAE models, check solver setups, and work through simulation steps safely.

What it delivers

You can give an agent real simulation context, verify scripts before running them, and keep solver work bounded and inspectable.

What it does

Scan CAE files into structured JSON

Parses files like `.mph`, `.inp`, `.cas.h5`, `.aedt`, `.aedtz`, `.mechdb`, `.tzr`, and FloTHERM files into model inventory, materials, boundary conditions, mesh counts, and solve settings.

Detect solver installs

Checks local or remote solver availability and versions with `sim check` and plugin diagnostics with `sim plugin doctor`.

Validate scripts before execution

Lints solver scripts with `sim lint <script>` so agents can catch issues before running them.

Keep a live solver session open

Uses `sim connect`, `sim exec`, `sim inspect`, and `sim disconnect` to run one bounded modeling or solve step at a time.

Sync agent skills from plugins

Materializes installed plugin skills into `.agents/skills` or `.claude/skills` so the agent can follow solver-specific workflows.

Stable agent-readable command output

Returns `--json` envelopes with fixed error codes and bounded lists so large scans do not overwhelm context.

How to get it

  1. 1Point sim scan at a folder of .mph / .inp / .cas.h5 / .aedt files and get back…
    uv init                  # only if this is not already a uv project
    uv add sim-cli-core
    uv run sim --json scan ./historical-cases
  2. 2The default view is bounded — lists come back as {total, sample, truncated} so a large…
    Scan ./legacy-cases and tell me which models are package-level thermal
    studies, which already have solved results, and what total power each one
    assumes. Use `uv run sim --json scan`.
  3. 3These need the solver's plugin installed — sim-cli-core ships with no drivers
    uv add sim-plugin-comsol
    uv run sim plugin sync-skills --target .agents/skills --copy
    uv run sim check comsol                    # detect local installs and versions
    uv run sim plugin doctor comsol --deep     # plugin wiring + solver detection
    uv run sim lint <script>                   # validate before running
  4. 4The bundled solver skill enforces the details, so give the agent the engineering goal in…
    Simulate the natural-convection cooling of the attached `pcb.mph` and report the
    maximum junction temperature. Use the installed COMSOL skill. If you need a
    visible COMSOL Desktop session, connect with `--ui-mode gui`.

README

sim

sim reads existing CAE files and turns them into structured text an agent can use — without launching the solver. It also detects local solver installs, validates scripts before you run them, and can hold a live solver session open when an agent needs to work one verified step at a time.

Python 3.10+ · Apache-2.0 · alpha


Scan existing simulation assets

Point sim scan at a folder of .mph / .inp / .cas.h5 / .aedt files and get back structured JSON an agent can reason over — model inventory, materials, boundary conditions, mesh counts, solve settings. No solver, no license, and no plugin needed:

uv init                  # only if this is not already a uv project
uv add sim-cli-core
uv run sim --json scan ./historical-cases
$ uv run sim --json scan ./cases/beam.inp --full
{
  "schema_version": "sim.scan/v1",
  "assets": [{
    "file_name": "beam.inp",
    "format": "abaqus-inp",
    "summary": {"data": {
      "title": "Cantilever beam thermal-stress",
      "node_count": 3,
      "element_count": 1,
      "materials": ["STEEL"],
      "sections": ["SOLID SECTION:STEEL"],
      "steps": ["STATIC"],
      "boundary_keywords": ["BOUNDARY"],
      "load_keywords": ["CLOAD"],
      "output_keywords": ["NODE PRINT"]
    }}
  }]
}

(abridged — the real envelope also carries ok, engine, request, and a roll-up summary block.)

SolverFiles--format id
COMSOL.mphcomsol-mph
Abaqus.inp, .incabaqus-inp
Fluent.cas.h5, .msh.h5fluent-hdf5
Ansys Electronics Desktop (HFSS / Icepak).aedt, .aedtzhfss-aedt
Ansys Mechanical.mechdb, .mechdatansys-mechanical
Icepak Classic.tzricepak-tzr
Simcenter FloTHERM.pack, .xml, .floxmlflotherm-pack, flotherm-floxml

The default view is bounded — lists come back as {total, sample, truncated} so a large scan cannot blow up an agent's context — and absolute paths are redacted unless --include-paths is set. Use --full for the complete parser result on a small input set, --limit and --no-recursive to bound a directory walk, and --format to force a format for an explicitly named file.

Example: what's in this folder?

Scan ./legacy-cases and tell me which models are package-level thermal
studies, which already have solved results, and what total power each one
assumes. Use `uv run sim --json scan`.

Find solvers and validate scripts

These need the solver's plugin installed — sim-cli-core ships with no drivers:

uv add sim-plugin-comsol
uv run sim plugin sync-skills --target .agents/skills --copy
uv run sim check comsol                    # detect local installs and versions
uv run sim plugin doctor comsol --deep     # plugin wiring + solver detection
uv run sim lint <script>                   # validate before running

Use .agents/skills for Codex and GitHub Copilot, .claude/skills for Claude Code. Two things are worth telling the agent explicitly: run through the project with uv run sim ... so it sees the project's installed plugins, and never guess solver API names — inspect the live model or the solver's local docs first.

No uv, or installing from a wheel, git, or a local checkout — and the sim.toml project manifest schema — are covered in docs/plugin-install.md.

Drive a live solver session

When an agent needs the solver held open across steps, sim connect starts a local runtime and keeps the session alive. A bounded step is one modeling, meshing, solving, or postprocessing action that can be inspected and verified before continuing: create a geometry feature, assign a material, generate a mesh, run one study, extract a probe value, export a result table.

Prefer this loop over one large generated script:

  1. uv run sim check <solver>, then uv run sim connect --solver <solver>
  2. uv run sim inspect session.versions before changing state — including after any human GUI edit, since an engineer can cut in through the solver GUI at any time and a previous script may no longer match the real session
  3. uv run sim exec --file step.py --label <step> — one bounded step
  4. uv run sim inspect last.result, verify with numeric evidence (mesh statistics, convergence, probes, conservation checks, tolerances), checkpoint
  5. uv run sim disconnect, then uv run sim stop to free the local runtime

The bundled solver skill enforces the details, so give the agent the engineering goal in plain language rather than a list of sim sub-steps:

Simulate the natural-convection cooling of the attached `pcb.mph` and report the
maximum junction temperature. Use the installed COMSOL skill. If you need a
visible COMSOL Desktop session, connect with `--ui-mode gui`.

Running the solver on a different host — and the security constraints that come with it — is covered in docs/remote-solvers.md.

Solver plugins

Solver knowledge is not in the core CLI. It comes from plugins, each of which provides a driver, so sim can launch or talk to the solver, and a skill, so the agent knows that solver's workflow, pitfalls, and inspection rules.

SolverPackage specPlugin repo
COMSOLsim-plugin-comsolsim-plugin-comsol
Abaqussim-plugin-abaqussim-plugin-abaqus
LTspicesim-plugin-ltspicesim-plugin-ltspice

For the curated full list, see sim-plugin-index.

Commands

Every command takes --json and returns a stable envelope with a closed error-code enum — see docs/agent-readability.md.

CommandUse it for
uv run sim --json scan <path>...Parse historical simulation assets without launching a solver.
uv run sim plugin listShow plugins visible in this project environment.
uv run sim plugin info <solver>Show plugin metadata and compatibility summary.
uv run sim plugin doctor <solver> --deepCheck plugin wiring plus local solver detection.
uv run sim plugin sync-skills --target .agents/skills --copyMaterialize installed plugin skills for your agent.
uv run sim check <solver>Detect local or remote solver installs.
uv run sim connect --solver <solver>Open a persistent solver session.
uv run sim exec --file step.pyRun one bounded step in the live session.
uv run sim inspect <target>Query session, result, or solver-specific state.
uv run sim run script.py --solver <solver>Run a deterministic one-shot script.
uv run sim logs last --field <name>Read back a one-shot run's parsed result.
uv run sim disconnectTear down the active session.
uv run sim stopStop the local runtime that sim connect auto-started.
uv run sim setupValidate sim.toml and report declared plugin package specs.

Run uv run sim --json describe for a machine-readable command manifest, or uv run sim <command> --help for exact options.

Solver ownership

sim-cli does not bundle or redistribute simulation solvers or vendor SDKs. Install and operate each underlying solver according to its vendor terms. See NOTICE for optional SDK dependency notes.

sim-cli is an independent open-source project and is not affiliated with, endorsed by, or sponsored by any solver vendor. Product, solver, and company names remain the property of their respective owners.

Docs

License

Apache-2.0 — see LICENSE.

Files in the repo

Repository payload15 top-level entries
  • .github
  • assets
  • docs
  • scripts
  • src
  • tests
  • tools
  • .gitignore
  • CLAUDE.md
  • CONTRIBUTING.md
  • LICENSE
  • NOTICE
  • pyproject.toml
  • README.md
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k