kicad-sch-api 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kicad-sch-api might be problematic. Click here for more details.
- kicad_sch_api/cli.py +345 -0
- kicad_sch_api/core/formatter.py +3 -1
- kicad_sch_api/core/parser.py +16 -5
- kicad_sch_api/core/schematic.py +35 -8
- kicad_sch_api/core/types.py +1 -1
- kicad_sch_api/discovery/__init__.py +10 -0
- kicad_sch_api/discovery/search_index.py +421 -0
- kicad_sch_api/mcp/__init__.py +7 -0
- kicad_sch_api/mcp/server.py +1509 -0
- kicad_sch_api-0.1.2.dist-info/METADATA +326 -0
- kicad_sch_api-0.1.2.dist-info/RECORD +26 -0
- {kicad_sch_api-0.1.0.dist-info → kicad_sch_api-0.1.2.dist-info}/entry_points.txt +1 -0
- kicad_sch_api-0.1.0.dist-info/METADATA +0 -207
- kicad_sch_api-0.1.0.dist-info/RECORD +0 -21
- {kicad_sch_api-0.1.0.dist-info → kicad_sch_api-0.1.2.dist-info}/WHEEL +0 -0
- {kicad_sch_api-0.1.0.dist-info → kicad_sch_api-0.1.2.dist-info}/licenses/LICENSE +0 -0
- {kicad_sch_api-0.1.0.dist-info → kicad_sch_api-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kicad-sch-api
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Professional KiCAD schematic manipulation library with exact format preservation and AI agent integration
|
|
5
|
+
Author-email: Circuit-Synth <shane@circuit-synth.com>
|
|
6
|
+
Maintainer-email: Circuit-Synth <shane@circuit-synth.com>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/circuit-synth/kicad-sch-api
|
|
9
|
+
Project-URL: Documentation, https://circuit-synth.github.io/kicad-sch-api/
|
|
10
|
+
Project-URL: Repository, https://github.com/circuit-synth/kicad-sch-api.git
|
|
11
|
+
Project-URL: Bug Reports, https://github.com/circuit-synth/kicad-sch-api/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/circuit-synth/kicad-sch-api/blob/main/CHANGELOG.md
|
|
13
|
+
Keywords: kicad,schematic,eda,electronics,circuit-design,ai,automation,pcb
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Operating System :: OS Independent
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: fastmcp>=2.0.0
|
|
29
|
+
Requires-Dist: mcp[cli]>=1.13.0
|
|
30
|
+
Requires-Dist: sexpdata>=0.0.3
|
|
31
|
+
Requires-Dist: typing-extensions>=4.0.0; python_version < "3.11"
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-xdist>=3.0.0; extra == "dev"
|
|
36
|
+
Requires-Dist: black>=22.0.0; extra == "dev"
|
|
37
|
+
Requires-Dist: isort>=5.0.0; extra == "dev"
|
|
38
|
+
Requires-Dist: flake8>=4.0.0; extra == "dev"
|
|
39
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
|
|
41
|
+
Provides-Extra: mcp
|
|
42
|
+
Requires-Dist: mcp[cli]>=1.0.0; extra == "mcp"
|
|
43
|
+
Requires-Dist: fastmcp>=2.0.0; extra == "mcp"
|
|
44
|
+
Provides-Extra: docs
|
|
45
|
+
Requires-Dist: sphinx>=5.0.0; extra == "docs"
|
|
46
|
+
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
|
|
47
|
+
Requires-Dist: myst-parser>=0.18.0; extra == "docs"
|
|
48
|
+
Dynamic: license-file
|
|
49
|
+
|
|
50
|
+
# KiCAD Schematic MCP Server
|
|
51
|
+
|
|
52
|
+
**Professional KiCAD Schematic Manipulation with Claude Code Integration**
|
|
53
|
+
|
|
54
|
+
Transform natural language into professional KiCAD schematics using AI. This MCP (Model Context Protocol) server provides Claude Code with powerful tools for creating, editing, and managing KiCAD schematic files with exact format preservation.
|
|
55
|
+
|
|
56
|
+
## 🚀 Quick Start - One Command Installation
|
|
57
|
+
|
|
58
|
+
**For macOS/Linux:**
|
|
59
|
+
```bash
|
|
60
|
+
curl -fsSL https://raw.githubusercontent.com/circuit-synth/kicad-sch-api/main/install.sh | bash
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**For Windows (PowerShell):**
|
|
64
|
+
```powershell
|
|
65
|
+
iwr -useb https://raw.githubusercontent.com/circuit-synth/kicad-sch-api/main/install.ps1 | iex
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**⏱️ Installation time: 2 minutes | Setup time: 30 seconds | Ready to design! 🚀**
|
|
69
|
+
|
|
70
|
+
## 📋 Prerequisites
|
|
71
|
+
|
|
72
|
+
- **KiCAD 8.0+** installed (for component symbol libraries)
|
|
73
|
+
- **Claude Code** installed ([download here](https://claude.ai/code))
|
|
74
|
+
- **Python 3.8+** (automatically handled by installation script)
|
|
75
|
+
|
|
76
|
+
## ✨ What You Get
|
|
77
|
+
|
|
78
|
+
After installation, use natural language in Claude Code to:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
"Create a voltage divider with two 10kΩ resistors"
|
|
82
|
+
"Add an ESP32 microcontroller with USB connector"
|
|
83
|
+
"Generate a hierarchical schematic with power supply subcircuit"
|
|
84
|
+
"Export component list with manufacturer part numbers"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 🎯 Key Features
|
|
88
|
+
|
|
89
|
+
- **🤖 AI-Native**: Built specifically for Claude Code integration
|
|
90
|
+
- **📋 Exact Format Preservation**: Output matches KiCAD's native formatting exactly
|
|
91
|
+
- **⚡ High Performance**: Optimized for large schematics with intelligent caching
|
|
92
|
+
- **🏗️ Hierarchical Design**: Full support for complex multi-sheet schematics
|
|
93
|
+
- **📚 Component Discovery**: Intelligent search across 13,000+ KiCAD symbols
|
|
94
|
+
- **🔍 Advanced Analysis**: Component filtering, area selection, and validation
|
|
95
|
+
- **✅ Professional Quality**: Comprehensive error handling and reporting
|
|
96
|
+
|
|
97
|
+
## 🆚 vs. Existing Solutions
|
|
98
|
+
|
|
99
|
+
| Feature | kicad-sch-api | Other Solutions | KiCAD Native |
|
|
100
|
+
|---------|---------------|-----------------|--------------|
|
|
101
|
+
| **AI Integration** | ✅ Claude Code | ❌ None | ❌ None |
|
|
102
|
+
| **Format Preservation** | ✅ Exact | ⚠️ Basic | ✅ Native |
|
|
103
|
+
| **Component Discovery** | ✅ 13,000+ | ⚠️ Limited | ⚠️ Manual |
|
|
104
|
+
| **Hierarchical Support** | ✅ Complete | ⚠️ Varies | ✅ Native |
|
|
105
|
+
| **Performance** | ✅ Optimized | ⚠️ Basic | ⚠️ GUI Only |
|
|
106
|
+
| **Automation** | ✅ Full API | ❌ None | ⚠️ Limited |
|
|
107
|
+
|
|
108
|
+
## 📦 Installation Options
|
|
109
|
+
|
|
110
|
+
Choose the method that works best for you:
|
|
111
|
+
|
|
112
|
+
### 🚀 Option 1: One-Click Setup (Recommended)
|
|
113
|
+
|
|
114
|
+
The installation script automatically:
|
|
115
|
+
- ✅ Installs the MCP server via pip
|
|
116
|
+
- ✅ Configures Claude Code MCP settings
|
|
117
|
+
- ✅ Tests the connection
|
|
118
|
+
- ✅ Displays usage examples
|
|
119
|
+
|
|
120
|
+
### 🐳 Option 2: Docker Container
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Pull and run the container
|
|
124
|
+
docker run -d --name kicad-mcp -p 3000:3000 circuitsynth/kicad-sch-api:latest
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### 🛠️ Option 3: From Source (Developers)
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
git clone https://github.com/circuit-synth/kicad-sch-api.git
|
|
131
|
+
cd kicad-sch-api
|
|
132
|
+
pip install -e .
|
|
133
|
+
kicad-sch-api --setup-claude-code
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 📦 Option 4: PyPI Package (Coming Soon)
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
pip install kicad-sch-api
|
|
140
|
+
kicad-sch-api --setup-claude-code
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## 🎯 Quick Start Examples
|
|
144
|
+
|
|
145
|
+
### Basic Circuit Creation
|
|
146
|
+
|
|
147
|
+
Ask Claude Code:
|
|
148
|
+
```
|
|
149
|
+
Create a simple LED circuit with a 220Ω current limiting resistor
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Claude Code will:
|
|
153
|
+
1. Create a new schematic file
|
|
154
|
+
2. Add LED component from Device library
|
|
155
|
+
3. Add 220Ω resistor with proper footprint
|
|
156
|
+
4. Connect components with wires
|
|
157
|
+
5. Add power supply connections
|
|
158
|
+
6. Save with exact KiCAD formatting
|
|
159
|
+
|
|
160
|
+
### Advanced Hierarchical Design
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
Design a microcontroller board with separate power supply and USB interface subcircuits
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Claude Code will:
|
|
167
|
+
1. Create main schematic with hierarchical sheets
|
|
168
|
+
2. Generate power supply subcircuit with regulators
|
|
169
|
+
3. Create USB interface subcircuit with connectors
|
|
170
|
+
4. Add inter-sheet connections and labels
|
|
171
|
+
5. Export complete project with proper hierarchy
|
|
172
|
+
|
|
173
|
+
### Component Discovery and Analysis
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
Find all operational amplifiers in the project and update their footprints to SOIC-8
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Claude Code will:
|
|
180
|
+
1. Search through all schematic sheets
|
|
181
|
+
2. Identify op-amp components by symbol library
|
|
182
|
+
3. Update footprint properties systematically
|
|
183
|
+
4. Generate change report with before/after comparison
|
|
184
|
+
|
|
185
|
+
## 🔧 Available Tools
|
|
186
|
+
|
|
187
|
+
The MCP server provides Claude Code with comprehensive schematic manipulation capabilities:
|
|
188
|
+
|
|
189
|
+
| Tool Category | Available Tools |
|
|
190
|
+
|---------------|-----------------|
|
|
191
|
+
| **Creation** | `create_schematic`, `add_component`, `add_wire`, `add_label` |
|
|
192
|
+
| **Hierarchical** | `add_hierarchical_sheet`, `add_sheet_pin`, `add_hierarchical_label` |
|
|
193
|
+
| **Discovery** | `search_components`, `list_available_symbols`, `get_component_info` |
|
|
194
|
+
| **Analysis** | `list_components`, `get_connections`, `validate_schematic` |
|
|
195
|
+
| **Export** | `save_schematic`, `export_netlist`, `generate_bom` |
|
|
196
|
+
|
|
197
|
+
## ⚙️ Configuration
|
|
198
|
+
|
|
199
|
+
### Automatic Configuration (Recommended)
|
|
200
|
+
```bash
|
|
201
|
+
kicad-sch-api --setup-claude-code
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Manual Configuration
|
|
205
|
+
Add to your Claude Code MCP settings:
|
|
206
|
+
|
|
207
|
+
**File Location:**
|
|
208
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
209
|
+
- **Windows:** `%APPDATA%/Claude/claude_desktop_config.json`
|
|
210
|
+
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"mcpServers": {
|
|
215
|
+
"kicad-sch-api": {
|
|
216
|
+
"command": "kicad-sch-mcp",
|
|
217
|
+
"args": [],
|
|
218
|
+
"env": {}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## ✅ Verification
|
|
225
|
+
|
|
226
|
+
### Test Installation
|
|
227
|
+
```bash
|
|
228
|
+
kicad-sch-api --test
|
|
229
|
+
kicad-sch-api --demo
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### In Claude Code
|
|
233
|
+
Ask Claude Code:
|
|
234
|
+
```
|
|
235
|
+
Test the KiCAD MCP server by creating a simple resistor circuit
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
If successful, you'll see Claude Code using the kicad-sch-api tools to create schematics.
|
|
239
|
+
|
|
240
|
+
## 🏗️ Architecture
|
|
241
|
+
|
|
242
|
+
### Core Python Library
|
|
243
|
+
- **Enhanced Object Model**: Intuitive API with fast component collections
|
|
244
|
+
- **Exact Format Preservation**: S-expression writer that matches KiCAD output
|
|
245
|
+
- **Symbol Caching**: High-performance library symbol management
|
|
246
|
+
- **Comprehensive Validation**: Error collection and professional reporting
|
|
247
|
+
|
|
248
|
+
### MCP Server Integration
|
|
249
|
+
- **Claude Code Tools**: 15+ tools for complete schematic manipulation
|
|
250
|
+
- **Professional Error Handling**: Detailed error context for AI agents
|
|
251
|
+
- **Component Discovery**: SQLite-indexed search across KiCAD libraries
|
|
252
|
+
- **Hierarchical Support**: Full multi-sheet schematic capabilities
|
|
253
|
+
|
|
254
|
+
## 🧪 Testing & Quality
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
# Test the MCP server
|
|
258
|
+
kicad-sch-mcp --test
|
|
259
|
+
|
|
260
|
+
# Run comprehensive tests
|
|
261
|
+
uv run pytest tests/ -v
|
|
262
|
+
|
|
263
|
+
# Format preservation tests (critical)
|
|
264
|
+
uv run pytest tests/test_format_preservation.py -v
|
|
265
|
+
uv run pytest tests/test_exact_file_diff.py -v
|
|
266
|
+
|
|
267
|
+
# Code quality checks
|
|
268
|
+
uv run black kicad_sch_api/ tests/
|
|
269
|
+
uv run mypy kicad_sch_api/
|
|
270
|
+
uv run flake8 kicad_sch_api/ tests/
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## 🔧 Troubleshooting
|
|
274
|
+
|
|
275
|
+
### Common Issues
|
|
276
|
+
|
|
277
|
+
**"Command not found: kicad-sch-mcp"**
|
|
278
|
+
```bash
|
|
279
|
+
# Check installation status
|
|
280
|
+
kicad-sch-api --status
|
|
281
|
+
|
|
282
|
+
# Add to PATH permanently
|
|
283
|
+
export PATH="/Library/Frameworks/Python.framework/Versions/3.12/bin:$PATH"
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
**"Component libraries not found"**
|
|
287
|
+
```bash
|
|
288
|
+
# Initialize component cache
|
|
289
|
+
kicad-sch-api --init-cache
|
|
290
|
+
|
|
291
|
+
# Check KiCAD installation
|
|
292
|
+
kicad-sch-api --check-kicad
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**"MCP server not responding"**
|
|
296
|
+
```bash
|
|
297
|
+
# View server logs
|
|
298
|
+
kicad-sch-api --logs
|
|
299
|
+
|
|
300
|
+
# Test server startup
|
|
301
|
+
kicad-sch-mcp --debug
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## 🤝 Contributing
|
|
305
|
+
|
|
306
|
+
We welcome contributions! See [INSTALLATION.md](INSTALLATION.md) for setup details and [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
307
|
+
|
|
308
|
+
Key areas for contribution:
|
|
309
|
+
- Additional KiCAD symbol library support
|
|
310
|
+
- Enhanced component discovery algorithms
|
|
311
|
+
- Performance optimizations for large schematics
|
|
312
|
+
- New MCP tools and capabilities
|
|
313
|
+
|
|
314
|
+
## 📄 License
|
|
315
|
+
|
|
316
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
317
|
+
|
|
318
|
+
## 🔗 Related Projects
|
|
319
|
+
|
|
320
|
+
- **[circuit-synth](https://github.com/circuit-synth/circuit-synth)**: Comprehensive circuit design automation
|
|
321
|
+
- **[Claude Code](https://claude.ai/code)**: AI-powered development environment
|
|
322
|
+
- **[MCP](https://modelcontextprotocol.io/)**: Model Context Protocol for AI tool integration
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
**Transform ideas into schematics with AI ⚡ Built with ❤️ by the Circuit-Synth team**
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
kicad_sch_api/__init__.py,sha256=mogTeOic6O-WWOfpoRuBzPicVNha-gbdMrhJX4ir5PY,2821
|
|
2
|
+
kicad_sch_api/cli.py,sha256=DvBDibtT4Ruyo_XWBwlsK5r2j0OWkjy-oslQqGk90Vs,12613
|
|
3
|
+
kicad_sch_api/py.typed,sha256=e4ldqxwpY7pNDG1olbvj4HSKr8sZ9vxgA_2ek8xXn-Q,70
|
|
4
|
+
kicad_sch_api/core/__init__.py,sha256=ur_KeYBlGKl-e1hLpLdxAhGV2A-PCCGkcqd0r6KSeBA,566
|
|
5
|
+
kicad_sch_api/core/components.py,sha256=TiQrl7jdDTnuCWKdrlQC8-3b9PU58KoxTTnPX6VyZZk,24759
|
|
6
|
+
kicad_sch_api/core/formatter.py,sha256=kvKbuVLkZOV7iyEmzAeFvxnOd4FpQ-7dwG8rvyTrXss,14346
|
|
7
|
+
kicad_sch_api/core/ic_manager.py,sha256=5pw0FtUBXeF6afbiYej7kQe6ga32N4bNTScEHWYGq7A,7298
|
|
8
|
+
kicad_sch_api/core/junctions.py,sha256=p99iv8pBb-3oktVsTeHgjl7QkkZa9EeN32nSy4g23o4,6251
|
|
9
|
+
kicad_sch_api/core/parser.py,sha256=s1NwkuhouOplsBy-yZ_6RISmlunhWqRlD_8aNxIpYdU,44741
|
|
10
|
+
kicad_sch_api/core/schematic.py,sha256=EHofbbfZfBfDcdHNNsO9peNNu3Iq07m2g_xQjL41p20,45972
|
|
11
|
+
kicad_sch_api/core/types.py,sha256=I56eG0G8C4t9OaMiTcbxn6-xivwjpP5EXZUHnDoB6mY,12853
|
|
12
|
+
kicad_sch_api/core/wires.py,sha256=kvANBg79KxOd5TKZNpHbjMyouZbGwRKLPNz4ePvvHgk,8207
|
|
13
|
+
kicad_sch_api/discovery/__init__.py,sha256=0ky_FT58x-6aez6R9nhH2BBV27yG1N8EutRbRu7USxo,328
|
|
14
|
+
kicad_sch_api/discovery/search_index.py,sha256=Yl3PXRk19mXCDtABM6Bs0ii0HMGiUAmIpD7xZjt7oEU,15943
|
|
15
|
+
kicad_sch_api/library/__init__.py,sha256=NG9UTdcpn25Bl9tPsYs9ED7bvpaVPVdtLMbnxkQkOnU,250
|
|
16
|
+
kicad_sch_api/library/cache.py,sha256=NPJT-apWH_JfVG1aXJ0gDnfGu8es_2tYiyZr-chcTxY,33511
|
|
17
|
+
kicad_sch_api/mcp/__init__.py,sha256=Jw4gKdn9H-2MVUYBTIAb6s5Tz2mYc9KoQPRsx-voD4s,159
|
|
18
|
+
kicad_sch_api/mcp/server.py,sha256=W_mtBLEBilK2z5J1UMSVdJGc4Pm7RP1OyAhG3b7helA,54343
|
|
19
|
+
kicad_sch_api/utils/__init__.py,sha256=1V_yGgI7jro6MUc4Pviux_WIeJ1wmiYFID186SZwWLQ,277
|
|
20
|
+
kicad_sch_api/utils/validation.py,sha256=XlWGRZJb3cOPYpU9sLQQgC_NASwbi6W-LCN7PzUmaPY,15626
|
|
21
|
+
kicad_sch_api-0.1.2.dist-info/licenses/LICENSE,sha256=Em65Nvte1G9MHc0rHqtYuGkCPcshD588itTa358J6gs,1070
|
|
22
|
+
kicad_sch_api-0.1.2.dist-info/METADATA,sha256=s47jUm32HIsrvfrQ3ELL8t2ZB0VtD1OdPjzWWKjAWgY,10474
|
|
23
|
+
kicad_sch_api-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
kicad_sch_api-0.1.2.dist-info/entry_points.txt,sha256=Ibo-83_EdwmiuQwMcOHEzClKgl8MC9syASWtYzeD-os,103
|
|
25
|
+
kicad_sch_api-0.1.2.dist-info/top_level.txt,sha256=n0ex4gOJ1b_fARowcGqRzyOGZcHRhc5LZa6_vVgGxcI,14
|
|
26
|
+
kicad_sch_api-0.1.2.dist-info/RECORD,,
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: kicad-sch-api
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: Professional KiCAD schematic manipulation library with exact format preservation and AI agent integration
|
|
5
|
-
Author-email: Circuit-Synth <info@circuit-synth.com>
|
|
6
|
-
Maintainer-email: Circuit-Synth <info@circuit-synth.com>
|
|
7
|
-
License-Expression: MIT
|
|
8
|
-
Project-URL: Homepage, https://github.com/circuit-synth/kicad-sch-api
|
|
9
|
-
Project-URL: Documentation, https://circuit-synth.github.io/kicad-sch-api/
|
|
10
|
-
Project-URL: Repository, https://github.com/circuit-synth/kicad-sch-api.git
|
|
11
|
-
Project-URL: Bug Reports, https://github.com/circuit-synth/kicad-sch-api/issues
|
|
12
|
-
Project-URL: Changelog, https://github.com/circuit-synth/kicad-sch-api/blob/main/CHANGELOG.md
|
|
13
|
-
Keywords: kicad,schematic,eda,electronics,circuit-design,ai,automation,pcb
|
|
14
|
-
Classifier: Development Status :: 4 - Beta
|
|
15
|
-
Classifier: Intended Audience :: Developers
|
|
16
|
-
Classifier: Intended Audience :: Science/Research
|
|
17
|
-
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
|
|
18
|
-
Classifier: Programming Language :: Python :: 3
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
-
Classifier: Operating System :: OS Independent
|
|
25
|
-
Requires-Python: >=3.10
|
|
26
|
-
Description-Content-Type: text/markdown
|
|
27
|
-
License-File: LICENSE
|
|
28
|
-
Requires-Dist: sexpdata>=0.0.3
|
|
29
|
-
Requires-Dist: typing-extensions>=4.0.0; python_version < "3.11"
|
|
30
|
-
Provides-Extra: dev
|
|
31
|
-
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
32
|
-
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
33
|
-
Requires-Dist: pytest-xdist>=3.0.0; extra == "dev"
|
|
34
|
-
Requires-Dist: black>=22.0.0; extra == "dev"
|
|
35
|
-
Requires-Dist: isort>=5.0.0; extra == "dev"
|
|
36
|
-
Requires-Dist: flake8>=4.0.0; extra == "dev"
|
|
37
|
-
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
38
|
-
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
|
|
39
|
-
Provides-Extra: docs
|
|
40
|
-
Requires-Dist: sphinx>=5.0.0; extra == "docs"
|
|
41
|
-
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
|
|
42
|
-
Requires-Dist: myst-parser>=0.18.0; extra == "docs"
|
|
43
|
-
Dynamic: license-file
|
|
44
|
-
|
|
45
|
-
# kicad-sch-api
|
|
46
|
-
|
|
47
|
-
**Professional KiCAD Schematic Manipulation Library with AI Agent Integration**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## 🚀 Key Features
|
|
51
|
-
|
|
52
|
-
- **📋 Exact Format Preservation**: Output matches KiCAD's native formatting exactly
|
|
53
|
-
- **⚡ High Performance**: Optimized for large schematics with symbol caching
|
|
54
|
-
- **🔧 Enhanced API**: Intuitive object-oriented interface with bulk operations
|
|
55
|
-
- **📚 Advanced Library Management**: Multi-source symbol lookup and caching
|
|
56
|
-
- **✅ Professional Validation**: Comprehensive error collection and reporting
|
|
57
|
-
- **🎯 KiCAD 9 Optimized**: Built specifically for latest KiCAD format
|
|
58
|
-
|
|
59
|
-
## 🆚 vs. Existing Solutions
|
|
60
|
-
|
|
61
|
-
| Feature | kicad-sch-api | Other Solutions | KiCAD Official API |
|
|
62
|
-
|---------|---------------|-----------------|-------------------|
|
|
63
|
-
| **Schematic Support** | ✅ Full | ⚠️ Varies | ❌ PCB Only |
|
|
64
|
-
| **Format Preservation** | ✅ Exact | ❌ Basic | N/A |
|
|
65
|
-
| **Performance** | ✅ Optimized | ⚠️ Basic | N/A |
|
|
66
|
-
| **Library Management** | ✅ Advanced | ⚠️ Limited | N/A |
|
|
67
|
-
| **Runtime Dependencies** | ❌ None | ⚠️ Varies | ✅ KiCAD Required |
|
|
68
|
-
|
|
69
|
-
## 📦 Installation
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
# Install from PyPI (coming soon)
|
|
73
|
-
pip install kicad-sch-api
|
|
74
|
-
|
|
75
|
-
# Or install from source
|
|
76
|
-
git clone https://github.com/circuit-synth/kicad-sch-api.git
|
|
77
|
-
cd kicad-sch-api/python
|
|
78
|
-
pip install -e .
|
|
79
|
-
|
|
80
|
-
npm install
|
|
81
|
-
npm run build
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## 🎯 Quick Start
|
|
85
|
-
|
|
86
|
-
### Basic Schematic Manipulation
|
|
87
|
-
|
|
88
|
-
```python
|
|
89
|
-
import kicad_sch_api as ksa
|
|
90
|
-
|
|
91
|
-
# Create new schematic
|
|
92
|
-
sch = ksa.create_schematic('My Circuit')
|
|
93
|
-
|
|
94
|
-
# Add components
|
|
95
|
-
resistor = sch.components.add('Device:R', reference='R1', value='10k', position=(100, 100))
|
|
96
|
-
capacitor = sch.components.add('Device:C', reference='C1', value='0.1uF', position=(150, 100))
|
|
97
|
-
|
|
98
|
-
# Update properties
|
|
99
|
-
resistor.footprint = 'Resistor_SMD:R_0603_1608Metric'
|
|
100
|
-
resistor.set_property('MPN', 'RC0603FR-0710KL')
|
|
101
|
-
|
|
102
|
-
# Save with exact format preservation
|
|
103
|
-
sch.save('my_circuit.kicad_sch')
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Advanced Operations
|
|
107
|
-
|
|
108
|
-
```python
|
|
109
|
-
# Bulk operations for large schematics
|
|
110
|
-
resistors = sch.components.filter(lib_id='Device:R')
|
|
111
|
-
for r in resistors:
|
|
112
|
-
r.set_property('Tolerance', '1%')
|
|
113
|
-
|
|
114
|
-
# Search and analysis
|
|
115
|
-
power_components = sch.components.in_area(0, 0, 50, 50)
|
|
116
|
-
high_value_resistors = sch.components.filter(
|
|
117
|
-
lib_id='Device:R',
|
|
118
|
-
value_pattern='*k' # Components with 'k' in value
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
# Validation and error checking
|
|
122
|
-
issues = sch.validate()
|
|
123
|
-
if issues:
|
|
124
|
-
print(f"Found {len(issues)} validation issues:")
|
|
125
|
-
for issue in issues:
|
|
126
|
-
print(f" {issue}")
|
|
127
|
-
|
|
128
|
-
# Performance statistics
|
|
129
|
-
stats = sch.get_performance_stats()
|
|
130
|
-
print(f"Cache hit rate: {stats['symbol_cache']['hit_rate_percent']}%")
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
```json
|
|
136
|
-
{
|
|
137
|
-
"kicad-sch": {
|
|
138
|
-
"command": "node",
|
|
139
|
-
"env": {
|
|
140
|
-
"PYTHON_PATH": "python3",
|
|
141
|
-
"KICAD_SCH_API_PATH": "/path/to/kicad-sch-api/python"
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Then use natural language with your AI agent:
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
User: "Create a voltage divider circuit with two 10k resistors"
|
|
151
|
-
|
|
152
|
-
Claude: I'll create a voltage divider circuit for you.
|
|
153
|
-
|
|
154
|
-
1. Create new schematic
|
|
155
|
-
2. Add R1 (10k resistor) at (100, 100)
|
|
156
|
-
3. Add R2 (10k resistor) at (100, 150)
|
|
157
|
-
4. Connect components with wires
|
|
158
|
-
5. Add voltage input and output labels
|
|
159
|
-
6. Save schematic with exact formatting
|
|
160
|
-
|
|
161
|
-
Your voltage divider circuit is ready! The circuit provides 50% voltage division
|
|
162
|
-
with two 10kΩ resistors in series configuration.
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## 🏗️ Architecture
|
|
166
|
-
|
|
167
|
-
The library consists of two main components:
|
|
168
|
-
|
|
169
|
-
### Python Library (Core)
|
|
170
|
-
- **Enhanced Object Model**: Intuitive API with fast component collections
|
|
171
|
-
- **Exact Format Preservation**: S-expression writer that matches KiCAD output
|
|
172
|
-
- **Symbol Caching**: High-performance library symbol management
|
|
173
|
-
- **Comprehensive Validation**: Error collection and professional reporting
|
|
174
|
-
|
|
175
|
-
- **Python Bridge**: Reliable subprocess communication
|
|
176
|
-
- **Comprehensive Tools**: 15+ tools for complete schematic manipulation
|
|
177
|
-
- **Professional Error Handling**: Detailed error context for AI agents
|
|
178
|
-
|
|
179
|
-
## 🧪 Testing & Quality
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
# Python tests
|
|
183
|
-
cd python
|
|
184
|
-
python -m pytest tests/ -v --cov=kicad_sch_api
|
|
185
|
-
|
|
186
|
-
npm test
|
|
187
|
-
|
|
188
|
-
# Format preservation tests
|
|
189
|
-
python -m pytest tests/test_format_preservation.py -v
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## 🤝 Contributing
|
|
193
|
-
|
|
194
|
-
We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
195
|
-
|
|
196
|
-
## 📄 License
|
|
197
|
-
|
|
198
|
-
MIT License - see [LICENSE](LICENSE) for details.
|
|
199
|
-
|
|
200
|
-
## 🔗 Related Projects
|
|
201
|
-
|
|
202
|
-
- **[circuit-synth](https://github.com/circuit-synth/circuit-synth)**: Comprehensive circuit design automation
|
|
203
|
-
- **[sexpdata](https://github.com/jd-boyd/sexpdata)**: S-expression parsing library
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
**Built with ❤️ by the Circuit-Synth team**
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
kicad_sch_api/__init__.py,sha256=mogTeOic6O-WWOfpoRuBzPicVNha-gbdMrhJX4ir5PY,2821
|
|
2
|
-
kicad_sch_api/py.typed,sha256=e4ldqxwpY7pNDG1olbvj4HSKr8sZ9vxgA_2ek8xXn-Q,70
|
|
3
|
-
kicad_sch_api/core/__init__.py,sha256=ur_KeYBlGKl-e1hLpLdxAhGV2A-PCCGkcqd0r6KSeBA,566
|
|
4
|
-
kicad_sch_api/core/components.py,sha256=TiQrl7jdDTnuCWKdrlQC8-3b9PU58KoxTTnPX6VyZZk,24759
|
|
5
|
-
kicad_sch_api/core/formatter.py,sha256=WhJPII8-hd4ou3_4AYa4UB8704cEE8rLshhBhVHnY7I,14173
|
|
6
|
-
kicad_sch_api/core/ic_manager.py,sha256=5pw0FtUBXeF6afbiYej7kQe6ga32N4bNTScEHWYGq7A,7298
|
|
7
|
-
kicad_sch_api/core/junctions.py,sha256=p99iv8pBb-3oktVsTeHgjl7QkkZa9EeN32nSy4g23o4,6251
|
|
8
|
-
kicad_sch_api/core/parser.py,sha256=xVWzRwGPklROWe9_VoauVeoFsCZjKQGyo6AsSg0bqgU,44174
|
|
9
|
-
kicad_sch_api/core/schematic.py,sha256=JxOTHbASxcOVEFK2Ms1s7q7uERaKVQb0Ojomfyip99I,45176
|
|
10
|
-
kicad_sch_api/core/types.py,sha256=sn6_OnOKnNjc_6oXpASEfWI6f7oHsMyJaHk8kc3QFMk,12823
|
|
11
|
-
kicad_sch_api/core/wires.py,sha256=kvANBg79KxOd5TKZNpHbjMyouZbGwRKLPNz4ePvvHgk,8207
|
|
12
|
-
kicad_sch_api/library/__init__.py,sha256=NG9UTdcpn25Bl9tPsYs9ED7bvpaVPVdtLMbnxkQkOnU,250
|
|
13
|
-
kicad_sch_api/library/cache.py,sha256=NPJT-apWH_JfVG1aXJ0gDnfGu8es_2tYiyZr-chcTxY,33511
|
|
14
|
-
kicad_sch_api/utils/__init__.py,sha256=1V_yGgI7jro6MUc4Pviux_WIeJ1wmiYFID186SZwWLQ,277
|
|
15
|
-
kicad_sch_api/utils/validation.py,sha256=XlWGRZJb3cOPYpU9sLQQgC_NASwbi6W-LCN7PzUmaPY,15626
|
|
16
|
-
kicad_sch_api-0.1.0.dist-info/licenses/LICENSE,sha256=Em65Nvte1G9MHc0rHqtYuGkCPcshD588itTa358J6gs,1070
|
|
17
|
-
kicad_sch_api-0.1.0.dist-info/METADATA,sha256=LIRlM5Iev8fS3Elb0zynJXiZIwmIqmUqcaYmnKN8WdA,6674
|
|
18
|
-
kicad_sch_api-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
-
kicad_sch_api-0.1.0.dist-info/entry_points.txt,sha256=VWKsFi2Jv7G_tmio3cNVhhIBfv_OZFaKa-T_ED84lc8,57
|
|
20
|
-
kicad_sch_api-0.1.0.dist-info/top_level.txt,sha256=n0ex4gOJ1b_fARowcGqRzyOGZcHRhc5LZa6_vVgGxcI,14
|
|
21
|
-
kicad_sch_api-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|