feat: Add tsci convert command for KiCad .kicad_mod files #328
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #323
/claim #323
This pull request introduces a new CLI command to convert KiCad
.kicad_mod
footprint files into the tscircuit TSX format. It adds the implementation, integrates the command into the CLI, includes new dependencies for the conversion process, and provides comprehensive tests to validate the new functionality.New CLI Feature: KiCad to tscircuit Conversion
convert
command implementation incli/convert/register.ts
, which reads a.kicad_mod
file, converts it to tscircuit TSX using the relevant libraries, and writes the output file. The command handles errors for missing files and incorrect extensions, and supports a custom output path.convert
command in the CLI by updatingcli/main.ts
to import and invokeregisterConvert
. [1] [2]Dependency Management
circuit-json-to-tscircuit
,kicad-component-converter
,kicad-converter
) topackage.json
to support the conversion process.Testing
tests/cli/convert/convert.test.ts
that verifies the conversion command works correctly, including success cases, custom output paths, and error handling for invalid files.