Export Sch Bom
export_sch_bomExport a Bill of Materials from a KiCad schematic, with options for custom fields, grouping, sorting, filtering, and Do-Not-Populate handling.
Instructions
Generate a Bill of Materials from a schematic via kicad-cli (sch export bom), exposing the full option set (presets, field/label lists, grouping, sorting, filtering, DNP/excluded-from-BOM handling, and field/string/ref delimiters). schematicPath is REQUIRED.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No | Ordered comma list of fields to export (supports special substitutions) | |
| filter | No | Filter string to remove output lines | |
| labels | No | Ordered comma list of labels to apply to the exported fields | |
| preset | No | Named BOM preset from the schematic, e.g. 'Grouped By Value' | |
| groupBy | No | Fields to group references by when field values match | |
| sortAsc | No | Sort ascending ('true') or descending ('false') | |
| keepTabs | No | Keep tab characters from input fields | |
| sortField | No | Field name to sort by (default Reference) | |
| excludeDnp | No | Exclude symbols marked Do-Not-Populate | |
| outputPath | Yes | Output BOM file path | |
| formatPreset | No | Named BOM format preset from the schematic, e.g. 'CSV' | |
| refDelimiter | No | Character between individual references (default ',') | |
| schematicPath | Yes | Path to the .kicad_sch (required) | |
| fieldDelimiter | No | Separator between output fields/columns (default ',') | |
| keepLineBreaks | No | Keep line break characters from input fields | |
| stringDelimiter | No | Character to surround fields with (default '"') | |
| refRangeDelimiter | No | Character for reference ranges; blank disables ranges (default '-') | |
| includeExcludedFromBom | No | Include symbols marked 'Exclude from BOM' |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |