Skip to main content

Adding a New IDE Parser

swAItch is designed to make adding new IDE support straightforward. You only need to:
  1. Add an enum value
  2. Add data paths
  3. Implement one class
  4. Register it

Step 1: Add the IDE Type

In models.py, add a new value to the IDEType enum:

Step 2: Add Data Paths

In config.py, add the IDE’s data paths to IDEPaths:

Step 3: Implement the Parser

Create a new file in parsers/ that extends BaseParser:

Step 4: Register It

In server.py, add one line to _build_registry():
That’s it! The MCP tools, file watcher, and everything else automatically pick up the new parser.

Tips

Implement invalidate_cache() if your parser caches data. The file watcher calls this when files change.
Return SourceStatus.NOT_FOUND from detect() if the IDE isn’t installed. Never raise exceptions from detection.
list_conversation_ids() should ideally return results sorted by recency if the underlying storage supports it easily.
Use the metadata dict on Conversation and ChatMessage to pass IDE-specific info that doesn’t fit the standard model.