CircuitHub

Quickstart

Get up and running in five minutes.

Install the CLI

curl -fsSL https://circuithub.com/install.sh | bash

Expected output:

Installed circuithub to ~/.local/bin/circuithub
Run `circuithub --help` to get started.

Log in

circuithub auth login

This opens your browser where you log in with your CircuitHub account.

Expected output:

Opening browser for CircuitHub login...
Login successful.

After logging in via circuithub auth login, export the JWT from your credentials file:

export CIRCUITHUB_API_KEY=$(cat ~/.config/circuithub/credentials.json | jq -r '.token')

The token is valid for 24 hours. API key authentication is coming soon for long-lived machine use.

Expected output:

CIRCUITHUB_API_KEY exported for this shell session.

List your workspaces

circuithub workspace list

Expected output:

SLUG              NAME
acme-electronics  Acme Electronics
curl -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  https://api.circuithub.com/v1/workspaces

Expected output:

{
  "workspaces": [
    {
      "id": 1,
      "slug": "acme-electronics",
      "name": "Acme Electronics"
    }
  ]
}

List projects

circuithub project list --workspace acme-electronics

Expected output:

ID      REV   NAME
12345   3     Power Supply Board
curl -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  "https://api.circuithub.com/v1/projects?workspace=acme-electronics"

Expected output:

{
  "projects": [
    {
      "id": 12345,
      "name": "Power Supply Board",
      "latestRevisionNumber": 3
    }
  ]
}

Get a project's BOM

circuithub project bom list 12345 --workspace acme-electronics

Expected output:

BOM: 4 lines (2 resolved, 1 unresolved, 1 errored)

Part                Footprint    Qty  Match
100nF 0402          C_0402         4  GCM155R71C104KA55D (Murata)
curl -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  https://api.circuithub.com/v1/projects/12345/bom

Expected output:

{
  "bomLines": [
    {
      "id": 1001,
      "status": "resolved"
    }
  ],
  "summary": {
    "total": 4,
    "resolved": 2,
    "unresolved": 1,
    "errored": 1
  }
}

Get a quote

Quoting is coming soon. The commands below describe the planned interface — they are not yet available.

circuithub quote request --project 12345

Expected output:

Project:   Power Supply Board (12345)
Quote ID:  50001
curl -X POST -H "Authorization: Bearer $CIRCUITHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"projectId": 12345}' \
  https://api.circuithub.com/v1/quotes

Expected output:

{
  "id": 50001,
  "projectId": 12345,
  "revisionId": 99001,
  "offers": [
    {
      "quantity": 10,
      "leadTimeDays": 10
    }
  ]
}

On this page