
Research
Malicious NuGet Packages Typosquat Nethereum to Exfiltrate Wallet Keys
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
circuit-json-to-kicad
Advanced tools
Convert [Circuit JSON](https://github.com/tscircuit/circuit-json) files to KiCad schematic (`.kicad_sch`), PCB (`.kicad_pcb`), and project (`.kicad_pro`) files.
Convert Circuit JSON files to KiCad schematic (.kicad_sch
), PCB (.kicad_pcb
), and project (.kicad_pro
) files.
Circuit JSON is an open-source file format for describing electronic circuits. This library enables you to generate KiCad-compatible files from Circuit JSON, allowing you to use KiCad's powerful PCB design tools with circuits defined in code.
npm install circuit-json-to-kicad
# or
bun add circuit-json-to-kicad
import { CircuitJsonToKicadSchConverter } from "circuit-json-to-kicad"
// Assuming you have circuit JSON from tscircuit or another source
const circuitJson = /* your circuit JSON */
const converter = new CircuitJsonToKicadSchConverter(circuitJson)
converter.runUntilFinished()
// Get the KiCad schematic file content
const kicadSchContent = converter.getOutputString()
// Write to file
Bun.write("output.kicad_sch", kicadSchContent)
import { CircuitJsonToKicadPcbConverter } from "circuit-json-to-kicad"
const circuitJson = /* your circuit JSON */
const converter = new CircuitJsonToKicadPcbConverter(circuitJson)
converter.runUntilFinished()
// Get the KiCad PCB file content
const kicadPcbContent = converter.getOutputString()
// Write to file
Bun.write("output.kicad_pcb", kicadPcbContent)
import { CircuitJsonToKicadProConverter } from "circuit-json-to-kicad"
const circuitJson = /* your circuit JSON */
const converter = new CircuitJsonToKicadProConverter(circuitJson, {
projectName: "my_project",
schematicFilename: "my_project.kicad_sch",
pcbFilename: "my_project.kicad_pcb",
})
converter.runUntilFinished()
const kicadProjectContent = converter.getOutputString()
Bun.write("my_project.kicad_pro", kicadProjectContent)
import { Circuit } from "tscircuit"
import {
CircuitJsonToKicadSchConverter,
CircuitJsonToKicadPcbConverter,
} from "circuit-json-to-kicad"
// Define your circuit
const circuit = new Circuit()
circuit.add(
<board width="10mm" height="10mm">
<resistor name="R1" resistance="1k" footprint="0402" />
<capacitor
name="C1"
capacitance="1uF"
footprint="0603"
connections={{ pin1: "R1.pin2" }}
/>
</board>,
)
await circuit.renderUntilSettled()
// Get Circuit JSON
const circuitJson = circuit.getCircuitJson()
// Convert to KiCad schematic
const schConverter = new CircuitJsonToKicadSchConverter(circuitJson)
schConverter.runUntilFinished()
Bun.write("output.kicad_sch", schConverter.getOutputString())
// Convert to KiCad PCB
const pcbConverter = new CircuitJsonToKicadPcbConverter(circuitJson)
pcbConverter.runUntilFinished()
Bun.write("output.kicad_pcb", pcbConverter.getOutputString())
Schematic Conversion: Convert Circuit JSON to KiCad schematic files (.kicad_sch
)
PCB Conversion: Convert Circuit JSON to KiCad PCB files (.kicad_pcb
)
Project Generation: Produce KiCad project files (.kicad_pro
) that reference the generated schematic and PCB outputs
This project uses Bun as its runtime and package manager.
# Install dependencies
bun install
# Download KiCad demo files (used for reference)
bun run download-demos
# Run tests
bun test
Tests generate visual PNG snapshots for comparison:
# Run a specific test
bun test tests/sch/basics/basics01.test.tsx
# Run all tests
bun test
# Update snapshots (if needed)
BUN_UPDATE_SNAPSHOTS=1 bun test
Generated debug output is saved to the debug-output/
directory.
lib/
├── index.ts # Main exports
├── types.ts # Shared types
├── schematic/
│ ├── CircuitJsonToKicadSchConverter.ts # Schematic converter
│ └── stages/ # Conversion pipeline stages
└── pcb/
├── CircuitJsonToKicadPcbConverter.ts # PCB converter
└── stages/ # Conversion pipeline stages
Circuit JSON is an open-source file format for representing electronic circuits. Learn more:
MIT License - see LICENSE for details.
Some interoperability test artifacts are generated from assets by KiCad. See KiCad licenses for more information.
Contributions are welcome! Please feel free to submit issues or pull requests.
FAQs
Convert [Circuit JSON](https://github.com/tscircuit/circuit-json) files to KiCad schematic (`.kicad_sch`), PCB (`.kicad_pcb`), and project (`.kicad_pro`) files.
We found that circuit-json-to-kicad demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.
Product
Socket is launching experimental protection for the Hugging Face ecosystem, scanning for malware and malicious payload injections inside model files to prevent silent AI supply chain attacks.