Skip to main content
Command Line Interface

tsci export

Overview

tsci export can be used to convert a tsx file or circuit.json file into various output formats including schematics, PCB layouts, fabrication files, and more.

Export options in the web interface
Export options available in the web interface after running tsci dev

Usage

tsci export <file> [options]

Arguments

  • <file>: Path to the source file (.tsx or .circuit.json)

Options

  • -f, --format <format>: Output format (defaults to "json")
  • -o, --output <path>: Custom output file path

Supported Formats

The following export formats are supported:

FormatDescription
circuit-jsonCircuit JSON format
schematic-svgSchematic view as SVG
pcb-svgPCB layout as SVG
readable-netlistHuman-readable netlist
specctra-dsnSpecctra DSN format for autorouting
gltfText-based 3D scene (glTF 2.0) that references board meshes and textures
glbBinary glTF bundle that packs geometry, materials, and textures into a single file

Examples

Export to circuit JSON:

tsci export circuit.tsx

Export as schematic SVG:

tsci export circuit.tsx -f schematic-svg

Export PCB layout with custom output path:

tsci export circuit.tsx -f pcb-svg -o my-pcb-layout.svg

Export to Specctra DSN format:

tsci export circuit.tsx -f specctra-dsn

Exporting 3D models

Use the gltf or glb formats when you want a 3D representation of your board for use in CAD tools, AR viewers, or when embedding on the web.

Export as glTF

tsci export circuit.tsx --format gltf

This produces a .gltf file (plus any referenced texture files) that follows the glTF 2.0 spec. Because the assets stay separate, glTF exports are easier to diff in git and you can selectively optimize textures.

Export as GLB

tsci export circuit.tsx --format glb

The glb format wraps the same data into a single binary so you can upload one file to a web viewer (for example, https://gltf.report/ or model-viewer). This is handy for sharing previews or attaching a lightweight CAD model to a manufacturing request.

Both commands work with .tsx source files as well as .circuit.json files, so you can export whichever representation you already have. Each command writes the 3D model next to the input file unless you override the location with --output <path>.

Output Files

By default, the exported file will be saved in the same directory as the input file, with a filename based on the input filename and the chosen format. For example:

  • Input: my-circuit.tsx
  • Format: pcb-svg
  • Default output: my-circuit-pcb.svg

You can override the output location using the -o or --output option.