
tscircuit CLI
https://github.com/tscircuit/cli- Category
- Developer Tools
- Rank
- No. 1513Tools index
Previous survey · No. 1525 ·
- Pricing
- Open Source
- Type
- TOOL
- Builder
- tscircuit
- GitHub
- 18 stars
- Date
About
Create electronics with React using tscircuit and a local development server with hot reload.
What it does
tscircuit CLI is an end-to-end package workbench for code-defined electronics. It initializes projects, evaluates circuits into JSON, validates design artifacts, creates snapshots, exports manufacturing and interchange formats, runs simulations, manages dependencies, and connects projects to the tscircuit registry for search, cloning, authentication, and publishing.
Why it's ranked here
A strong pick when one command surface should cover authoring, validation, debugging, packaging, and registry work. The unusually broad build diagnostics make it more than a thin task runner: it can isolate routing stages, preserve solver inputs, check several design concerns, and produce artifacts for downstream electronics tools.
What's good
The diagnostics are concrete and reproducible. Autorouter debugging can save images and routing data by phase, while solver debugging preserves event order, initiating components, constructor arguments, and otherwise awkward values such as maps or circular references. Build checks separately cover netlists, placement, routing difficulty, shorts, source validity, pin specifications, and trace length.
Tradeoffs
The surface area is large, with many ecosystem-specific dependencies and commands to learn. Package metadata requires both tscircuit and circuit JSON peers, so this is not a self-contained binary. Telemetry is enabled by default outside test mode, sends events to PostHog, and requires an environment setting to disable. The documented global install name also differs from the scoped package name shown in metadata.
How to use it well
Use it for teams treating circuit designs as TypeScript projects and wanting one terminal workflow from scaffolding through checks, exports, snapshots, simulation, and registry publishing. Keep routing and solver artifacts in failure investigations, and use strict builds in automation. It does not replace the required tscircuit runtime dependencies or a general-purpose, self-contained desktop CAD application.
Technical notes+
The CLI is assembled with Commander in cli/main.ts, while cli/entrypoint.js selects Bun when available and otherwise uses tsx, preferring a project-local installation unless forced global. scripts/bun-build.ts builds Node-targeted entry points and externalizes tscircuit, React, Zod, and several rendering dependencies. lib/index.ts exposes createHttpServer, DevServer, dependency analysis, and KiCad conversion helpers as a library surface. lib/project-config/index.ts merges JSON and TypeScript or JavaScript configuration, loads local environment files, validates serializable settings, and discovers board inputs through default glob patterns. lib/telemetry/index.ts enables PostHog capture by default, generates a random distinct identifier, attaches CLI version metadata, and suppresses network failures.
Observed
- Primary language
- TypeScript, with a JavaScript executable launcher.
- Installation surface
- The README documents global installation through npm.
- Interfaces
- Command-line interface plus exported JavaScript library entry points.
- Module format
- The package declares ECMAScript modules.
- Runtime and build
- Bun builds Node-targeted output; the launcher runs it with Bun or tsx.
- Required peers
- Package metadata lists circuit-json and tscircuit as peer dependencies.
- Test structure
- The test-plan generator scans TypeScript tests under a tests directory and separately excludes Windows tests.
Read from README.md, package.json, lib/index.ts, lib/getVersion.ts, lib/telemetry/index.ts, lib/cli-config/index.ts, lib/project-config/index.ts, docs/run-frame-usage.md, docs/file-server-api-usage.md, cli/main.ts, cli/CliContext.ts, cli/entrypoint.js, scripts/bun-build.ts, types/fake-snippets.d.ts, scripts/generate-test-plan.ts.
What it can do
Create electronic circuit designs using React components
React JSX code with electronic components → Electronic circuit design
Start local development server for circuit design
tscircuit project files → Running development server
Provide hot reload for circuit development
Modified circuit code files → Automatically updated circuit preview
Generate circuit schematics from React components
React components representing electronic parts → Circuit schematic diagrams
Export circuit designs to manufacturing formats
tscircuit project → PCB manufacturing files
Tags
Tech Stack
Media

Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.