tscircuit Documentation Reference
tscircuit is a TypeScript-first PCB design platform using React-like syntax. This skill provides complete documentation reference.
Quick Navigation
| Reference | When to Use |
|---|---|
| getting-started.md | Installation, first board, project setup |
| cli-commands.md | tsci CLI: init, dev, build, export, search, add, push |
| components.md | 48+ component types: chip, resistor, trace, etc. |
| footprints.md | Footprint specs, KiCad integration, custom footprints |
| apis.md | Compile, autorouting, datasheet, ordering APIs |
| guides.md | Essentials, importing, running, SPICE, KiCad |
| tutorials.md | USB flashlight, LED matrix, keyboard, Pi HAT |
| advanced.md | AI context, local dev, math utils, units |
| contributing.md | Contributor guide, bounties, project overview |
Quick Start
tsx
import React from "react"
import { board, resistor, capacitor, trace } from "tscircuit"
export default () => (
<board width="10mm" height="10mm">
<resistor resistance="1k" footprint="0402" name="R1" />
<capacitor capacitance="100nF" footprint="0402" name="C1" />
<trace from=".R1 > .pin1" to=".C1 > .pin1" />
</board>
)
CLI Quick Reference
bash
tsci init # Initialize project tsci dev # Dev server with preview tsci build # Build circuit JSON tsci export -f pcb-svg # Export to SVG tsci search resistor # Search footprints tsci add author/pkg # Install package
Key Concepts
- •Board: Root element containing all components
- •Components: Resistors, capacitors, chips, etc. with footprints
- •Footprints: Physical pad layouts (0402, 0805, soic8, qfn32)
- •Traces: Copper connections between component pins
- •Nets: Logical connections (net.VCC, net.GND)
Common Patterns
Chip with Connections
tsx
<chip
name="U1"
footprint="soic8"
pinLabels={{ pin1: "VCC", pin2: "GND", pin3: "IN", pin4: "OUT" }}
connections={{ VCC: "net.VCC", GND: "net.GND" }}
/>
Layout Positioning
tsx
<resistor
name="R1"
resistance="1k"
footprint="0402"
pcbX={3} pcbY={2} // PCB position
schX={5} schY={3} // Schematic position
/>
Resources
- •Full AI Context: Download ai.txt
- •Live Chat: chat.tscircuit.com
- •Registry: tscircuit.com/trending