šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

circuit-json-to-gerber

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

circuit-json-to-gerber

Convert a [Circuit JSON](https://github.com/tscircuit/circuit-json) to Gerber/Excellon files.

0.0.22
latest
npm
Version published
Weekly downloads
4K
-34.18%
Maintainers
1
Weekly downloads
Ā 
Created
Source

circuit-json-to-gerber

Convert a Circuit JSON to Gerber/Excellon files.

Installation

# Global installation for CLI usage
npm install -g circuit-json-to-gerber

CLI Usage

Convert a circuit JSON file to Gerber/Excellon files:

# Basic usage - outputs to input.gerbers.zip
circuit-to-gerber input.circuit.json

# Specify custom output file
circuit-to-gerber input.circuit.json -o output.zip

The output ZIP file will contain:

  • Gerber files (*.gbr) for each layer
  • Plated drill file (plated.drl)
  • Unplated drill file (unplated.drl)

Library Usage

import {
  convertSoupToGerberCommands,
  stringifyGerberCommandLayers,
} from "circuit-json-to-gerber"
import {
  convertSoupToExcellonDrillCommands,
  stringifyExcellonDrill,
} from "circuit-json-to-gerber"

// Convert Circuit JSON to Gerber commands
const gerberCommands = convertSoupToGerberCommands(circuitJson)

// Convert to Gerber file content
const gerberOutput = stringifyGerberCommandLayers(gerberCommands)

// Generate drill files
const platedDrillCommands = convertSoupToExcellonDrillCommands({
  circuitJson,
  is_plated: true,
})
const unplatedDrillCommands = convertSoupToExcellonDrillCommands({
  circuitJson,
  is_plated: false,
})

const platedDrillOutput = stringifyExcellonDrill(platedDrillCommands)
const unplatedDrillOutput = stringifyExcellonDrill(unplatedDrillCommands)

References

FAQs

Package last updated on 18 May 2025

Did you know?

Socket

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.

Install

Related posts