KiCost can handle variants and creates an XLSX spreadsheet based upon whatever variant(s) you activate. While mainly intended for estimating part costs, the initial portion of the spreadsheet is usable as a BOM for assembly.
This is the relevant documentation:
There are cases where a schematic needs to be priced differently depending upon the context. For example, the price of the end-user circuit board might be needed, but then the price for the board plus additional parts for test also has to be calculated.
KiCost supports this using a variant field for parts in the schematic in conjunction with the
--variant command-line option. Suppose a circuit has a connector, J1, that’s only inserted for certain units. If a field called
variant is added to J1 and given the value V1, then KiCost will ignore it during a normal cost calculation. But J1 will be included in the cost calculation spreadsheet if you run KiCost like so:
kicost -i schematic.xml --variant V1
In more complicated situations, you may have several circuit variants, some of which are used in combination. The
--variant option will accept a regular expression as its argument so, for example, you could get the cost of a board that includes circuitry for both variants V1 and V2 with:
kicost -i schematic.xml --variant "(V1|V2)"
A part can be a member of more than one variant by loading its variant field with a list such as “V1, V2”. (The allowed delimiters for the list are comma (,), semicolon (, slash (/), and space ( ).) The part will be included in the cost calculation spreadsheet if any of its variants matches the