BoM (Bill of Materials)

Used to generate the BoM in CSV, HTML, TSV, TXT, XML or XLSX format using the internal BoM. This output can generate XYRS files (pick and place files).
Is compatible with KiBoM, but doesn’t need to update the XML netlist because the components are loaded from the schematic.
Important differences with KiBoM output:

  • All options are in the main options section, not in conf subsection.

  • The Component column is named Row and works just like any other column.

This output is what you get from the ‘Tools/Generate Bill of Materials’ menu in eeschema.

Type: bom

Category: Schematic/BoM

Parameters:

  • comment : [string=’’] A comment for documentation purposes. It helps to identify the output.

  • dir : [string=’./’] Output directory for the generated files. If it starts with + the rest is concatenated to the default dir.

  • name : [string=’’] Used to identify this particular output definition. Avoid using _ as first character. These names are reserved for KiBot.

  • options : [dict] Options for the bom output.

    • Valid keys:

      • columns : [list(dict)|list(string)] List of columns to display. Can be just the name of the field. In addition to all user defined fields you have various special columns, consult Columns available for the BoM.

        • Valid keys:

          • field : [string=’’] Name of the field to use for this column. Use _field_lcsc_part to get the value defined in the global options.

          • name : [string=’’] Name to display in the header. The field is used when empty.

          • comment : [string=’’] Used as explanation for this column. The XLSX output uses it.

          • join : [list(dict)|list(string)|string=’’] List of fields to join to this column.

            • Valid keys:

              • field : [string=’’] Name of the field.

              • text : [string=’’] Text to use instead of a field. This option is incompatible with the field option. Any space to separate it should be added in the text. Use \n for newline and \t for tab.

              • text_after : [string=’’] Text to add after the field content. Will be added only if the field isn’t empty. Any space to separate it should be added in the text. Use \n for newline and \t for tab.

              • text_before : [string=’’] Text to add before the field content. Will be added only if the field isn’t empty. Any space to separate it should be added in the text. Use \n for newline and \t for tab.

          • level : [number=0] Used to group columns. The XLSX output uses it to collapse columns.

      • csv : [dict] Options for the CSV, TXT and TSV formats.

        • Valid keys:

          • quote_all : [boolean=false] Enclose all values using double quotes.

          • separator : [string=’,’] CSV Separator. TXT and TSV always use tab as delimiter. Only one character can be specified.

          • hide_header : [boolean=false] Hide the header line (names of the columns).

          • hide_pcb_info : [boolean=false] Hide project information.

          • hide_stats_info : [boolean=false] Hide statistics information.

      • format : [string=’’] [HTML,CSV,TXT,TSV,XML,XLSX,HRTXT] format for the BoM. Defaults to CSV or a guess according to the options. HRTXT stands for Human Readable TeXT.

      • group_fields : [list(string)] List of fields used for sorting individual components into groups. Components which match (comparing all fields) will be grouped together. Field names are case-insensitive. For empty fields the behavior is defined by the group_fields_fallbacks, merge_blank_fields and merge_both_blank options. Note that for resistors, capacitors and inductors the _Value_ field is parsed and qualifiers, like tolerance, are discarded. Please use a separated field and disable merge_blank_fields if this information is important. You can also disable parse_value. If empty: [‘Part’, ‘Part Lib’, ‘Value’, ‘Footprint’, ‘Footprint Lib’, ‘Voltage’, ‘Tolerance’, ‘Current’, ‘Power’] is used.

      • hrtxt : [dict] Options for the HRTXT formats.

        • Valid keys:

          • separator : [string=’I’] Column Separator.

          • header_sep : [string=’-’] Separator between the header and the data.

          • hide_header : [boolean=false] Hide the header line (names of the columns).

          • hide_pcb_info : [boolean=false] Hide project information.

          • hide_stats_info : [boolean=false] Hide statistics information.

          • justify : [string=’left’] [left,right,center] Text justification.

      • html : [dict] Options for the HTML format.

        • Valid keys:

          • datasheet_as_link : [string=’’] Column with links to the datasheet.

          • generate_dnf : [boolean=true] Generate a separated section for DNF (Do Not Fit) components.

          • logo : [string|boolean=’’] PNG/SVG file to use as logo, use false to remove. Note that when using an SVG this is first converted to a PNG using logo_width.

          • title : [string=’KiBot Bill of Materials’] BoM title.

          • col_colors : [boolean=true] Use colors to show the field type.

          • digikey_link : [string|list(string)=’’] Column/s containing Digi-Key part numbers, will be linked to web page.

          • extra_info : [string|list(string)=’’] Information to put after the title and before the pcb and stats info.

          • hide_pcb_info : [boolean=false] Hide project information.

          • hide_stats_info : [boolean=false] Hide statistics information.

          • highlight_empty : [boolean=true] Use a color for empty cells. Applies only when col_colors is true.

          • lcsc_link : [boolean|string|list(string)=’’] Column/s containing LCSC part numbers, will be linked to web page. Use true to copy the value indicated by the field_lcsc_part global option.

          • logo_width : [number=370] Used when the logo is an SVG image. This width is used to render the SVG image.

          • mouser_link : [string|list(string)=’’] Column/s containing Mouser part numbers, will be linked to web page.

          • row_colors : [list(dict)] Used to highlight rows using filters. Rows that match a filter can be colored. Note that these rows won’t have colored columns.

            • Valid keys:

              • color : [string=’#FF8080’] Color used for this category.

              • description : [string=’’] A description for this color, must be filled.

              • filter : [string|list(string)=’_none’] Name of the filter to match. Be careful because this filter should be coherent with the grouping fields. KiBot will assume that all the components grouped in the same group will return the same value when applying this filter.

          • style : [string=’modern-blue’] Page style. Internal styles: modern-blue, modern-green, modern-red and classic. Or you can provide a CSS file name. Please use .css as file extension..

      • ignore_dnf : [boolean=true] Exclude DNF (Do Not Fit) components.

      • normalize_values : [boolean=false] Try to normalize the R, L and C values, producing uniform units and prefixes.

      • number : [number=1] Number of boards to build (components multiplier).

      • output : [string=’%f-%i%I%v.%x’] filename for the output (%i=bom). Affected by global options.

      • sort_style : [string=’type_value’] [type_value,type_value_ref,ref] Sorting criteria.

      • units : [string=’millimeters’] [millimeters,inches,mils] Units used for the positions (‘Footprint X’ and ‘Footprint Y’ columns). Affected by global options.

      • xlsx : [dict] Options for the XLSX format.

        • Valid keys:

          • datasheet_as_link : [string=’’] Column with links to the datasheet.

          • generate_dnf : [boolean=true] Generate a separated section for DNF (Do Not Fit) components.

          • kicost : [boolean=false] Enable KiCost worksheet creation. Note: an example of how to use it on CI/CD can be found here.

          • logo : [string|boolean=’’] PNG/SVG file to use as logo, use false to remove. Note that when using an SVG this is first converted to a PNG using logo_width.

          • specs : [boolean=false] Enable Specs worksheet creation. Contains specifications for the components. Works with only some KiCost APIs.

          • title : [string=’KiBot Bill of Materials’] BoM title.

          • col_colors : [boolean=true] Use colors to show the field type.

          • digikey_link : [string|list(string)=’’] Column/s containing Digi-Key part numbers, will be linked to web page.

          • extra_info : [string|list(string)=’’] Information to put after the title and before the pcb and stats info.

          • hide_pcb_info : [boolean=false] Hide project information.

          • hide_stats_info : [boolean=false] Hide statistics information.

          • highlight_empty : [boolean=true] Use a color for empty cells. Applies only when col_colors is true.

          • kicost_api_disable : [string|list(string)=’’] List of KiCost APIs to disable.

          • kicost_api_enable : [string|list(string)=’’] List of KiCost APIs to enable.

          • kicost_config : [string=’’] KiCost configuration file. It contains the keys for the different distributors APIs. The regular KiCost config is used when empty. Important for CI/CD environments: avoid exposing your API secrets! To understand how to achieve this, and also how to make use of the cache please visit the kicost_ci_test repo.

          • kicost_dist_desc : [boolean=false] Used to add a column with the distributor’s description. So you can check this is the right component.

          • lcsc_link : [boolean|string|list(string)=’’] Column/s containing LCSC part numbers, will be linked to web page. Use true to copy the value indicated by the field_lcsc_part global option.

          • logo_scale : [number=2] Scaling factor for the logo. Note that this value isn’t honored by all spreadsheet software.

          • logo_width : [number=370] Used when the logo is an SVG image. This width is used to render the SVG image.

          • max_col_width : [number=60] [20,999] Maximum column width (characters).

          • mouser_link : [string|list(string)=’’] Column/s containing Mouser part numbers, will be linked to web page.

          • row_colors : [list(dict)] Used to highlight rows using filters. Rows that match a filter can be colored. Note that these rows won’t have colored columns.

            • Valid keys:

              • color : [string=’#FF8080’] Color used for this category.

              • description : [string=’’] A description for this color, must be filled.

              • filter : [string|list(string)=’_none’] Name of the filter to match. Be careful because this filter should be coherent with the grouping fields. KiBot will assume that all the components grouped in the same group will return the same value when applying this filter.

          • specs_columns : [list(dict)|list(string)] Which columns are included in the Specs worksheet. Use References for the references, ‘Row’ for the order and ‘Sep’ to separate groups at the same level. By default all are included. Column names are distributor specific, the following aren’t: ‘_desc’, ‘_value’, ‘_tolerance’, ‘_footprint’, ‘_power’, ‘_current’, ‘_voltage’, ‘_frequency’, ‘_temp_coeff’, ‘_manf’, ‘_size’.

            • Valid keys:

              • field : [string=’’] Name of the field to use for this column. Use _field_lcsc_part to get the value defined in the global options.

              • name : [string=’’] Name to display in the header. The field is used when empty.

              • comment : [string=’’] Used as explanation for this column. The XLSX output uses it.

              • join : [list(dict)|list(string)|string=’’] List of fields to join to this column.

                • Valid keys:

                  • field : [string=’’] Name of the field.

                  • text : [string=’’] Text to use instead of a field. This option is incompatible with the field option. Any space to separate it should be added in the text. Use \n for newline and \t for tab.

                  • text_after : [string=’’] Text to add after the field content. Will be added only if the field isn’t empty. Any space to separate it should be added in the text. Use \n for newline and \t for tab.

                  • text_before : [string=’’] Text to add before the field content. Will be added only if the field isn’t empty. Any space to separate it should be added in the text. Use \n for newline and \t for tab.

              • level : [number=0] Used to group columns. The XLSX output uses it to collapse columns.

          • style : [string=’modern-blue’] Head style: modern-blue, modern-green, modern-red and classic.

      • aggregate : [list(dict)] Add components from other projects. You can use CSV files, the first row must contain the names of the fields. The Reference and Value are mandatory, in most cases Part is also needed. The Part column should contain the name/type of the component. This is important for passive components (R, L, C, etc.). If this information isn’t available consider configuring the grouping to exclude the Part..

        • Valid keys:

          • delimiter : [string=’,’] Delimiter used for CSV files.

          • file : [string=’’] Name of the schematic to aggregate.

          • name : [string=’’] Name to identify this source. If empty we use the name of the schematic.

          • number : [number=1] Number of boards to build (components multiplier). Use negative to subtract.

          • ref_id : [string=’’] A prefix to add to all the references from this project.

      • angle_positive : [boolean=true] Always use positive values for the footprint rotation.

      • bottom_negative_x : [boolean=false] Use negative X coordinates for footprints on bottom layer (for XYRS).

      • component_aliases : [list(list(string))] A series of values which are considered to be equivalent for the part name. Each entry is a list of equivalen names. Example: [‘c’, ‘c_small’, ‘cap’ ] will ensure the equivalent capacitor symbols can be grouped together. If empty the following aliases are used:

        • [‘r’, ‘r_small’, ‘res’, ‘resistor’]

        • [‘l’, ‘l_small’, ‘inductor’]

        • [‘c’, ‘c_small’, ‘cap’, ‘capacitor’]

        • [‘sw’, ‘switch’]

        • [‘zener’, ‘zenersmall’]

        • [‘d’, ‘diode’, ‘d_small’].

      • cost_extra_columns : [list(dict)|list(string)] List of columns to add to the global section of the cost. Can be just the name of the field.

        • Valid keys:

          • field : [string=’’] Name of the field to use for this column. Use _field_lcsc_part to get the value defined in the global options.

          • name : [string=’’] Name to display in the header. The field is used when empty.

          • comment : [string=’’] Used as explanation for this column. The XLSX output uses it.

          • join : [list(dict)|list(string)|string=’’] List of fields to join to this column.

            • Valid keys:

              • field : [string=’’] Name of the field.

              • text : [string=’’] Text to use instead of a field. This option is incompatible with the field option. Any space to separate it should be added in the text. Use \n for newline and \t for tab.

              • text_after : [string=’’] Text to add after the field content. Will be added only if the field isn’t empty. Any space to separate it should be added in the text. Use \n for newline and \t for tab.

              • text_before : [string=’’] Text to add before the field content. Will be added only if the field isn’t empty. Any space to separate it should be added in the text. Use \n for newline and \t for tab.

          • level : [number=0] Used to group columns. The XLSX output uses it to collapse columns.

      • count_smd_tht : [boolean=false] Show the stats about how many of the components are SMD/THT. You must provide the PCB.

      • distributors : [string|list(string)] Include this distributors list. Default is all the available.

      • dnc_filter : [string|list(string)=’_kibom_dnc’] Name of the filter to mark components as ‘Do Not Change’. The default filter marks components with a DNC value or DNC in the Config field. This option is for simple cases, consider using a full variant for complex cases.

      • dnf_filter : [string|list(string)=’_kibom_dnf’] Name of the filter to mark components as ‘Do Not Fit’. The default filter marks components with a DNF value or DNF in the Config field. This option is for simple cases, consider using a full variant for complex cases.

      • exclude_filter : [string|list(string)=’_mechanical’] Name of the filter to exclude components from BoM processing. The default filter (built-in filter ‘_mechanical’) excludes test points, fiducial marks, mounting holes, etc. Please consult the built-in filters explanation to fully understand what is excluded by default. This option is for simple cases, consider using a full variant for complex cases.

      • exclude_marked_in_pcb : [boolean=false] Exclude components marked with Exclude from BOM in the PCB. This is a KiCad 6 option.

      • exclude_marked_in_sch : [boolean=true] Exclude components marked with Exclude from bill of materials in the schematic. This is a KiCad 6 option.

      • expand_text_vars : [boolean=true] Expand KiCad 6 text variables after applying all filters and variants. This is done using a _expand_text_vars filter. If you need to customize the filter, or apply it before, you can disable this option and add a custom filter to the filter chain.

      • fit_field : [string=’Config’] Field name used for internal filters (not for variants).

      • footprint_populate_values : [string|list(string)=’no,yes’] Values for the Footprint Populate column.

      • footprint_type_values : [string|list(string)=’SMD,THT,VIRTUAL’] Values for the Footprint Type column.

      • group_connectors : [boolean=true] Connectors with the same footprints will be grouped together, independent of the name of the connector.

      • group_fields_fallbacks : [list(string)] List of fields to be used when the fields in group_fields are empty. The first field in this list is the fallback for the first in group_fields, and so on.

      • int_qtys : [boolean=true] Component quantities are always expressed as integers. Using the ceil() function.

      • merge_blank_fields : [boolean=true] Component groups with blank fields will be merged into the most compatible group, where possible.

      • merge_both_blank : [boolean=true] When creating groups two components with empty/missing field will be interpreted as with the same value.

      • no_conflict : [list(string)] List of fields where we tolerate conflicts. Use it to avoid undesired warnings. By default the field indicated in fit_field, the field used for variants and the field part are excluded.

      • no_distributors : [string|list(string)] Exclude this distributors list. They are removed after computing distributors.

      • normalize_locale : [boolean=false] When normalizing values use the locale decimal point.

      • parse_value : [boolean=true] Parse the Value field so things like 1k and 1000 are interpreted as equal. Note that this implies that 1k 1% is the same as 1k 5%. If you really need to group using the extra information split it in separated fields, add the fields to group_fields and disable merge_blank_fields.

      • pre_transform : [string|list(string)=’_none’] Name of the filter to transform fields before applying other filters. This option is for simple cases, consider using a full variant for complex cases.

      • ref_id : [string=’’] A prefix to add to all the references from this project. Used for multiple projects.

      • ref_separator : [string=’ ‘] Separator used for the list of references.

      • source_by_id : [boolean=false] Generate the Source BoM column using the reference ID instead of the project name.

      • use_alt : [boolean=false] Print grouped references in the alternate compressed style eg: R1-R7,R18.

      • use_aux_axis_as_origin : [boolean=true] Use the auxiliary axis as origin for coordinates (KiCad default) (for XYRS).

      • variant : [string=’’] Board variant, used to determine which components are output to the BoM..

  • type : ‘bom’

  • category : [string|list(string)=’’] The category for this output. If not specified an internally defined category is used. Categories looks like file system paths, i.e. PCB/fabrication/gerber. The categories are currently used for navigate_results.

  • disable_run_by_default : [string|boolean] Use it to disable the run_by_default status of other output. Useful when this output extends another and you don’t want to generate the original. Use the boolean true value to disable the output you are extending.

  • extends : [string=’’] Copy the options section from the indicated output. Used to inherit options from another output of the same type.

  • groups : [string|list(string)=’’] One or more groups to add this output. In order to catch typos we recommend to add outputs only to existing groups. You can create an empty group if needed.

  • output_id : [string=’’] Text to use for the %I expansion content. To differentiate variations of this output.

  • priority : [number=50] [0,100] Priority for this output. High priority outputs are created first. Internally we use 10 for low priority, 90 for high priority and 50 for most outputs.

  • run_by_default : [boolean=true] When enabled this output will be created when no specific outputs are requested.