Metadata-Version: 2.4
Name: spice2wireviz
Version: 2026.2.13
Summary: Convert LTspice SPICE netlists to WireViz wiring diagrams
Project-URL: Homepage, https://github.com/ryanmalloy/spice2wireviz
Project-URL: Repository, https://github.com/ryanmalloy/spice2wireviz
Project-URL: Issues, https://github.com/ryanmalloy/spice2wireviz/issues
Author-email: Ryan Malloy <ryan@supported.systems>
License: MIT
Keywords: eda,electronics,harness,ltspice,netlist,spice,wireviz,wiring
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Manufacturing
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
Requires-Python: >=3.11
Requires-Dist: click>=8.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: asc
Requires-Dist: spicelib>=1.4.9; extra == 'asc'
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# spice2wireviz

Convert LTspice SPICE netlists to WireViz wiring diagrams.

## What it does

`spice2wireviz` reads SPICE netlist files (`.net`, `.cir`, `.sp`) and generates [WireViz](https://github.com/wireviz/WireViz) YAML that documents the physical wiring: connectors, test points, and inter-module cables.

Two operating modes:

- **Single module** — External interface of one subcircuit (its connectors, test points, port interface)
- **Inter-module** — How multiple subcircuits/boards connect to each other

## Install

```bash
uv tool install spice2wireviz
# or
pip install spice2wireviz
```

## Usage

```bash
# Inter-module wiring (auto-detected from top-level X instances)
spice2wireviz top_level.net -o wiring.yml --render

# Single module external interface
spice2wireviz design.net -s amplifier_board -o amp.yml

# Only connectors and test points, no ground
spice2wireviz design.net --include-prefixes J,TP --no-ground

# Inspect before converting
spice2wireviz design.net --list-subcircuits
spice2wireviz design.net --list-components
spice2wireviz design.net --dry-run
```

## Filtering

Cherry-pick what appears in the diagram:

```bash
--include-prefixes J,TP     # Only these component types
--exclude-refs X3,J_DEBUG   # Hide specific references
--include-nets "SIG_*"      # Glob patterns for net names
--no-ground                 # Hide GND connections
--no-power                  # Hide VCC/VDD connections
```

## Development

```bash
uv sync --extra dev
uv run pytest
uv run ruff check src/ tests/
```
