![david][@tracespace/cli-david-badge]
Render PCBs as SVGs from the comfort of your own terminal
The tracespace CLI provides a wrapper for gerber-to-svg and pcb-stackup so you can generate beautiful, precise SVG renders of printed circuit boards quickly and easily.
Part of the tracespace collection of PCB visualization tools.
npm install -g @tracespace/cli
# or
yarn global add @tracespace/cli
tracespace [options] <files...>
You can also use npx
to run without installing globally
npx @tracespace/cli [options] <files...>
All options can be specified using a config file (.tracespacerc
, .tracespacerc.json
, tracespace.config.js
, etc.) or a "tracespace"
key in package.json
. Config will be loaded from the current working directory. See cosmiconfig for additional acceptable config file names and formats.
- Type: boolean
- Description: prints version and usage then exits
# Print usage
tracespace --help
- Type: boolean
- Description: prints version then exits
# Print version
tracespace --version
- Type:
string
- Default:
.
- Description: Output directory (or
-
for stdout)
# Write SVGs into directory `./renders`
tracespace --out=renders
- Type:
boolean
- Default:
false
- Description: Skip rendering PCB top and bottom
# Output only the individual layer renders
tracespace -B
- Type:
boolean
- Default:
false
- Description: Skip rendering individual Gerber and drill layers
# Output only the top and bottom PCB renders
tracespace -L
- Type:
boolean
- Default:
false
- Description: Attempt to render files even if they're unrecognized
# Attempt render even if whats-that-gerber cannot identify
tracespace -B --force some-file.xyz
- Type:
object
- Default:
{}
- Description: Options for all gerber files (passed to gerber-to-svg)
# Set the color attribute of all Gerber SVGs
tracespace -B -g.attributes.color=blue
- Type:
object
- Default:
{}
- Description: Options for all drill files (passed to gerber-to-svg)
# Set the color attribute of all drill SVGs
tracespace -B -d.attributes.color=red
- Type:
object
- Default:
{}
- Description: Options for PCB renders (passed to pcb-stackup)
# Set the soldermask color of the board renders
tracespace -b.color.sm="rgba(128,00,00,0.75)"
- Type:
object
- Default:
{}
- Description: Override the layers options of a given file
If you're using this option a lot, you may want to consider using a config file
# Set layer type of `arduino-uno.drd` to `drill` and parse as a drill file
tracespace -l.arduino-uno.drd.type=drill -l.arduino-uno.drd.options.filetype=drill
- Type:
boolean
- Default:
false
- Description: Suppress informational output (info logs to stderr)
# Do not print info to stderr
tracespace --quiet