Usage
For a quick start just go to the project’s dir and run:
kibot --quick-start
This will generate a configuration and generate outputs. If you want to just generate the configuration, and not the outputs, use:
kibot --quick-start --dry
If you need a more exhaustive configuration file try:
kibot --example
This will generate a file named example.kibot.yaml containing all
the available options and comments about them. You can use it to create
your own configuration file.
If you want to use the layers of a particular PCB in the example use:
kibot -b PCB_FILE --example
And if you want to use the same options selected in the plot dialog use:
kibot -b PCB_FILE -p --example
If the current directory contains only one PCB file and only one
configuration file (named *.kibot.yaml) you can just call kibot. No
arguments needed. The tool will figure out which files to use.
If more than one file is found in the current directory kibot will
use the first found and issue a warning. If you need to use other file
just tell it explicitly:
kibot -b PCB_FILE.kicad_pcb -c CONFIG.kibot.yaml
A simple target can be added to your makefile, so you can just run
make pcb_files or integrate into your current build process.
pcb_files:
kibot -b $(PCB) -c $(KIBOT_CFG)
If you need to suppress messages use --quiet or -q and if you
need to get more information about what’s going on use --verbose or
-v.
If you want to generate only some of the outputs use:
kibot OUTPUT_1 OUTPUT_2
If you want to generate all outputs with some exceptions use:
kibot --invert-sel OUTPUT_1 OUTPUT_2
Note that you can use the run_by_default option of the output you
want to exclude from the default runs.
If you want to skip the DRC and ERC use:
kibot --skip-pre run_erc,run_drc
If you want to skip all the preflight tasks use:
kibot --skip-pre all
All outputs are generated using the current directory as base. If you want to use another directory as base use:
kibot --out-dir OTHER_PLACE
If you want to list the available outputs defined in the configuration file use:
kibot --list
Command line help
KiBot: KiCad automation tool for documents generation
Usage:
kibot [-b BOARD] [-e SCHEMA] [-c CONFIG] [-d OUT_DIR] [-s PRE]
[-q | -v...] [-L LOGFILE] [-C | -i | -n] [-m MKFILE] [-A] [-g DEF] ...
[-E DEF] ... [--defs-from-env] [-w LIST] [-D | -W] [--warn-ci-cd]
[--banner N] [TARGET...]
kibot [-v...] [-b BOARD] [-e SCHEMA] [-c PLOT_CONFIG] [--banner N]
[-E DEF] ... [--defs-from-env] [--config-outs]
[--only-pre|--only-groups] [--only-names] [--output-name-first] --list
kibot [-v...] [-c PLOT_CONFIG] [--banner N] [-E DEF] ... [--only-names]
[--sub-pcbs] --list-variants
kibot [-v...] [-b BOARD] [-d OUT_DIR] [-p | -P] [--banner N] --example
kibot [-v...] [--start PATH] [-d OUT_DIR] [--dry] [--banner N]
[-t, --type TYPE]... --quick-start
kibot [-v...] [--rst] [-d OUT_DIR] --help-filters
kibot [-v...] [--markdown|--json|--rst] --help-dependencies
kibot [-v...] [--rst] --help-global-options
kibot [-v...] --help-list-offsets
kibot [-v...] [--rst] --help-list-outputs
kibot [-v...] --help-list-rotations
kibot [-v...] --help-output=HELP_OUTPUT
kibot [-v...] [--rst] [-d OUT_DIR] --help-outputs
kibot [-v...] [--rst] [-d OUT_DIR] --help-preflights
kibot [-v...] [--rst] [-d OUT_DIR] --help-variants
kibot [-v...] --help-banners
kibot [-v...] [--rst] --help-errors
kibot -h | --help
kibot --version
Arguments:
TARGET Outputs to generate, default is all
Options:
-A, --no-auto-download Disable dependencies auto-download
-b BOARD, --board-file BOARD The PCB .kicad-pcb board file
--banner N Display banner number N (-1 == random)
-c CONFIG, --plot-config CONFIG The plotting config file to use
-C, --cli-order Generate outputs using the indicated order
--config-outs Configure all outputs before listing them
-d OUT_DIR, --out-dir OUT_DIR The output directory [default: .]
-D, --dont-stop Try to continue if an output fails
--defs-from-env Use the environment vars as preprocessor
values
-e SCHEMA, --schematic SCHEMA The schematic file (.sch/.kicad_sch)
-E DEF, --define DEF Define preprocessor value (VAR=VAL)
-g DEF, --global-redef DEF Overwrite a global value (VAR=VAL)
-i, --invert-sel Generate the outputs not listed as targets
-l, --list List available outputs, preflights and
groups (in the config file).
You don't need to specify an SCH/PCB unless
using --config-outs
--list-variants List the available variants and exit
-L, --log LOGFILE Log to LOGFILE using maximum debug level.
Is independent of what is logged to stderr
-m MKFILE, --makefile MKFILE Generate a Makefile (no targets created)
-n, --no-priority Don't sort targets by priority
-p, --copy-options Copy plot options from the PCB file
--only-names Print only the names. Note that for --list
if no other --only-* option is provided it
also acts as a virtual --only-outputs
--only-groups Print only the groups.
--only-pre Print only the preflights
--output-name-first Use the output name first when listing
-P, --copy-and-expand As -p but expand the list of layers
-q, --quiet Remove information logs
-s PRE, --skip-pre PRE Skip preflights, comma separated or `all`
--sub-pcbs When listing variants also include sub-PCBs
-v, --verbose Show debugging information
-V, --version Show program's version number and exit
-w, --no-warn LIST Exclude the mentioned warnings (comma sep)
-W, --stop-on-warnings Stop on warnings
--warn-ci-cd Don't disable warnings expected on CI/CD
environments
-x, --example Create a template configuration file
Quick start options:
--quick-start Generates demo config files and their outputs
--dry Just generate the config files
--start PATH Starting point for the search [default: .]
-t, --type TYPE Generate examples only for the indicated type/s
Help options:
-h, --help Show this help message and exit
--help-banners Show all available banners
--help-dependencies List dependencies in human readable format
--help-errors List of error levels
--help-filters List supported filters and details
--help-global-options List supported global variables
--help-list-offsets List footprint offsets (JLCPCB)
--help-list-outputs List supported outputs
--help-list-rotations List footprint rotations (JLCPCB)
--help-output HELP_OUTPUT Help for this particular output
--help-outputs List supported outputs and details
--help-preflights List supported preflights and details
--help-variants List supported variants and details
Supported error levels
0: NONE
1: INTERNAL_ERROR
2: WRONG_ARGUMENTS
3: UNSUPPORTED_OPTION
4: MISSING_TOOL
5: DRC_ERROR
6: EXIT_BAD_ARGS
7: EXIT_BAD_CONFIG
8: NO_PCB_FILE
9: NO_SCH_FILE
10: ERC_ERROR
11: BOM_ERROR
12: PDF_SCH_PRINT
13: PDF_PCB_PRINT
14: PLOT_ERROR
15: NO_YAML_MODULE
16: NO_PCBNEW_MODULE
17: CORRUPTED_PCB
18: KICAD2STEP_ERR
19: WONT_OVERWRITE
20: PCBDRAW_ERR
21: SVG_SCH_PRINT
22: CORRUPTED_SCH
23: WRONG_INSTALL
24: RENDER_3D_ERR
25: FAILED_EXECUTE
26: KICOST_ERROR
27: MISSING_WKS
28: MISSING_FILES
29: DIFF_TOO_BIG
30: NETLIST_DIFF
31: PS_SCH_PRINT
32: DXF_SCH_PRINT
33: HPGL_SCH_PRINT
34: CORRUPTED_PRO
35: BLENDER_ERROR
36: WARN_AS_ERROR
37: CHECK_FIELD