dsh-ecad: DSH Hardware Design Plugin

Introduction

DSH (DeepSeek Harness) is a plugin-based framework for agent developers, integrating toolchains within a single session. In hardware design workflows, transitioning from schematic to PCB to manufacturing files requires switching between multiple tools, and manually maintaining netlists and project state is error-prone. As the hardware-side plugin for DSH, dsh-ecad works in coordination with the firmware plugin dsh-stm32, exchanging facts via dsh/mcu.json within the project to reduce redundant effort.

Plugin Positioning

dsh-ecad is a DSH plugin maintained by JingYu-er, categorized under workflow. It handles components and footprints, schematic and PCB design, manufacturing files, BOM and cost estimation, and EMC/thermal/impedance checks. Its tool names do not overlap, allowing it to be installed alongside dsh-stm32.

Core Capabilities

  • Schematic: Parses KiCad 10 .kicad_sch files (supporting instance transforms, multi-page layouts, and nets), and outputs SVG with netlist reconciliation. The hand-drawn layer supports adding wires, labeling, cloning, moving, and placing new components; changes are saved as the drawing itself without modifying the generated directory.
  • PCB: Auto-places components from the circuit.json netlist (MCU centered, connectors along edges, small parts attached to large ones), uses KiCadRoutingTools for automatic routing, and supports local edits through the KiCad IPC interface.
  • Manufacturing: Exports Gerber, drill files, STEP/GLB, DXF board outline with registration holes; writes JLCPCB design rules into .kicad_dru.
  • Validation: ERC/DRC/manufacturability checks, netlist-to-PCB gate checks (including hand-drawn layer diffs), EMC (trace width, return path coverage, crosstalk, differential pair spacing), stackup and impedance, power consumption and power tree, 3D model coverage.
  • Cost: BOM grouping (primary part number + alternates), on-demand LCSC unit price and stock lookup, total component cost calculation.
  • Components: Search by part number/parameters/LCSC part number; import footprints by part number (KiCad library preferred, falling back to conversion from LCSC pages when missing); 3D models referenced by the footprint are included in the project.

Installation & Activation

dsh plugin --profile desktop add dsh-ecad

After installation, fully quit DSH and restart (the plugin layer only loads at process startup). Use dsh plugin --profile desktop why dsh-ecad to check the version (currently 0.1.2).

Typical Usage

  1. stm32_ecad_init: Creates a hardware/circuit workspace in the project (directory and package.json).
  2. Author hardware/circuit/index.circuit.tsx (tscircuit source file, the single writer).
  3. stm32_ecad_build: Runs tsci build --kicad-project --svgs using KiCad’s bundled bun, generating circuit.json, SVGs, and the KiCad project (.kicad_pcb, .kicad_sch).
  4. stm32_ecad_design: One-click execution of preflight → build → pad merge → library export → ERC → DRC → DFM → STEP → manufacturing files (optional routing).

Applicable Scenarios & Notes

Suitable for scenarios with an existing KiCad 10 project or for generating a KiCad project from a tscircuit source. The plugin runs with the current dsh process permissions; it is recommended to review the source code and license before installing. External dependencies include KiCad 10 (kicad-cli, pcbnew, official libraries), Node.js + shared runtime (tscircuit), KiCadRoutingTools, and poppler (pdftotext). Missing dependencies will be flagged at the corresponding step.

Conclusion

dsh-ecad integrates tscircuit schematic design with KiCad PCB placement/routing/DRC/DFM, BOM and cost, stackup impedance, EMC, mechanical, and manufacturing files within a DSH session, forming an automated pipeline from design to delivery.

  • Directory page: https://www.skillhub.cn/plugins/JingYu-er/dsh-ecad
  • GitHub: https://github.com/JingYu-er/dsh-ecad
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye