Note
This tool is under active development and is not currently in a usable state. Stay tuned!
A command line utility that generates circuit schematic diagrams from code. Think Schemdraw or circuitikz, but simpler and faster!
- Is a self-contained binary.
- Is blazingly fast.
- Is easily included in
mdbookas a preprocessor
go install github.com/sermuns/schemgoMany other installation methods are supported!
Create a file simple.schemgo containing:
battery.right
line.up
resistor.left
line.downRun:
schemgo build simple.schemgo -o simple.svgThe circuit diagram is created as simple.svg:
Note
Only svg output is supported at the moment.
- Push and pop
- Subcommands
-
buildexports svg file -
serveserves a development website for live-preview
-
- Comments with
# - mdBook preprocessor
- Labels
-
typstmath
-
- multiple terminal: named anchors on components?
- Components (I won't attempt before situation with polymorphsim is under control.)
- Optional style string on tags
- (Better way of defining appearances... maybe external files?)
- More components
- Battery
- Resistor
- Inductors
- Capacitor
- Node (dot)
- Voltage source
- Current source
- Diodes
- Transistors
- Amperemeter
- Voltmeter
- Switch
- GND (and 5V)?
-
@setstatement to change global defaults (stroke width, padding, color) - set standard (IEC, IEEE) on elemnt, using
set - Element attributes
- ID for symbolic reference
- Exporting to pdf, png, jpg, webp
- Syntax highlighting, LSP
- Logic gates
