Skip to content

sermuns/schemgo

Repository files navigation

schemgo

Let the gophers put your schematic to paper!

release-badge goreportcard-badge license-badge

Note

This tool is under active development and is not currently in a usable state. Stay tuned!

❓ What is this?

A command line utility that generates circuit schematic diagrams from code. Think Schemdraw or circuitikz, but simpler and faster!

Why choose this over Schemdraw/circuitikz?

🌱 Quickstart

go install github.com/sermuns/schemgo

Many other installation methods are supported!

💡 A simple example

Create a file simple.schemgo containing:

battery.right
line.up
resistor.left
line.down

Run:

schemgo build simple.schemgo -o simple.svg

The circuit diagram is created as simple.svg:

simple circuit

Note

Only svg output is supported at the moment.

📚 Documentation

See schemgo.samake.se






🗺️ Roadmap

✔️ Done

  • Push and pop
  • Subcommands
    • build exports svg file
    • serve serves a development website for live-preview
  • Comments with #
  • mdBook preprocessor

🔴 High priority

  • Labels
    • typst math
  • multiple terminal: named anchors on components?

🟡 Normal priority

  • 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)?
  • @set statement 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