On This Page (11)
kcr kicad
Discover installed KiCad versions, inspect running processes, manage preferences, and launch or stop KiCad applications.
| Command | Aliases | Category | Runtime | Config | Guide |
|---|---|---|---|---|---|
kcr kicad | — | KiCad Environment & Utilities | Python kcr | None (CLI flags only) | — |
Usage
kcr kicad [-h] <kicad-action> ...Subcommands
| Subcommand | Description |
|---|---|
kcr kicad installs | Discover installed KiCad releases and executables on this workstation. |
kcr kicad launch | Launch a KiCad application executable with optional project path and passthrough arguments. |
kcr kicad prefs | Inspect KiCad config, documents, plugin roots, and IPC API settings. |
kcr kicad running | List currently running KiCad-family processes with PID, version, and executable path. |
kcr kicad stop | Preview (dry-run by default) or terminate matching running KiCad processes. |
kcr kicad installs
Discover installed KiCad releases and executables on this workstation.
kcr kicad installs [-h] [--version VERSION] [--json]Options
| Flag | Description |
|---|---|
--version VERSION | Filter installs to a specific KiCad major.minor version (e.g., 10.0) |
--json | Emit machine-readable JSON (kicad_cruncher.kicad.installs.a0) |
kcr kicad launch
Launch a KiCad application executable with optional project path and passthrough arguments.
kcr kicad launch [-h] [--version VERSION]
[--app {kicad,pcbnew,eeschema,kicad-cli}]
[--exe EXE] [--project PROJECT] [--new]
[--dry-run] [--json]
...Positional Arguments
| Argument | Description |
|---|---|
args | Additional arguments forwarded to the KiCad executable (prefix with --) |
Options
| Flag | Description |
|---|---|
--version VERSION | Select a specific installed KiCad version |
--app APP | KiCad application executable to launch (default: kicad). Choices: kicad, pcbnew, eeschema, kicad-cli. |
--exe EXE | Explicit executable path (overrides --version/--app discovery) |
--project PROJECT | Path to a .kicad_pro project or design file to open |
--new | Pass KiCad --new so the project manager does not reload the previous project (valid with --app kicad only) |
--dry-run | Print the resolved command line without launching the process |
--json | Emit machine-readable JSON (kicad_cruncher.kicad.launch.a0) |
kcr kicad prefs
Inspect KiCad config, documents, plugin roots, and IPC API settings.
kcr kicad prefs [-h] [--version VERSION]
[--open {config,documents,plugins}] [--json]Options
| Flag | Description |
|---|---|
--version VERSION | Filter preference roots to a specific KiCad version |
--open OPEN_TARGET | Open the selected KiCad directory in the system file manager. Choices: config, documents, plugins. |
--json | Emit machine-readable JSON (kicad_cruncher.kicad.prefs.a0) |
kcr kicad running
List currently running KiCad-family processes with PID, version, and executable path.
kcr kicad running [-h] [--version VERSION]
[--app {kicad,pcbnew,eeschema,kicad-cli}]
[--json]Options
| Flag | Description |
|---|---|
--version VERSION | Filter processes by KiCad version |
--app APP | Filter processes to one KiCad executable. Choices: kicad, pcbnew, eeschema, kicad-cli. |
--json | Emit machine-readable JSON (kicad_cruncher.kicad.running.a0) |
kcr kicad stop
Preview (dry-run by default) or terminate matching running KiCad processes.
kcr kicad stop [-h] [--version VERSION]
[--app {kicad,pcbnew,eeschema,kicad-cli}]
[--all] [--json]Options
| Flag | Description |
|---|---|
--version VERSION | Filter processes by KiCad version |
--app APP | Filter processes to one KiCad executable. Choices: kicad, pcbnew, eeschema, kicad-cli. |
--all | Terminate all matching KiCad processes instead of printing a dry run |
--json | Emit machine-readable JSON (kicad_cruncher.kicad.stop.a0) |
How It Works
kcr kicad is a workstation helper for inspecting local KiCad installations, finding or stopping running KiCad processes, launching KiCad apps, and discovering kicad_common.json preferences and resolved 3D model search paths (KICAD10_3DMODEL_DIR, custom env_vars, and extra_3d_search_dirs).
Running kcr kicad with no subcommand prints help to stderr and exits with code 2.
Every subcommand supports --json to emit a stable, versioned JSON envelope to stdout:
| Subcommand | Purpose | JSON Schema (--json) |
|---|---|---|
kcr kicad installs | List locally discovered KiCad versions, install roots, and executables | kicad_cruncher.kicad.installs.a0 |
kcr kicad running | List running kicad, pcbnew, eeschema, and kicad-cli processes | kicad_cruncher.kicad.running.a0 |
kcr kicad launch | Launch a KiCad desktop app or kicad-cli (supports --dry-run) | kicad_cruncher.kicad.launch.a0 |
kcr kicad stop | Preview (default) or terminate (--all) running KiCad processes | kicad_cruncher.kicad.stop.a0 |
kcr kicad prefs | Inspect KiCad preference dirs, API status, lib tables, and 3D model paths | kicad_cruncher.kicad.prefs.a0 |
Subcommand Rules & Conflict Guards
launch --newrequires--app kicad:- Passing
--newwith--app pcbnew,--app eeschema, or--app kicad-clifails immediately with exit code1because only the top-levelkicadlauncher accepts--new.
- Passing
- Multi-install ambiguity in
launch:- When multiple KiCad versions are installed on the machine (e.g.
9.0and10.0),kcr kicad launchrefuses to guess which binary to start — pass--version <VER>(e.g.--version 10.0) or an explicit--exe <PATH>. - Extra arguments intended for the launched KiCad executable can be forwarded after
--.
- When multiple KiCad versions are installed on the machine (e.g.
stopis dry-run by default:- Running
kcr kicad stopprints matching PIDs (Would stop: ...) and never kills any process until you explicitly pass--all(optionally scoped by--versionand/or--app). This is especially handy before running in-placekcr pcb embed-modelswhen KiCad holds.lcklock files.
- Running
prefs --openrequires disambiguation on multi-install machines:- Passing
--open <target>(config,documents,plugins) when more than one KiCad profile version is discovered fails with exit code1until you select one profile with--version <VER>.
- Passing
- 3D model path diagnostics:
kcr kicad prefssurfaces the exactmodel_dir_vars,kicad_common.jsonenv_vars, andextra_3d_search_dirsused bykcr pcb embed-models,kcr pcb-svg,kcr toon, andkcr health.
Quick Examples
# List locally discovered KiCad installations and executables
kcr kicad installs# Inspect resolved KiCad 3D model path variables from kicad_common.json and environment
kcr kicad prefs# Preview which running KiCad processes would be stopped (dry-run by default)
kcr kicad stop