Skip to content

Conversation

MAVRICK-1
Copy link

image

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

  • Added the convert command implementation in cli/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.
  • Registered the new convert command in the CLI by updating cli/main.ts to import and invoke registerConvert. [1] [2]

Dependency Management

  • Added the required dependencies (circuit-json-to-tscircuit, kicad-component-converter, kicad-converter) to package.json to support the conversion process.

Testing

  • Introduced a new test suite in 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.

- Implement convert command to transform KiCad footprint files to tscircuit TSX format
- Add comprehensive error handling for file validation and conversion errors
- Support custom output path with -o/--output option
- Use kicad-component-converter and circuit-json-to-tscircuit packages
- Include comprehensive test suite for all functionality
- Add command registration and help text
- Update dependencies: kicad-component-converter@0.1.14, circuit-json-to-tscircuit@0.0.9

Resolves issue tscircuit#323 for KiCad mod file conversion support.
Implements conversion from KiCad footprint files to tscircuit components using kicad-component-converter and circuit-json-to-tscircuit packages.

Features:
- Convert .kicad_mod files to .tsx tscircuit components
- Custom output path support with -o flag
- Proper error handling and validation
- Component naming based on file name

Fixes tscircuit#323
@MAVRICK-1 MAVRICK-1 force-pushed the implement-kicad-convert-command branch from b11a34a to 98372a2 Compare September 11, 2025 04:45
- Fixed corrupted chokidar version from merge conflict
- Added missing comma after kicad-converter
- Removed trailing comma after easyeda
- Updated bun.lock with latest dependencies
Copy link
Contributor

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce tsci convert for kicad_mod files
1 participant