`ai-data-extractor`: The tool that pulls your AI coding memory out of local silos

A zero-dependency Python collector that normalizes chats, code context, and assistant history from Cursor, Claude Code, Aider, and more into one JSONL pipeline for backup, analysis, and fine-tuning.

7 min read • View on GitHub • More from kruzovic7

A wide forensic desk scene with several locked drawers labeled for different AI coding assistants. An archivist pulls out SQLite chips, Markdown pages, JSON scrolls, and note cards, then feeds them into a single stack of JSONL sheets. The image explains how scattered local assistant histories become one portable archive.
The project starts with a simple but sharp idea: your AI assistant history is already data, just trapped in incompatible containers.
Key Takeaways

AI coding assistants are already keeping a private record of how you think. They capture the prompt that started the search, the files you inspected, the snippets you trusted, and the dead ends you abandoned. `ai-data-extractor` takes that residue seriously and turns it into something you can move, search, and reuse.

Your AI coding history is already a dataset

The strongest argument for this repo is not convenience. It is that your assistant history is one of the few places where your debugging instincts, architectural judgment, and code context all live together. If you care about backup, analytics, or eventually fine-tuning a model on your own work, that history should not be stranded inside half a dozen local storage schemes.

Extract your own local chat history from AI coding assistants into a single, normalized JSONL format - for fine-tuning, personal analytics, or just backing up years of conversations before an app's local database gets cleared.

kruzovic7, Author/Maintainer · kruzovic7/ai-data-extractor - GitHub

That README line is the project in miniature. It is not trying to win on polish or breadth of UI. It is trying to rescue a developer memory layer before the next app update, account reset, or editor switch makes it harder to recover.

The repo is a translator for incompatible memory

The fragmentation problem is the whole reason this project exists. Cursor stores one way. Aider stores another. Claude Code, Windsurf, Trae, and related tools each leave a different local footprint. The interesting part is not that they all have history. It is that none of them agree on how that history should be shaped.

AssistantTypical local shapePain pointWhat ai-data-extractor does
CursorSQLite and app KV storesLocked files and custom schemasCopies safely, queries defensively, normalizes output
Claude CodeStructured local historyDifferent layout from CursorAdapts the source into the same JSONL schema
AiderMarkdown transcriptsHuman-friendly, machine-fragmentedParses text into structured records
Windsurf / TraeUndocumented or semi-structured storesSchemas can shift or hide detailsUses heuristics when the schema is not obvious

That table is the real product story. `ai-data-extractor` is not a single-purpose exporter. It is a translator that makes different memory systems legible to one another by collapsing them into a common record format.

One pipeline, many storage shapes. The adapter layer is the reason the repo can absorb multiple assistants without turning into a pile of special cases.

common.py is the real product

The architecture is simple on purpose. The CLI orchestrator discovers installed tools, then hands each source to a dedicated extractor. The shared logic lives in `extractors/common.py`, and that file is where the project stops being a pile of one-off parsers and starts behaving like a system.

def safe_sqlite_query(db_path, query):
    temp_path = copy_to_temp_file(db_path)
    with sqlite3.connect(temp_path) as conn:
        conn.row_factory = sqlite3.Row
        return conn.execute(query).fetchall()


def app_data_roots():
    return [
        macos_app_support(),
        windows_appdata(),
        xdg_config_home(),
    ]

That pattern does three things well. First, it makes discovery cross-platform. Second, it avoids locking the live database by querying a temporary copy. Third, it gives the extractors a common toolkit for falling back to heuristic parsing when the source tool never documented its schema in the first place.

A close-up editorial scene where a code editor window, a highlighted file selection, and a chat transcript are linked by thin threads into one structured record card. The image explains that the extractor preserves code context, not just conversation text, so the dataset keeps the technical situation around each turn.
Most exporters preserve the words. This one tries to preserve the situation around the words, which is often the part that matters most.

Why code context matters more than chat logs

The best technical judgment often happens around the chat, not inside it. A reply without the open file, selected block, or surrounding snippet is only half the record. By preserving `code_context`, the extractor makes the dataset useful for reconstruction, not just transcription.

That changes the value of the archive. A human reader can reconstruct intent. A model can learn from the pairings between file state and response. And a future search system can answer better questions because it knows what the assistant was looking at when the answer happened.

Cursor, Aider, Claude Code each force a different adapter

The plugin pattern is what lets the repo scale without pretending the ecosystem is uniform. Cursor asks for SQLite reconstruction. Aider asks for Markdown parsing. Claude Code has its own local shape. The registry in `extract.py` simply checks what is present, then routes to the right extractor.

ProjectLanguageOutputScopeBest for
ai-data-extractorPythonJSONLMultiple assistantsBackup, analysis, fine-tuning
claude-conversation-extractorPythonMarkdownClaude Code onlyHuman-readable export
cursor-chroniclePythonMarkdownCursor onlyCursor-centric history review
cursor-historyNode.jsHistory search and restoreCursor onlyNode-based workflows
Aider native historyBuilt-inMarkdown filesAider onlyLocal project transcripts

The comparison is not about declaring winners. It is about scope. Most alternatives optimize for one assistant or one reading experience. `ai-data-extractor` optimizes for reuse across assistants and for downstream machine workflows that want clean, normalized records.

What this enables next

Backup is the obvious use case. Personal analytics is the next one. But the deeper implication is ownership. Once the data is in JSONL, it can feed search, dashboards, prompt audits, and eventually a custom model trained on your own style, habits, and mistakes.

That is why the repo feels more like infrastructure than a utility. It turns a pile of private app internals into a durable memory layer you control. The export is the beginning, not the end.