The Ticket That Stalls Hardware Sprints
In software, adding a third-party dependency is one command: you run npm install or cargo add, and continuous integration builds and checks the code.
In many hardware teams, adding a new IC means opening a ticket with a central “CAD Librarian Team.” An engineer attaches a PDF datasheet, waits in the queue, and receives a hand-drafted symbol.
Fast-moving teams in robotics, aerospace and IoT are trying Components as Code instead: a Git-native pipeline where adding a datasheet triggers extraction, a file-load check and a pull request with generated KiCad files for an engineer to review.
Manual Queue & Visual Checks
- ×Ticket intake: the request waits in a backlog.
- ×Manual drafting: a librarian retypes pin tables row by row.
- ×Review by screenshot: peer review happens in email.
- ×Shared folders: no Git history for the library.
API Extraction & Headless Checks
- ✓Git ingest: push the PDF to the repository.
- ✓DatasheetVend API: pins read with their pages; the land pattern taken from the datasheet or calculated.
- ✓kicad-cli gate: a headless file-load check (sym/fp upgrade).
- ✓Pull request: the generated files arrive for review, with Git history.
A GitHub Actions Workflow You Can Adapt
Here is a workflow built on the public API. Drop it into .github/workflows/ and fill in the step that writes the files from the KiCad payload. Each run spends module credits, and the generated files are review-level: the pull request is where an engineer checks them.
# .github/workflows/generate-cad-library.yml
name: Hardware CAD Library Pipeline
on:
push:
paths:
- 'datasheets/**.pdf'
jobs:
build-and-check-cad:
runs-on: ubuntu-latest
steps:
- name: Checkout hardware repository
uses: actions/checkout@v4
- name: Install KiCad CLI tools
run: |
sudo add-apt-repository --yes ppa:kicad/kicad-8.0-releases
sudo apt-get update && sudo apt-get install -y kicad
- name: Extract component data with the DatasheetVend API
env:
DATASHEETVEND_API_KEY: ${{ secrets.DATASHEETVEND_API_KEY }}
run: |
# The PDF must be reachable at a public https URL.
JOB_ID=$(curl -s -X POST "https://datasheetvend.com/api/v1/extract" \
-H "Authorization: Bearer $DATASHEETVEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{"fileUrl": "https://raw.githubusercontent.com/your-org/your-repo/main/datasheets/target_ic.pdf", "modules": ["pinout", "footprint", "kicad"]}' \
| jq -r '.job_id')
# The API answers 202 with a job id. Poll until the job finishes, and stop on failure.
while true; do
STATUS=$(curl -s "https://datasheetvend.com/api/v1/jobs/$JOB_ID" \
-H "Authorization: Bearer $DATASHEETVEND_API_KEY" | jq -r '.data.job.status')
[ "$STATUS" = "COMPLETED" ] && break
[ "$STATUS" = "FAILED" ] && { echo "Extraction failed"; exit 1; }
sleep 10
done
curl -s "https://datasheetvend.com/api/v1/jobs/$JOB_ID/kicad" \
-H "Authorization: Bearer $DATASHEETVEND_API_KEY" \
-o kicad_payload.json
# Write the .kicad_sym file and the .pretty footprint folder from kicad_payload.json
# (the fields are described in the API reference), into ./libraries/.
- name: kicad-cli file-load check
run: |
kicad-cli sym upgrade ./libraries/part.kicad_sym --output ./checked/part.kicad_sym --force
kicad-cli fp upgrade ./libraries/part.pretty --output ./checked/part.pretty --force
# A file that fails to load stops the job. This is a format check, not a DRC.
- name: Open a pull request for review
uses: peter-evans/create-pull-request@v6
with:
commit-message: "feat(cad): add generated component library files for review"
title: "Generated component library update (needs review)"
branch: "cad/auto-component-update"The kicad-cli step only proves the files load in KiCad; it is not a design rule check. For what each run checks before it hands files over, see How an extraction is checked, and for a part that needs it, the STM32H743 package example.
Turn your component library into code.
A new account gets five free passes. Each pass runs up to two modules, pinout and footprint included, on a PDF up to 25 MB.