Skip to main content

Updated 3 min read3 views

Automating Hardware CAD in CI/CD: How Fast-Moving Hardware Teams Eliminate the Librarian Bottleneck

Git-native hardware teams don't have to wait on a librarian ticket. How to automate PDF extraction, a kicad-cli file-load check and a review pull request with the DatasheetVend API.

Felix S. Pavel

Founder & Lead Architect

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.

Ticket-Queue Library Model

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.
Result: transcription risk, slow iteration and blocked layouts.
Git-Native Pipeline

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.
Result: reproducible, reviewable CAD libraries with a smaller manual backlog.

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.

Sources

  1. DatasheetVend API reference: POST /api/v1/extract, job status and module routes
  2. DatasheetVend KiCad module
  3. DatasheetVend, How an extraction is checked

Was this useful?

A like tells other engineers it is worth their time.

Keep reading

All articles

Cookies. Strictly necessary cookies keep you signed in and remember this choice. Optional analytics (Google, Microsoft, PostHog) show us how the site is used. Cookie details