Skip to main content

kproj

KiCad project publisher for the SPCoast Hugo site.

kproj takes a point-in-time snapshot of a KiCad project (renders, schematic SVG/PDF, interactive HTML BOM, fabrication artifacts, KiCad source archive) and publishes it as a version entry on the SPCoast site.

Installation

pip install kproj

Requires Python ≥3.10. kproj needs a local kicad-cli install (KiCad 9.x or 10.x) to render/export artifacts, and the iBOM plugin installed into KiCad for the interactive BOM step.

Usage

kproj [<project-or-dir-or-file>] [options]

Run from inside a KiCad project directory, or pass a path to a .kicad_pro / .kicad_sch / .kicad_pcb file, a project directory, or a basename resolved under the KiCad projects root. Defaults to . (the current directory).

Pipeline: render → ibom → fab → publish. Each release generates board renders, schematic SVG/PDF, the interactive HTML BOM, packages fabrication artifacts, and commits (+ pushes) a version page and its assets into the configured site repo.

CLI flags

Run kproj --help for the authoritative, up-to-date flag list. As of this writing:

  • --site-repo PATH — override the local site-repo checkout (highest precedence).
  • --inventory PATH — inventory CSV to enrich the BOM with curated datasheet names. Unset means kproj never invokes jbom and publishes without datasheet deep-links.
  • --datasheet-library PATH — local datasheet-library clone used by the advisory publish guard.
  • --datasheet-repo OWNER/REPO — public repo slug that published datasheet deep-links point at.
  • --dry-run — read-only mode: surface findings without writing to the site repo.
  • --no-push — skip git push after the site-repo commit (batch-friendly).
  • -v / --verbose, -d / --debug — increase logging verbosity.

Configuration

Every setting (except the project argument) follows a four-tier precedence, highest first:

  1. CLI flag
  2. KPROJ_* environment variable
  3. ~/.kproj.yaml
  4. Hardcoded default

kproj --help documents the full precedence chain, every KPROJ_* environment variable, and a complete ~/.kproj.yaml example inline.

First-time setup

If ~/.kproj.yaml is absent and no inventory is configured, kproj emits a one-time informational hint pointing here — it still publishes successfully, just without datasheet deep-links.

Create ~/.kproj.yaml to configure kproj for your machine:

site_repo: /path/to/your/SPCoast.github.io
no_push: false
kicad_cli: /usr/local/bin/kicad-cli
inventory: /path/to/your/SPCoast-inventory/SPCoast-INVENTORY.csv
datasheet_library: /path/to/your/SPCoast-inventory
datasheet_repo: plocher/SPCoast-inventory

Every key is optional; omit what you don't need to override. site_repo and no_push control where and how kproj publishes; kicad_cli pins a specific executable instead of relying on auto-discovery; inventory / datasheet_library / datasheet_repo configure the datasheet deep-link feature below.

Datasheet deep-links

When inventory is configured, kproj queries jbom bom --inventory <path> -f "reference,datasheet,datasheet_name" -o - live at publish time and deep-links each curated Datasheet Name into the shared datasheet-library repo (view + download URLs) — no PDFs are copied into the site. Without an inventory, kproj never invokes jbom and publishes without datasheet links (an intentional, advisory-free degraded state, not an error).

Exit codes

  • 0 — clean: published (or refreshed/noop/private-skip) with no error/warning findings.
  • 1 — findings present: the same outcomes above, but with at least one error or warning finding (audit, DRC/ERC, etc.), surfaced on stderr and in the version page's Markdown body.
  • 2 — mechanical failure: kicad-cli not found, project resolution failed, or another pipeline step raised.

Composition with other tools

kproj is one tool in a small ecosystem. The release-lifecycle workflow composes via Makefile (see templates/Makefile.kicad):

  • jbom fab — generates fabrication artifacts (bom.csv, pos.csv, gerbers.zip) into ./production/. Invoked separately by the user before kproj.
  • kproj — reads ./production/ + KiCad project files, publishes a snapshot to the SPCoast site.
  • git tag + gh release create (manual or Makefile-driven) — the release-lifecycle layer, external to kproj.

Development

  • Python ≥3.10; uv for environment + dependency management (uv sync, uv run).
  • pytest + behave for testing; ruff + mypy for lint/type-checking; pre-commit hooks configured.
  • docs/DESIGN.md has the implementation specs; docs/adr/ has the Architecture Decision Records; CONTEXT.md has the canonical project vocabulary.
  • docs/history.md has the retired v1-development phase tracker, for archival reference.

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kproj-0.3.1.tar.gz (390.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kproj-0.3.1-py3-none-any.whl (120.6 kB view details)

Uploaded Python 3

File details

Details for the file kproj-0.3.1.tar.gz.

File metadata

  • Download URL: kproj-0.3.1.tar.gz
  • Upload date:
  • Size: 390.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for kproj-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2123498ecf640c6572b561fa4697235256edb22d5d53929eacaabbe010f2b97a
MD5 5de52476635b986cb467258894fe278e
BLAKE2b-256 7a74a00fcad6b26518fd98513fd1e3615d2536f196232f23e503d9723ae3c166

See more details on using hashes here.

File details

Details for the file kproj-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: kproj-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 120.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for kproj-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3100ae7d7f8aca2e22259a308b8d11b1d248ad70aad577ec37d4c964656a7c30
MD5 da1021f9752d8098acddc55850619737
BLAKE2b-256 57ff94bad741fa9830981e96ed485b9302a242ed80b352d40f0373ee9c153a32

See more details on using hashes here.

Release history Release notifications | RSS feed

0.13.4

2 files

0.13.3

2 files

0.13.2

2 files

0.13.1

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.5

2 files

0.10.4

2 files

0.10.3

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

This release

0.3.1 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page