Skip to content

Support tsci export --format bom-csv for Bill of Materials export #1950

@buildingvibes

Description

@buildingvibes

Description

Add support for exporting Bill of Materials (BOM) in CSV format via the command line.

This feature was originally requested in the archived v0.0.x-cli repository (issue #183) and should be implemented in the new CLI.

Proposed Usage

tsci export path/to/example.tsx --format bom-csv

Or with output path:

tsci export path/to/example.tsx --format bom-csv --output path/to/bom.csv

Implementation Notes

  • The circuit-json-to-bom-csv package already exists and provides the necessary conversion functions
  • This should follow the same pattern as other export formats (schematic-svg, pcb-svg, etc.)
  • Add "bom-csv" to the ALLOWED_EXPORT_FORMATS array
  • Add ".bom.csv" to the OUTPUT_EXTENSIONS mapping
  • Use convertCircuitJsonToBomRows and convertBomRowsToCsv from the package

Benefits

This would allow users to generate a bill of materials from their circuit files via CLI, which is useful for:

  • Automated build processes
  • Cost estimation
  • Component procurement
  • Integration with other tools

Related

This is equivalent to the "File > Export -> Bill of Materials CSV" functionality in the GUI.

Original issue from archived repo: tscircuit/v0.0.x-cli#183

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions