Metadata-Version: 2.4
Name: circuitgen
Version: 1.0.1
Summary: A Python library and CLI for generating circuit schematics from text descriptions or netlists.
Author: Ishaan
License-Expression: MIT
Project-URL: Homepage, https://github.com/git-ishaan-kumar/circuitgen
Keywords: ai,automation,circuit-diagrams,circuit-generator,cli,electronics,netlist,schematics,svg,autorouting,tui,python-library
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: textual>=8.2.8
Requires-Dist: rich>=13.0.0
Requires-Dist: keyring>=24.0.0
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: resvg-py<0.6,>=0.5.0
Requires-Dist: Pillow>=11.3
Dynamic: description
Dynamic: license-file

<p align="center">
  <picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/git-ishaan-kumar/circuitgen/main/assets/banner-dark.png">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/git-ishaan-kumar/circuitgen/main/assets/banner-light.png">
  <img src="https://raw.githubusercontent.com/git-ishaan-kumar/circuitgen/main/assets/banner-light.png" alt="CircuitGen" width="460">
</picture>
  <br>
  Generate circuit schematics from text descriptions or netlists.
</p>

<p align="center">
  <a href="https://github.com/git-ishaan-kumar/circuitgen"><img alt="GitHub" src="https://img.shields.io/badge/GitHub-24292f?style=for-the-badge&logo=github&logoColor=white"></a>
  <a href="https://git-ishaan-kumar.github.io/circuitgen/"><img alt="Documentation" src="https://img.shields.io/badge/Documentation-181717?style=for-the-badge&logo=readthedocs&logoColor=white"></a>
  <a href="https://pypi.org/project/circuitgen/"><img alt="PyPI" src="https://img.shields.io/badge/PyPI-3775a9?style=for-the-badge&logo=pypi&logoColor=white"></a>
</p>



## Overview

CircuitGen is a Python library and CLI for generating circuit schematics from text descriptions or netlists.

<p align="center">
  <picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/git-ishaan-kumar/circuitgen/main/assets/example-dark.svg">
  <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/git-ishaan-kumar/circuitgen/main/assets/example-light.svg">
  <img src="https://raw.githubusercontent.com/git-ishaan-kumar/circuitgen/main/assets/example-light.svg" alt="Battery, resistor, and LED schematic generated with CircuitGen" width="440">
</picture>
</p>



## Features

- **Natural Language Generation**
  > Generate schematics from written circuit descriptions using your preferred AI provider.
- **Automatic Layout and Routing**
  > Place components and route wires automatically from a netlist.
- **Interactive CLI**
  > Generate, render, and validate circuits directly from your terminal.
- **Offline Rendering**
  > Render existing netlists without an API key or internet connection.
- **Flexible Export**
  > Save schematics as SVG, PNG, or PDF with customizable appearance.



## Quickstart

### Python library

```sh
pip install circuitgen
```

### CLI

```sh
pip install circuitgen
circuit
```

<p><sub>If the CLI fails to start or behaves unexpectedly, run <code>python -m circuitgen doctor</code> to check your setup.</sub></p>



## Python example

```python
from circuitgen import generate

generate(
    "A 9 V battery connected in series with a 360 Ω resistor and a red LED.",
    provider="YOUR_PROVIDER",  # Replace with your provider.
    model="YOUR_MODEL_ID",     # Replace with a model available to your key.
    api_key="YOUR_API_KEY",    # Replace with your provider's API key.
    output="circuit.svg"
)
```

<p><sub>Requires a configured API key.</sub></p>
<p><sub>AI output can be wrong or invalid. Choose a model suited to your task and review generated circuits.</sub></p>



## Command-line interface

<p align="center">
  <img src="https://raw.githubusercontent.com/git-ishaan-kumar/circuitgen/main/assets/cli-preview.png" alt="CircuitGen interactive command-line interface" width="680" style="border-radius:8px">
</p>



## Documentation

Explore the documentation for installation guides, usage examples, and technical references.

<a href="https://git-ishaan-kumar.github.io/circuitgen/docs/getting-started"><img alt="Get Started" src="https://img.shields.io/badge/Get_Started-181717?style=for-the-badge"></a>
<a href="https://git-ishaan-kumar.github.io/circuitgen/api"><img alt="API Reference" src="https://img.shields.io/badge/API_Reference-181717?style=for-the-badge"></a>
<a href="https://git-ishaan-kumar.github.io/circuitgen/help"><img alt="Help" src="https://img.shields.io/badge/Help-181717?style=for-the-badge"></a>



## License

Released under the [MIT License](LICENSE).
