Getting Started with tscircuit
Quickstarts, installation, and core concepts for new users
Overview
tscircuit is a TypeScript-first PCB design platform that lets you design circuit boards using React-like syntax. This skill covers the fundamentals you need to start designing boards.
Quick Navigation
| Sub-Skill | Description |
|---|---|
| What is tscircuit? | Core concepts and philosophy |
| Installation | Setting up tscircuit |
| Web Quickstart | Design in browser |
| CLI Quickstart | Command-line workflow |
| ChatGPT Quickstart | AI-assisted design |
What is tscircuit?
tscircuit allows you to design printed circuit boards (PCBs) using TypeScript and React. Key features:
- •Declarative PCB Design: Describe your board like HTML
- •Type-Safe: Full TypeScript support with autocomplete
- •Auto-Routing: Automatic trace routing
- •Component Library: Pre-built components and footprints
- •Cloud Integration: Publish and share designs
Key Concepts
- •Board: The root element containing all components
- •Components: Resistors, capacitors, chips, etc.
- •Footprints: Physical pad layouts for components
- •Traces: Copper connections between components
- •Nets: Logical connections (VCC, GND, etc.)
Installation
Prerequisites
- •Node.js 18+ or Bun
- •TypeScript knowledge
- •A text editor (VS Code recommended)
Quick Install
bash
# Using bun (recommended) bun install tscircuit # Using npm npm install tscircuit # Initialize a new project tsci init
Project Structure
code
my-circuit/ ├── index.tsx # Main circuit file ├── package.json ├── tsconfig.json └── tscircuit.config.json
Your First Board
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>
)
Related Skills
| Skill | Description |
|---|---|
| Components | Component reference |
| CLI | Command-line tools |
| Tutorials | Step-by-step projects |
Next Steps
- •Follow the web quickstart for browser-based design
- •Try the CLI workflow for local development
- •Explore components to learn available elements