app
KiCad - the KiCad Bridge
Public Made by Adomby adom
Reference implementation of the KiCad bridge: multi-instance Python server, forward path via kicad-cli, reverse path via in-process plugin. Most complex of the three bundled bridges.
← Commit history
server.py+5@@ -51,6 +51,7 @@ from handlers.bridge_client import handle_bridge_status, handle_bridge_call, han from handlers.launch import handle_launch from handlers.state import handle_state from handlers.uninstall import handle_uninstall+from handlers.kicad_log import handle_log_tail from handlers.pcm import handle_pcm_install, handle_pcm_list, handle_pcm_uninstall from handlers.netlist import ( handle_extract_netlist,@@ -365,6 +366,9 @@ _VERB_CATALOG = { "hint": "Adds a library to the selected KiCad version's lib table so its parts are usable. Footprint installs take modelsPath (a directory of STEP/WRL files) or auto-detect a 3dmodels/ sibling of the source .pretty (the Adom wiki library-bundle layout): models copy into 3dmodels/<lib>.3dshapes and the COPIED footprints' matching (model ...) refs are rewritten to the installed absolute paths, so 3D previews resolve.", "related": ["kicad_install_symbol", "kicad_install_footprint", "kicad_list_versions"], "pitfalls": ["each KiCad version has its OWN lib tables — install under every version the user needs", "restart/reload KiCad to see a newly-added library", "model-ref rewriting touches only the INSTALLED copy, never the source, and only refs whose basename matches an installed model (stock ${KICAD*_3DMODEL_DIR} refs stay)"]},+ "log_tail": {"summary": "New KiCad log output since a byte offset: what KiCad said about ITSELF (read-only).", "long": False,+ "hint": "KiCad writes no log file; the bridge captures its stderr for instances IT launched (0.9.266+). Carry nextOffset to get only what is new. errorsOnly:true filters to error/warning.",+ "related": ["kicad_launch", "kicad_diagnostics", "kicad_window_info"], "pitfalls": ["a KiCad the USER started writes nothing here — its stderr belongs to whoever launched it", "relaunch after upgrading the bridge or there is no capture yet"]}, "pcm_install": {"summary": "Install a package from a KiCad PCM repository on disk, exactly as the Plugin and Content Manager would (no dialog).", "long": True, "hint": "repositoryUrl (a repository.json) + identifier; optional version. Extracts to $KICAD_3RD_PARTY/<folder>/<pkgid>/ and records installed_packages.json. KiCad registers PCM_<lib> rows itself on next load, so a running KiCad must restart (reported, never done).", "related": ["kicad_pcm_list", "kicad_pcm_uninstall", "kicad_install_library_bundle"], "pitfalls": ["a RUNNING KiCad does not see the new libraries until restarted", "download is sha256-verified against the repository; a mismatch refuses"]},@@ -823,6 +827,7 @@ COMMAND_HANDLERS = { "enable_software_opengl": handle_enable_software_opengl, "install_library": handle_install_library, "install_library_bundle": handle_install_library_bundle,+ "log_tail": handle_log_tail, "pcm_install": handle_pcm_install, "pcm_list": handle_pcm_list, "pcm_uninstall": handle_pcm_uninstall,