sim-cli-core 0.3.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/CLAUDE.md +1 -1
- sim_cli_core-0.3.1/NOTICE +35 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/PKG-INFO +71 -20
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/README.md +70 -19
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/assets/architecture.svg +6 -6
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/assets/banner.svg +5 -5
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/docs/DEVELOPMENT.md +22 -17
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/docs/README.zh.md +55 -40
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/docs/agent-readability.md +2 -2
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/docs/architecture/version-compat.md +1 -1
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/docs/plugin-install.md +4 -28
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/pyproject.toml +1 -1
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/_plugin_install.py +88 -9
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/cli.py +69 -3
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/compat.py +22 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/inspect.py +48 -12
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/server.py +37 -3
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/session.py +4 -1
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_cli.py +24 -1
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_compat.py +18 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_multi_session.py +41 -1
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_plugin_install.py +152 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/inspect/test_gui_probes.py +113 -0
- sim_cli_core-0.3.0/NOTICE +0 -72
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/.github/workflows/publish.yml +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/.gitignore +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/CONTRIBUTING.md +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/LICENSE +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/assets/logo.svg +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/docs/README.de.md +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/docs/README.ja.md +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/docs/architecture/multi-session-and-config.md +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/docs/architecture/skills-layering-plan.md +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/__init__.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/__main__.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/_timeout.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/config.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/describe.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/driver.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/drivers/__init__.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/gui/LICENSES/ATTRIBUTION.md +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/gui/__init__.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/gui/_pywinauto_tools.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/gui/_win32_dialog.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/history.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/plugins.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/runner.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/testing/__init__.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/src/sim/testing/protocol_conformance.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/__init__.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/__init__.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_config.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_connect.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_describe.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_driver_discovery.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_history.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_init_setup.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_lint.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_lint_public_corpus.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_logs.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_plugins.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_protocol_conformance.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/base/test_run.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/conftest.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/drivers/__init__.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/calculix_e2e_cantilever_run.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/coolprop/water_props.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/elmer_e2e_heat_square.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/gmsh_e2e_sphere_mesh.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/lammps_e2e_lj_nvt.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/meshio_e2e_gmsh_to_vtk.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/pymfem_e2e_poisson.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/pyvista_e2e_sphere_stats.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/scikit_fem_e2e_poisson.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/scikitrf/short_load.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/execution/su2_e2e_inviscid_bump.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/comsol/comsol_good.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/comsol/comsol_no_client.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/comsol/comsol_no_import.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/hypermesh_good.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/hypermesh_gui.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/hypermesh_no_import.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/hypermesh_no_usage.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/hypermesh_syntax_error.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/isaac/bad_import_order.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/isaac/bad_no_close.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/isaac/bad_no_simapp.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/isaac/hello_world.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/isaac/import_franka.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/isaac/not_isaac.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/isaac/official_hello_world.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/isaac/replicator_cubes.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/isaac/syntax_error.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/isaac/warehouse_sdg.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/matlab/empty_model.mdl +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/matlab/empty_model.slx +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/matlab/matlab_ok.m +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/mfem_good.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/mfem_no_import.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/mfem_no_mesh.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/mfem_syntax_error.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/mock_fail.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/mock_solver.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/newton/basic_pendulum.json +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/newton/cable_twist.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/newton/robot_g1.json +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/not_simulation.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/pybamm/pybamm_bad_import.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/pybamm/pybamm_crate_sweep.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/pybamm/pybamm_no_solve.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/pybamm/pybamm_spm_good.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/skfem_good.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/skfem_no_import.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/skfem_no_solve.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/fixtures/skfem_syntax_error.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/gui/__init__.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/gui/test_connect_tools_field.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/gui/test_gui_facade.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/inspect/__init__.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/inspect/_extract_comsol_Tmax.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/inspect/test_channel_3_4_5_9.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/inspect/test_inspect_types.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/inspect/test_probes.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tests/inspect/test_snippet_timeout.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tools/extract_driver.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/tools/lint-public-corpus.py +0 -0
- {sim_cli_core-0.3.0 → sim_cli_core-0.3.1}/uv.lock +0 -0
|
@@ -87,7 +87,7 @@ The server supports multiple concurrent sessions keyed by session_id. Each `Sess
|
|
|
87
87
|
Drivers are resolved lazily through two channels:
|
|
88
88
|
|
|
89
89
|
- **`_BUILTIN_REGISTRY`** — an ordered list of `(name, "module:Class")` tuples for the open-source drivers that ship with `sim-cli-core` itself (PyBaMM, OpenFOAM, CalculiX, gmsh, SU2, LAMMPS, Elmer, scikit-fem, MFEM, OpenSeesPy, SfePy, OpenMDAO, FiPy, pymoo, Pyomo, SimPy, Trimesh, Devito, CoolProp, scikit-rf, pandapower, ParaView, meshio, PyVista, Newton, Isaac Sim, LTspice). The canonical list lives in `src/sim/drivers/__init__.py`.
|
|
90
|
-
- **`sim.drivers` entry-point group** — external
|
|
90
|
+
- **`sim.drivers` entry-point group** — external drivers register themselves via standard Python entry points and are discovered at import time, validated, and appended after the built-ins. Built-ins win on name collisions. Each plugin lives in its own out-of-tree package with its own `compatibility.yaml`.
|
|
91
91
|
|
|
92
92
|
A driver may set `supports_session = True` to implement the persistent-session lifecycle (`launch`/`run`/`query`/`disconnect`); the rest are one-shot only. `get_driver(name)` looks up by `.name` attribute and lazily imports the implementation module on first use, so a broken plugin does not crash the CLI.
|
|
93
93
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
sim-cli
|
|
2
|
+
Copyright 2026 Weiqi Ji
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
see the accompanying LICENSE file for the full text.
|
|
6
|
+
|
|
7
|
+
================================================================================
|
|
8
|
+
Plugin and runtime dependency notice
|
|
9
|
+
================================================================================
|
|
10
|
+
|
|
11
|
+
sim-cli is a solver-agnostic runtime. Solver and tool integrations are provided
|
|
12
|
+
by separately installed plugins. Plugins may depend on third-party software,
|
|
13
|
+
services, SDKs, or local executables that are not bundled with this repository.
|
|
14
|
+
Users are responsible for complying with the license, copyright, and end-user
|
|
15
|
+
terms that apply to any third-party software they install or use with a plugin.
|
|
16
|
+
|
|
17
|
+
Commercial plugin availability depends on third-party license conditions.
|
|
18
|
+
Contact <contact@svd-ai-lab.com> to discuss commercial plugin access.
|
|
19
|
+
|
|
20
|
+
================================================================================
|
|
21
|
+
Direct runtime dependencies (see pyproject.toml)
|
|
22
|
+
================================================================================
|
|
23
|
+
|
|
24
|
+
click, httpx, fastapi, uvicorn, pyyaml, Pillow, lxml
|
|
25
|
+
- each distributed under its own open-source license (BSD / MIT /
|
|
26
|
+
Apache-2.0 family); consult the respective package for terms.
|
|
27
|
+
|
|
28
|
+
================================================================================
|
|
29
|
+
Trademarks
|
|
30
|
+
================================================================================
|
|
31
|
+
|
|
32
|
+
Product, solver, tool, and company names may be trademarks or registered
|
|
33
|
+
trademarks of their respective owners. sim-cli is an independent open-source
|
|
34
|
+
project and is not affiliated with, endorsed by, or sponsored by any third-party
|
|
35
|
+
vendor unless explicitly stated.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sim-cli-core
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Make every engineering tool agent-native — a CLI runtime that lets LLM agents launch, drive, and observe CAD/CAE software
|
|
5
5
|
Project-URL: Homepage, https://github.com/svd-ai-lab/sim-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/svd-ai-lab/sim-cli
|
|
@@ -66,7 +66,7 @@ Description-Content-Type: text/markdown
|
|
|
66
66
|
|
|
67
67
|
**English** · [Deutsch](docs/README.de.md) · [日本語](docs/README.ja.md) · [中文](docs/README.zh.md)
|
|
68
68
|
|
|
69
|
-
[Why sim](#-why-sim) · [Quick Start](#-quick-start) · [Solvers](#-solver-registry) · [Commands](#-commands) · [
|
|
69
|
+
[Why sim](#-why-sim) · [Quick Start](#-quick-start) · [Solvers](#-solver-registry) · [Commands](#-commands) · [Skills](https://github.com/svd-ai-lab/sim-skills)
|
|
70
70
|
|
|
71
71
|
</div>
|
|
72
72
|
|
|
@@ -114,6 +114,10 @@ For the full driver protocol, server endpoints, and execution pipeline see [CLAU
|
|
|
114
114
|
|
|
115
115
|
> **Names at a glance:** repo `svd-ai-lab/sim-cli` · PyPI distribution `sim-cli-core` · console command `sim` · import `import sim`. Yes, three different strings — the repo name predates the PyPI publish; the rest follow Python packaging convention.
|
|
116
116
|
|
|
117
|
+
Prereq: [`uv`](https://docs.astral.sh/uv/) — install with `curl -LsSf https://astral.sh/uv/install.sh | sh` (macOS / Linux) or `irm https://astral.sh/uv/install.ps1 | iex` (Windows PowerShell).
|
|
118
|
+
|
|
119
|
+
**macOS / Linux:**
|
|
120
|
+
|
|
117
121
|
```bash
|
|
118
122
|
# 1. On the host that has the solver installed, install sim core only
|
|
119
123
|
# — no driver choice yet:
|
|
@@ -121,7 +125,7 @@ uv pip install sim-cli-core
|
|
|
121
125
|
|
|
122
126
|
# 2. Install the plugin for the solver you actually want (browse the
|
|
123
127
|
# index with `sim plugin list`):
|
|
124
|
-
sim plugin install <solver> # e.g. ltspice
|
|
128
|
+
sim plugin install <solver> # e.g. ltspice
|
|
125
129
|
|
|
126
130
|
# 3. Tell sim to look at this machine and pick the right SDK profile:
|
|
127
131
|
sim check <solver>
|
|
@@ -142,6 +146,34 @@ sim --host <server-ip> screenshot -o shot.png
|
|
|
142
146
|
sim --host <server-ip> disconnect
|
|
143
147
|
```
|
|
144
148
|
|
|
149
|
+
**Windows (PowerShell):**
|
|
150
|
+
|
|
151
|
+
```powershell
|
|
152
|
+
# 1. On the host that has the solver installed, install sim core only
|
|
153
|
+
# — no driver choice yet:
|
|
154
|
+
uv pip install sim-cli-core
|
|
155
|
+
|
|
156
|
+
# 2. Install the plugin for the solver you actually want (browse the
|
|
157
|
+
# index with `sim plugin list`):
|
|
158
|
+
sim plugin install <solver> # e.g. ltspice
|
|
159
|
+
|
|
160
|
+
# 3. Tell sim to look at this machine and pick the right SDK profile:
|
|
161
|
+
sim check <solver>
|
|
162
|
+
|
|
163
|
+
# 4. Bootstrap that profile env (or pass --auto-install to step 5):
|
|
164
|
+
sim env install <profile>
|
|
165
|
+
|
|
166
|
+
# 5. Start the server (only needed for remote / cross-machine workflows):
|
|
167
|
+
sim serve --host 0.0.0.0 # FastAPI on :7600
|
|
168
|
+
|
|
169
|
+
# 6. From the agent / your laptop / anywhere on the network:
|
|
170
|
+
sim --host <server-ip> connect --solver <solver> --mode solver --ui-mode gui
|
|
171
|
+
sim --host <server-ip> inspect session.versions # ← always do this first
|
|
172
|
+
sim --host <server-ip> exec "<solver-specific snippet>"
|
|
173
|
+
sim --host <server-ip> screenshot -o shot.png
|
|
174
|
+
sim --host <server-ip> disconnect
|
|
175
|
+
```
|
|
176
|
+
|
|
145
177
|
That's the full loop: **detect → bootstrap → launch → drive → observe → tear down** — with the engineer optionally watching the solver GUI in real time.
|
|
146
178
|
|
|
147
179
|
> **Why the bootstrap step?** Each `(solver, SDK, driver, skill)` combo is
|
|
@@ -154,18 +186,47 @@ That's the full loop: **detect → bootstrap → launch → drive → observe
|
|
|
154
186
|
|
|
155
187
|
---
|
|
156
188
|
|
|
189
|
+
## 📦 Plugin index
|
|
190
|
+
|
|
191
|
+
`sim plugin install <name>` resolves names against two indexes, in order:
|
|
192
|
+
|
|
193
|
+
1. **svd-maintained wheel manifest** at `https://cdn.svdailab.com/manifest.json` — pre-built wheels published by the project. Anonymous GET, updated whenever a new wheel ships.
|
|
194
|
+
2. **Community-maintained catalogue** at [`sim-plugin-index`](https://github.com/svd-ai-lab/sim-plugin-index) — broader plugin listing maintained by the community; entries can be OSS or third-party plugins, pointing at GitHub releases or git+https sources.
|
|
195
|
+
|
|
196
|
+
The first hit wins. Most users never see this distinction — `sim plugin install ltspice` just works.
|
|
197
|
+
|
|
198
|
+
svd manifest schema (the community catalogue uses a different shape — see its repo):
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"updated": "<ISO date>",
|
|
203
|
+
"plugins": {
|
|
204
|
+
"<name>": {
|
|
205
|
+
"version": "<X.Y.Z>",
|
|
206
|
+
"wheel": "https://cdn.svdailab.com/wheels/<file>.whl"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
To install a wheel directly without going through the resolver, hand `sim plugin install` the URL — `sim plugin install https://cdn.svdailab.com/wheels/<file>.whl`.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
157
216
|
## 🧪 Solver registry
|
|
158
217
|
|
|
159
|
-
`sim-cli` core is **fully solver-agnostic** — it ships with **zero built-in drivers**. Every solver
|
|
218
|
+
`sim-cli` core is **fully solver-agnostic** — it ships with **zero built-in drivers**. Every solver is reached through a **plugin package** registered via the `sim.drivers` entry-point group. Adding a new backend is a ~200-LOC `DriverProtocol` implementation in its own `sim-plugin-<name>` repo.
|
|
219
|
+
|
|
220
|
+
`sim` is most useful for **GUI-heavy solvers** — COMSOL, ANSYS Mechanical, ANSYS Fluent, MATLAB Simulink, Abaqus, Flotherm — where every agent iteration would otherwise mean clicking through dialog boxes.
|
|
160
221
|
|
|
161
|
-
|
|
222
|
+
Install by name (the resolver chains the svd manifest then the community catalogue — see [Plugin index](#-plugin-index)):
|
|
162
223
|
|
|
163
224
|
```bash
|
|
164
|
-
sim plugin list #
|
|
225
|
+
sim plugin list # show installed plugins
|
|
165
226
|
sim plugin install <name> # e.g. sim plugin install ltspice
|
|
166
227
|
```
|
|
167
228
|
|
|
168
|
-
|
|
229
|
+
Reference implementation to read for shape: [`sim-plugin-ltspice`](https://github.com/svd-ai-lab/sim-plugin-ltspice).
|
|
169
230
|
|
|
170
231
|
**Private plugins** (vendor-IP-sensitive backends not in the public index) install directly by URL — same `sim plugin install` flow:
|
|
171
232
|
|
|
@@ -178,16 +239,6 @@ Per-solver protocols, snippets, and demo workflows live in [`sim-skills`](https:
|
|
|
178
239
|
|
|
179
240
|
---
|
|
180
241
|
|
|
181
|
-
## 🎬 Demo
|
|
182
|
-
|
|
183
|
-
> 📺 **Early preview:** [first walkthrough on YouTube](https://www.youtube.com/watch?v=3Fg6Oph44Ik) — rough cut, a polished recording is still wanted (see below).
|
|
184
|
-
|
|
185
|
-
> **Recording in progress.** A short terminal capture of `sim connect → exec → inspect → screenshot` against a live solver session will land here.
|
|
186
|
-
>
|
|
187
|
-
> Want to contribute the recording? Use [`vhs`](https://github.com/charmbracelet/vhs) or [`asciinema`](https://asciinema.org/) and open a PR against `assets/demo.gif`.
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
242
|
## ✨ Features
|
|
192
243
|
|
|
193
244
|
### 🧠 Built for agents
|
|
@@ -199,7 +250,7 @@ Per-solver protocols, snippets, and demo workflows live in [`sim-skills`](https:
|
|
|
199
250
|
### 🔌 Solver-agnostic
|
|
200
251
|
- **One protocol** (`DriverProtocol`) — every driver is ~200 LOC, shipped as its own `sim-plugin-<name>` package via Python entry points
|
|
201
252
|
- **Persistent + one-shot** from the same CLI — no separate client per mode
|
|
202
|
-
- **
|
|
253
|
+
- **Plugin index** — `sim plugin install <name>` chains an [svd-maintained wheel manifest](https://cdn.svdailab.com/manifest.json) and a [community-maintained catalogue](https://github.com/svd-ai-lab/sim-plugin-index)
|
|
203
254
|
- **Companion skills** in [`sim-skills`](https://github.com/svd-ai-lab/sim-skills) so an LLM picks up each new backend without prior context
|
|
204
255
|
|
|
205
256
|
### 🌐 Remote-friendly
|
|
@@ -213,7 +264,7 @@ Per-solver protocols, snippets, and demo workflows live in [`sim-skills`](https:
|
|
|
213
264
|
|
|
214
265
|
| Command | What it does | Analogy |
|
|
215
266
|
|---|---|---|
|
|
216
|
-
| `sim plugin list / install / uninstall` | Manage
|
|
267
|
+
| `sim plugin list / install / uninstall` | Manage solver plugins (resolver chains svd → community index) | `npm install` |
|
|
217
268
|
| `sim check <solver>` | Detect installations + resolve a profile | `docker info` |
|
|
218
269
|
| `sim env install <profile>` | Bootstrap a profile env (venv + pinned SDK) | `pyenv install` |
|
|
219
270
|
| `sim env list [--catalogue]` | Show bootstrapped envs (and the full catalogue) | `pyenv versions` |
|
|
@@ -289,7 +340,7 @@ That is the entire setup — same `sim-cli-core` package on both sides, same wir
|
|
|
289
340
|
|
|
290
341
|
## 🔗 Related projects
|
|
291
342
|
|
|
292
|
-
- **[`sim-plugin-index`](https://github.com/svd-ai-lab/sim-plugin-index)** —
|
|
343
|
+
- **[`sim-plugin-index`](https://github.com/svd-ai-lab/sim-plugin-index)** — community-maintained plugin catalogue; second of two sources `sim plugin install <name>` resolves against (the first is the svd-maintained manifest at `cdn.svdailab.com/manifest.json`)
|
|
293
344
|
- **[`sim-skills`](https://github.com/svd-ai-lab/sim-skills)** — agent skills, snippets, and demo workflows for each supported solver
|
|
294
345
|
- **[`sim-ltspice`](https://github.com/svd-ai-lab/sim-ltspice)** — standalone Python API for LTspice file formats (used by `sim-plugin-ltspice`)
|
|
295
346
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
**English** · [Deutsch](docs/README.de.md) · [日本語](docs/README.ja.md) · [中文](docs/README.zh.md)
|
|
28
28
|
|
|
29
|
-
[Why sim](#-why-sim) · [Quick Start](#-quick-start) · [Solvers](#-solver-registry) · [Commands](#-commands) · [
|
|
29
|
+
[Why sim](#-why-sim) · [Quick Start](#-quick-start) · [Solvers](#-solver-registry) · [Commands](#-commands) · [Skills](https://github.com/svd-ai-lab/sim-skills)
|
|
30
30
|
|
|
31
31
|
</div>
|
|
32
32
|
|
|
@@ -74,6 +74,10 @@ For the full driver protocol, server endpoints, and execution pipeline see [CLAU
|
|
|
74
74
|
|
|
75
75
|
> **Names at a glance:** repo `svd-ai-lab/sim-cli` · PyPI distribution `sim-cli-core` · console command `sim` · import `import sim`. Yes, three different strings — the repo name predates the PyPI publish; the rest follow Python packaging convention.
|
|
76
76
|
|
|
77
|
+
Prereq: [`uv`](https://docs.astral.sh/uv/) — install with `curl -LsSf https://astral.sh/uv/install.sh | sh` (macOS / Linux) or `irm https://astral.sh/uv/install.ps1 | iex` (Windows PowerShell).
|
|
78
|
+
|
|
79
|
+
**macOS / Linux:**
|
|
80
|
+
|
|
77
81
|
```bash
|
|
78
82
|
# 1. On the host that has the solver installed, install sim core only
|
|
79
83
|
# — no driver choice yet:
|
|
@@ -81,7 +85,7 @@ uv pip install sim-cli-core
|
|
|
81
85
|
|
|
82
86
|
# 2. Install the plugin for the solver you actually want (browse the
|
|
83
87
|
# index with `sim plugin list`):
|
|
84
|
-
sim plugin install <solver> # e.g. ltspice
|
|
88
|
+
sim plugin install <solver> # e.g. ltspice
|
|
85
89
|
|
|
86
90
|
# 3. Tell sim to look at this machine and pick the right SDK profile:
|
|
87
91
|
sim check <solver>
|
|
@@ -102,6 +106,34 @@ sim --host <server-ip> screenshot -o shot.png
|
|
|
102
106
|
sim --host <server-ip> disconnect
|
|
103
107
|
```
|
|
104
108
|
|
|
109
|
+
**Windows (PowerShell):**
|
|
110
|
+
|
|
111
|
+
```powershell
|
|
112
|
+
# 1. On the host that has the solver installed, install sim core only
|
|
113
|
+
# — no driver choice yet:
|
|
114
|
+
uv pip install sim-cli-core
|
|
115
|
+
|
|
116
|
+
# 2. Install the plugin for the solver you actually want (browse the
|
|
117
|
+
# index with `sim plugin list`):
|
|
118
|
+
sim plugin install <solver> # e.g. ltspice
|
|
119
|
+
|
|
120
|
+
# 3. Tell sim to look at this machine and pick the right SDK profile:
|
|
121
|
+
sim check <solver>
|
|
122
|
+
|
|
123
|
+
# 4. Bootstrap that profile env (or pass --auto-install to step 5):
|
|
124
|
+
sim env install <profile>
|
|
125
|
+
|
|
126
|
+
# 5. Start the server (only needed for remote / cross-machine workflows):
|
|
127
|
+
sim serve --host 0.0.0.0 # FastAPI on :7600
|
|
128
|
+
|
|
129
|
+
# 6. From the agent / your laptop / anywhere on the network:
|
|
130
|
+
sim --host <server-ip> connect --solver <solver> --mode solver --ui-mode gui
|
|
131
|
+
sim --host <server-ip> inspect session.versions # ← always do this first
|
|
132
|
+
sim --host <server-ip> exec "<solver-specific snippet>"
|
|
133
|
+
sim --host <server-ip> screenshot -o shot.png
|
|
134
|
+
sim --host <server-ip> disconnect
|
|
135
|
+
```
|
|
136
|
+
|
|
105
137
|
That's the full loop: **detect → bootstrap → launch → drive → observe → tear down** — with the engineer optionally watching the solver GUI in real time.
|
|
106
138
|
|
|
107
139
|
> **Why the bootstrap step?** Each `(solver, SDK, driver, skill)` combo is
|
|
@@ -114,18 +146,47 @@ That's the full loop: **detect → bootstrap → launch → drive → observe
|
|
|
114
146
|
|
|
115
147
|
---
|
|
116
148
|
|
|
149
|
+
## 📦 Plugin index
|
|
150
|
+
|
|
151
|
+
`sim plugin install <name>` resolves names against two indexes, in order:
|
|
152
|
+
|
|
153
|
+
1. **svd-maintained wheel manifest** at `https://cdn.svdailab.com/manifest.json` — pre-built wheels published by the project. Anonymous GET, updated whenever a new wheel ships.
|
|
154
|
+
2. **Community-maintained catalogue** at [`sim-plugin-index`](https://github.com/svd-ai-lab/sim-plugin-index) — broader plugin listing maintained by the community; entries can be OSS or third-party plugins, pointing at GitHub releases or git+https sources.
|
|
155
|
+
|
|
156
|
+
The first hit wins. Most users never see this distinction — `sim plugin install ltspice` just works.
|
|
157
|
+
|
|
158
|
+
svd manifest schema (the community catalogue uses a different shape — see its repo):
|
|
159
|
+
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"updated": "<ISO date>",
|
|
163
|
+
"plugins": {
|
|
164
|
+
"<name>": {
|
|
165
|
+
"version": "<X.Y.Z>",
|
|
166
|
+
"wheel": "https://cdn.svdailab.com/wheels/<file>.whl"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
To install a wheel directly without going through the resolver, hand `sim plugin install` the URL — `sim plugin install https://cdn.svdailab.com/wheels/<file>.whl`.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
117
176
|
## 🧪 Solver registry
|
|
118
177
|
|
|
119
|
-
`sim-cli` core is **fully solver-agnostic** — it ships with **zero built-in drivers**. Every solver
|
|
178
|
+
`sim-cli` core is **fully solver-agnostic** — it ships with **zero built-in drivers**. Every solver is reached through a **plugin package** registered via the `sim.drivers` entry-point group. Adding a new backend is a ~200-LOC `DriverProtocol` implementation in its own `sim-plugin-<name>` repo.
|
|
179
|
+
|
|
180
|
+
`sim` is most useful for **GUI-heavy solvers** — COMSOL, ANSYS Mechanical, ANSYS Fluent, MATLAB Simulink, Abaqus, Flotherm — where every agent iteration would otherwise mean clicking through dialog boxes.
|
|
120
181
|
|
|
121
|
-
|
|
182
|
+
Install by name (the resolver chains the svd manifest then the community catalogue — see [Plugin index](#-plugin-index)):
|
|
122
183
|
|
|
123
184
|
```bash
|
|
124
|
-
sim plugin list #
|
|
185
|
+
sim plugin list # show installed plugins
|
|
125
186
|
sim plugin install <name> # e.g. sim plugin install ltspice
|
|
126
187
|
```
|
|
127
188
|
|
|
128
|
-
|
|
189
|
+
Reference implementation to read for shape: [`sim-plugin-ltspice`](https://github.com/svd-ai-lab/sim-plugin-ltspice).
|
|
129
190
|
|
|
130
191
|
**Private plugins** (vendor-IP-sensitive backends not in the public index) install directly by URL — same `sim plugin install` flow:
|
|
131
192
|
|
|
@@ -138,16 +199,6 @@ Per-solver protocols, snippets, and demo workflows live in [`sim-skills`](https:
|
|
|
138
199
|
|
|
139
200
|
---
|
|
140
201
|
|
|
141
|
-
## 🎬 Demo
|
|
142
|
-
|
|
143
|
-
> 📺 **Early preview:** [first walkthrough on YouTube](https://www.youtube.com/watch?v=3Fg6Oph44Ik) — rough cut, a polished recording is still wanted (see below).
|
|
144
|
-
|
|
145
|
-
> **Recording in progress.** A short terminal capture of `sim connect → exec → inspect → screenshot` against a live solver session will land here.
|
|
146
|
-
>
|
|
147
|
-
> Want to contribute the recording? Use [`vhs`](https://github.com/charmbracelet/vhs) or [`asciinema`](https://asciinema.org/) and open a PR against `assets/demo.gif`.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
202
|
## ✨ Features
|
|
152
203
|
|
|
153
204
|
### 🧠 Built for agents
|
|
@@ -159,7 +210,7 @@ Per-solver protocols, snippets, and demo workflows live in [`sim-skills`](https:
|
|
|
159
210
|
### 🔌 Solver-agnostic
|
|
160
211
|
- **One protocol** (`DriverProtocol`) — every driver is ~200 LOC, shipped as its own `sim-plugin-<name>` package via Python entry points
|
|
161
212
|
- **Persistent + one-shot** from the same CLI — no separate client per mode
|
|
162
|
-
- **
|
|
213
|
+
- **Plugin index** — `sim plugin install <name>` chains an [svd-maintained wheel manifest](https://cdn.svdailab.com/manifest.json) and a [community-maintained catalogue](https://github.com/svd-ai-lab/sim-plugin-index)
|
|
163
214
|
- **Companion skills** in [`sim-skills`](https://github.com/svd-ai-lab/sim-skills) so an LLM picks up each new backend without prior context
|
|
164
215
|
|
|
165
216
|
### 🌐 Remote-friendly
|
|
@@ -173,7 +224,7 @@ Per-solver protocols, snippets, and demo workflows live in [`sim-skills`](https:
|
|
|
173
224
|
|
|
174
225
|
| Command | What it does | Analogy |
|
|
175
226
|
|---|---|---|
|
|
176
|
-
| `sim plugin list / install / uninstall` | Manage
|
|
227
|
+
| `sim plugin list / install / uninstall` | Manage solver plugins (resolver chains svd → community index) | `npm install` |
|
|
177
228
|
| `sim check <solver>` | Detect installations + resolve a profile | `docker info` |
|
|
178
229
|
| `sim env install <profile>` | Bootstrap a profile env (venv + pinned SDK) | `pyenv install` |
|
|
179
230
|
| `sim env list [--catalogue]` | Show bootstrapped envs (and the full catalogue) | `pyenv versions` |
|
|
@@ -249,7 +300,7 @@ That is the entire setup — same `sim-cli-core` package on both sides, same wir
|
|
|
249
300
|
|
|
250
301
|
## 🔗 Related projects
|
|
251
302
|
|
|
252
|
-
- **[`sim-plugin-index`](https://github.com/svd-ai-lab/sim-plugin-index)** —
|
|
303
|
+
- **[`sim-plugin-index`](https://github.com/svd-ai-lab/sim-plugin-index)** — community-maintained plugin catalogue; second of two sources `sim plugin install <name>` resolves against (the first is the svd-maintained manifest at `cdn.svdailab.com/manifest.json`)
|
|
253
304
|
- **[`sim-skills`](https://github.com/svd-ai-lab/sim-skills)** — agent skills, snippets, and demo workflows for each supported solver
|
|
254
305
|
- **[`sim-ltspice`](https://github.com/svd-ai-lab/sim-ltspice)** — standalone Python API for LTspice file formats (used by `sim-plugin-ltspice`)
|
|
255
306
|
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
<rect x="730" y="110" width="210" height="270" rx="12" fill="#0f172a" stroke="#334155"/>
|
|
61
61
|
<text x="835" y="135" text-anchor="middle" fill="#cbd5e1" font-size="13" font-weight="600">DriverProtocol</text>
|
|
62
62
|
<g font-size="12" fill="#e2e8f0">
|
|
63
|
-
<text x="745" y="162">•
|
|
64
|
-
<text x="745" y="182">•
|
|
65
|
-
<text x="745" y="202">•
|
|
66
|
-
<text x="745" y="222">•
|
|
63
|
+
<text x="745" y="162">• plugin_a (persistent session)</text>
|
|
64
|
+
<text x="745" y="182">• plugin_b (batch process)</text>
|
|
65
|
+
<text x="745" y="202">• plugin_c (remote host)</text>
|
|
66
|
+
<text x="745" y="222">• plugin_d (GUI-capable)</text>
|
|
67
67
|
<text x="745" y="242">• … more in the registry</text>
|
|
68
68
|
<text x="745" y="270" fill="#cbd5e1">• + your driver here</text>
|
|
69
69
|
<text x="745" y="288" font-size="11" fill="#94a3b8"> (~200 LOC, register in</text>
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
<!-- live solver -->
|
|
79
79
|
<rect x="490" y="240" width="220" height="140" rx="12" fill="#0f172a" stroke="#334155"/>
|
|
80
80
|
<text x="600" y="265" text-anchor="middle" fill="#cbd5e1" font-size="13" font-weight="600">Live solver process</text>
|
|
81
|
-
<text x="600" y="290" text-anchor="middle" fill="#86efac" font-size="13">
|
|
82
|
-
<text x="600" y="310" text-anchor="middle" fill="#86efac" font-size="13">
|
|
81
|
+
<text x="600" y="290" text-anchor="middle" fill="#86efac" font-size="13">CLI · GUI · batch</text>
|
|
82
|
+
<text x="600" y="310" text-anchor="middle" fill="#86efac" font-size="13">local or remote execution</text>
|
|
83
83
|
<text x="600" y="332" text-anchor="middle" fill="#94a3b8" font-size="12">engineer can watch in real time</text>
|
|
84
84
|
<text x="600" y="358" text-anchor="middle" fill="#94a3b8" font-size="11">launched once, snippets at will</text>
|
|
85
85
|
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
<text x="430" y="248" font-size="18" font-weight="400" fill="#94a3b8">One CLI. One HTTP protocol. An open driver registry.</text>
|
|
52
52
|
<text x="430" y="276" font-size="18" font-weight="400" fill="#94a3b8">So AI agents can launch, drive, and observe CAD/CAE jobs.</text>
|
|
53
53
|
|
|
54
|
-
<!-- chiplets —
|
|
54
|
+
<!-- chiplets — generic plugin capabilities, NOT an exhaustive list -->
|
|
55
55
|
<g font-size="14" font-weight="600">
|
|
56
56
|
<rect x="430" y="298" width="78" height="26" rx="13" fill="#1e293b" stroke="#334155"/>
|
|
57
|
-
<text x="469" y="316" text-anchor="middle" fill="#93c5fd">
|
|
57
|
+
<text x="469" y="316" text-anchor="middle" fill="#93c5fd">CLI</text>
|
|
58
58
|
<rect x="516" y="298" width="78" height="26" rx="13" fill="#1e293b" stroke="#334155"/>
|
|
59
|
-
<text x="555" y="316" text-anchor="middle" fill="#c4b5fd">
|
|
59
|
+
<text x="555" y="316" text-anchor="middle" fill="#c4b5fd">GUI</text>
|
|
60
60
|
<rect x="602" y="298" width="84" height="26" rx="13" fill="#1e293b" stroke="#334155"/>
|
|
61
|
-
<text x="644" y="316" text-anchor="middle" fill="#86efac">
|
|
61
|
+
<text x="644" y="316" text-anchor="middle" fill="#86efac">Batch</text>
|
|
62
62
|
<rect x="694" y="298" width="78" height="26" rx="13" fill="#1e293b" stroke="#334155"/>
|
|
63
|
-
<text x="733" y="316" text-anchor="middle" fill="#fda4af">
|
|
63
|
+
<text x="733" y="316" text-anchor="middle" fill="#fda4af">Remote</text>
|
|
64
64
|
<rect x="780" y="298" width="60" height="26" rx="13" fill="#0f172a" stroke="#334155" stroke-dasharray="3 3"/>
|
|
65
65
|
<text x="810" y="316" text-anchor="middle" fill="#94a3b8">…</text>
|
|
66
66
|
<rect x="848" y="298" width="120" height="26" rx="13" fill="#1e293b" stroke="#475569"/>
|
|
@@ -14,30 +14,35 @@ ruff check src/sim tests
|
|
|
14
14
|
|
|
15
15
|
## Adding a new driver
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Every driver ships as its own `sim-plugin-<name>` package — sim-cli core has no built-in drivers. Implement `DriverProtocol` in your plugin package, register it via the `sim.drivers` entry-point group in your `pyproject.toml`:
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
```toml
|
|
20
|
+
[project.entry-points."sim.drivers"]
|
|
21
|
+
<name> = "sim_plugin_<name>.driver:MyDriver"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Set `supports_session = True` for persistent-session drivers, `False` for one-shot only. The server routes all drivers through `DriverProtocol` — no `server.py` changes needed.
|
|
25
|
+
|
|
26
|
+
Read [`sim-plugin-ltspice`](https://github.com/svd-ai-lab/sim-plugin-ltspice) for shape: driver implementation + skill packaged together.
|
|
20
27
|
|
|
21
28
|
## Project layout
|
|
22
29
|
|
|
23
30
|
```
|
|
24
31
|
src/sim/
|
|
25
|
-
cli.py
|
|
26
|
-
server.py
|
|
27
|
-
session.py
|
|
28
|
-
driver.py
|
|
29
|
-
compat.py
|
|
32
|
+
cli.py Click app, all subcommands
|
|
33
|
+
server.py FastAPI server (sim serve)
|
|
34
|
+
session.py HTTP client used by connect/exec/inspect
|
|
35
|
+
driver.py DriverProtocol + result dataclasses
|
|
36
|
+
compat.py Version-compat profiles + layered skill resolution
|
|
37
|
+
plugins.py Plugin discovery, listing, info
|
|
38
|
+
_plugin_install.py Install / uninstall / index resolution
|
|
30
39
|
drivers/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
package
|
|
38
|
-
tests/ unit tests + fixtures (84 tests)
|
|
39
|
-
assets/ logo · banner · architecture (SVG)
|
|
40
|
-
docs/ translated READMEs (de · ja · zh) + architecture docs
|
|
40
|
+
__init__.py Plugin registry — discovers external plugins
|
|
41
|
+
via the `sim.drivers` entry-point group at
|
|
42
|
+
import time
|
|
43
|
+
tests/ unit tests + fixtures
|
|
44
|
+
assets/ logo · banner · architecture (SVG)
|
|
45
|
+
docs/ translated READMEs (de · ja · zh) + architecture docs
|
|
41
46
|
```
|
|
42
47
|
|
|
43
48
|
## Dev flags and utilities
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
[English](../README.md) · [Deutsch](README.de.md) · [日本語](README.ja.md) · **中文**
|
|
28
28
|
|
|
29
|
-
[为什么是 sim](#-为什么是-sim) · [快速开始](#-快速开始) · [
|
|
29
|
+
[为什么是 sim](#-为什么是-sim) · [快速开始](#-快速开始) · [命令](#-命令) · [求解器](#-求解器注册表) · [Skills](https://github.com/svd-ai-lab/sim-skills)
|
|
30
30
|
|
|
31
31
|
</div>
|
|
32
32
|
|
|
@@ -74,6 +74,10 @@ LLM 智能体早已知道怎么写仿真脚本 —— 训练数据里到处都
|
|
|
74
74
|
|
|
75
75
|
> **名字一览:** 仓库 `svd-ai-lab/sim-cli` · PyPI 分发名 `sim-cli-core` · 命令行 `sim` · 导入 `import sim`。是的,三个不同的字符串 —— 仓库名比第一次 PyPI 发布更早;其余的遵循 Python 打包惯例。
|
|
76
76
|
|
|
77
|
+
前置依赖:[`uv`](https://docs.astral.sh/uv/) —— 安装命令 `curl -LsSf https://astral.sh/uv/install.sh | sh`(macOS / Linux)或 `irm https://astral.sh/uv/install.ps1 | iex`(Windows PowerShell)。国内网络可设 `UV_DEFAULT_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple`(PowerShell 是 `$env:UV_DEFAULT_INDEX = "..."`)走清华镜像。
|
|
78
|
+
|
|
79
|
+
**macOS / Linux:**
|
|
80
|
+
|
|
77
81
|
```bash
|
|
78
82
|
# 1. 在装有求解器的机器上,先装 sim 核心 ——
|
|
79
83
|
# 此时不用选 SDK:
|
|
@@ -98,6 +102,29 @@ sim --host <server-ip> screenshot -o shot.png
|
|
|
98
102
|
sim --host <server-ip> disconnect
|
|
99
103
|
```
|
|
100
104
|
|
|
105
|
+
**Windows(PowerShell):**
|
|
106
|
+
|
|
107
|
+
```powershell
|
|
108
|
+
# 1. 在装有求解器的机器上,先装 sim 核心:
|
|
109
|
+
uv pip install sim-cli-core
|
|
110
|
+
|
|
111
|
+
# 2. 让 sim 看一眼你的机器,自动选出合适的 SDK profile:
|
|
112
|
+
sim check <solver>
|
|
113
|
+
|
|
114
|
+
# 3. 启动 profile env(或第 4 步加 --auto-install 让它自动跑):
|
|
115
|
+
sim env install <profile>
|
|
116
|
+
|
|
117
|
+
# 4. 启动 server(仅当需要跨机访问时才需要):
|
|
118
|
+
sim serve --host 0.0.0.0 # FastAPI,默认端口 7600
|
|
119
|
+
|
|
120
|
+
# 5. 从智能体 / 你的笔记本 / 网络任意位置:
|
|
121
|
+
sim --host <server-ip> connect --solver <solver> --mode solver --ui-mode gui
|
|
122
|
+
sim --host <server-ip> inspect session.versions # ← 总是先做这一步
|
|
123
|
+
sim --host <server-ip> exec "solver.settings.mesh.check()"
|
|
124
|
+
sim --host <server-ip> screenshot -o shot.png
|
|
125
|
+
sim --host <server-ip> disconnect
|
|
126
|
+
```
|
|
127
|
+
|
|
101
128
|
完整闭环:**检测 → 启动 env → 启动 → 驱动 → 观察 → 收尾** —— 工程师还可以同时盯着求解器 GUI 实时监控。
|
|
102
129
|
|
|
103
130
|
> **为什么要先 bootstrap?** 每个 `(solver, SDK, driver, skill)` 组合都是
|
|
@@ -108,13 +135,30 @@ sim --host <server-ip> disconnect
|
|
|
108
135
|
|
|
109
136
|
---
|
|
110
137
|
|
|
111
|
-
##
|
|
138
|
+
## 📦 插件索引
|
|
139
|
+
|
|
140
|
+
`sim plugin install <name>` 按顺序查两个索引:
|
|
112
141
|
|
|
113
|
-
|
|
142
|
+
1. **svd 维护的 wheel manifest**:`https://cdn.svdailab.com/manifest.json` —— 项目自己发布的预构建 wheel。匿名 GET,每次有新 wheel 就更新。
|
|
143
|
+
2. **社区维护的 catalogue**:[`sim-plugin-index`](https://github.com/svd-ai-lab/sim-plugin-index) —— 更广的插件清单,由社区维护;条目可以是 OSS 也可以是第三方插件,指向 GitHub release 或 git+https。
|
|
114
144
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
145
|
+
第一个命中的赢。多数用户感知不到这个分层 —— `sim plugin install ltspice` 直接就能装上。
|
|
146
|
+
|
|
147
|
+
svd manifest 的 schema(社区 catalogue 是另一种 shape,看它仓库里的说明):
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"updated": "<ISO date>",
|
|
152
|
+
"plugins": {
|
|
153
|
+
"<name>": {
|
|
154
|
+
"version": "<X.Y.Z>",
|
|
155
|
+
"wheel": "https://cdn.svdailab.com/wheels/<file>.whl"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
如果想跳过 resolver 直接装某个 wheel,把 URL 直接给 `sim plugin install`:`sim plugin install https://cdn.svdailab.com/wheels/<file>.whl`。
|
|
118
162
|
|
|
119
163
|
---
|
|
120
164
|
|
|
@@ -189,9 +233,11 @@ sim --host <server-ip> disconnect
|
|
|
189
233
|
|
|
190
234
|
## 🧪 求解器注册表
|
|
191
235
|
|
|
192
|
-
|
|
236
|
+
`sim-cli` 核心**完全求解器无关** —— 出厂**零内置 driver**。所有求解器都通过**插件包**接入,由 `sim.drivers` entry-point group 注册。新增一个后端 = 一份 ~200 LOC 的 `DriverProtocol` 实现,独立成 `sim-plugin-<name>` 仓库。
|
|
193
237
|
|
|
194
|
-
|
|
238
|
+
`sim` 最适合驱动 **GUI-heavy 求解器** —— COMSOL、ANSYS Mechanical、ANSYS Fluent、MATLAB Simulink、Abaqus、Flotherm —— 这些工具如果不用持久会话,agent 每迭代一次都得重新点一遍对话框。
|
|
239
|
+
|
|
240
|
+
参考插件实现见 [`sim-plugin-ltspice`](https://github.com/svd-ai-lab/sim-plugin-ltspice)。
|
|
195
241
|
|
|
196
242
|
每个求解器的协议、片段、演示工作流都住在 [`sim-skills`](https://github.com/svd-ai-lab/sim-skills),它**同样在持续扩展** —— 每加一个新后端就配一份 agent skill。
|
|
197
243
|
|
|
@@ -199,38 +245,7 @@ sim --host <server-ip> disconnect
|
|
|
199
245
|
|
|
200
246
|
## 🛠 开发
|
|
201
247
|
|
|
202
|
-
|
|
203
|
-
git clone https://github.com/svd-ai-lab/sim-cli.git
|
|
204
|
-
cd sim-cli
|
|
205
|
-
uv pip install -e ".[dev]"
|
|
206
|
-
|
|
207
|
-
pytest -q # 单元测试(无需求解器)
|
|
208
|
-
pytest -q -m integration # 集成测试(需要求解器 + sim serve)
|
|
209
|
-
ruff check src/sim tests
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
新加 driver 很简单:把 `DriverProtocol` 实现放进 tree 里,或者作为 out-of-tree 插件通过 `sim.drivers` entry-point group 注册。最小 in-tree 参考实现见 `pybamm/driver.py`;插件参考(driver + skill 一起打包)见 [`sim-plugin-cantera`](https://github.com/svd-ai-lab/sim-plugin-cantera)。
|
|
213
|
-
|
|
214
|
-
---
|
|
215
|
-
|
|
216
|
-
## 📂 项目结构
|
|
217
|
-
|
|
218
|
-
```
|
|
219
|
-
src/sim/
|
|
220
|
-
cli.py Click 应用,所有子命令
|
|
221
|
-
server.py FastAPI 服务(sim serve)
|
|
222
|
-
session.py connect/exec/inspect 用的 HTTP 客户端
|
|
223
|
-
driver.py DriverProtocol + 结果数据类
|
|
224
|
-
drivers/
|
|
225
|
-
pybamm/ 参考示例:最小一次性 driver
|
|
226
|
-
… 更多 —— 每个已注册的内置后端一个文件夹
|
|
227
|
-
__init__.py DRIVERS 注册表 —— 新内置后端在这里注册;
|
|
228
|
-
out-of-tree 插件通过 `sim.drivers` entry-points
|
|
229
|
-
在运行时被发现
|
|
230
|
-
tests/ 单元测试 + fixtures + 执行片段
|
|
231
|
-
assets/ logo · banner · architecture (SVG)
|
|
232
|
-
docs/ 翻译版 README(de · ja · zh)
|
|
233
|
-
```
|
|
248
|
+
参见 [`docs/DEVELOPMENT.md`](DEVELOPMENT.md):环境搭建、项目结构、新增 driver、开发标志、分层 skill 系统。
|
|
234
249
|
|
|
235
250
|
---
|
|
236
251
|
|
|
@@ -102,8 +102,8 @@ git = "https://github.com/svd-ai-lab/sim-plugin-gmsh"
|
|
|
102
102
|
rev = "v0.1.0"
|
|
103
103
|
|
|
104
104
|
[[sim.plugins]]
|
|
105
|
-
name = "
|
|
106
|
-
wheel = "./vendor/
|
|
105
|
+
name = "local_plugin"
|
|
106
|
+
wheel = "./vendor/sim_plugin_local-1.2.0-py3-none-any.whl" # local, air-gapped
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
`sim init` creates a starter `sim.toml`. `sim setup` reads it and ensures
|