| .github/workflows | ||
| .opencode/agents | ||
| docker | ||
| docs | ||
| nxspice | ||
| tests | ||
| tools | ||
| .agents.local.md | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .project_rules.md | ||
| gotchas.md | ||
| NEXT_SESSION_PROMPT.md | ||
| PLAN.md | ||
| pyproject.toml | ||
| README.md | ||
| REVIEW_FEEDBACK.md | ||
| SESSION_STATE.md | ||
nxspice
AI-native SPICE simulation & power-electronics design platform. ngspice + Xyce + Octave as deterministic ground truth; LangGraph agents as orchestrators. Personal + OSS. CLI-first / API-first / MCP+A2A.
See PLAN.md for the roadmap, SESSION_STATE.md for status.
Quickstart (M0)
python3 -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
docker build -f docker/engines.Dockerfile -t nxspice/engines:0.1 docker/ # ngspice + octave
pytest
Structure
nxspice/core/netlist SPICE IR, values, deterministic generators
nxspice/core/models canonical model library (IR, flavors, validation, seed parts)
nxspice/core/engines ngspice / Xyce(stub) adapters, docker runner (resource-limited)
nxspice/core/extract raw-file parser, FFT / bode measures
nxspice/core/storage artifact store
nxspice/math closed-form buck design + averaged small-signal toolbox
nxspice/agents knowledge packs, budgets, audit, routing, design loop
nxspice/reporting results content model + LaTeX/HTML renderers (M5)
nxspice/api REST/SSE + SDK + MCP server + A2A stub (M6)
nxspice/cli typer CLI: report / serve / mcp / jobs (M6)
tests/ unit + docker golden suite
Interfaces (M6)
nxspice report # design loop -> PDF-source/HTML/MD reports
nxspice serve --port 8787 # REST/SSE API + web console at http://127.0.0.1:8787/
nxspice mcp # MCP stdio server (design / run / report / job / book_*)
nxspice jobs submit --wait # SDK-backed job control against a server
REST: POST /v1/jobs (spec + kind), GET /v1/jobs/{id},
GET /v1/jobs/{id}/events (SSE, audit-grounded progress),
GET /v1/jobs/{id}/artifacts/{name}. Python SDK:
from nxspice.api.sdk import NxspiceClient — client.report(spec, out_dir)
is the two-line path. The report content-model JSON is the stable job
artifact: re-render without re-simulating.
Gate runner: tools/gate.sh (ruff, mypy --strict on the package, pytest;
docker-marked jobs run when the engines image is present). CI:
.github/workflows/ci.yml.