Skip to main content

Getting started

Overview

To explore circuitscript, please download the circuitscript cli tool. This tool can be used to read circuiscript files and output SVG schematics.

Installation

The circuitscript cli tool can be downloaded from npm with the following command:

npm -g install circuitscript

Generating schematics

Save the following code into a file titled example.cst:

import lib

v3v3 = supply("3V3") # create 3V3 supply
gnd = dgnd() # create gnd

at v3v3
wire down 100 right 100
add res(100)
wire right 100 down 100
add led("green")
wire down 100
to gnd

Run the circuitscript tool with the following command:

circuitscript example.cst output.svg

The following SVG image output.svg will be generated:

3V312R110012D1greenGND

Next steps

You have just written your first circuitscript code, here's what you can do next: