# AI use cases for AI Data Extractor (jatechan/ai-data-extractor)

Repo: [jatechan/ai-data-extractor](https://github.com/jatechan/ai-data-extractor) | Use cases: 4 | Page: https://dedupedai.com/use-cases/jatechan-ai-data-extractor/

A free, standard-library-only Python toolkit that extracts your own local chat history from AI coding assistants into normalized JSONL files.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Back up AI coding chat history before it is lost: https://dedupedai.com/use-cases/jatechan-ai-data-extractor/back-up-ai-coding-chat-history/
- Turn your coding chats into a fine-tuning dataset: https://dedupedai.com/use-cases/jatechan-ai-data-extractor/prepare-coding-chats-for-fine-tuning/
- Measure your AI coding usage across tools and projects: https://dedupedai.com/use-cases/jatechan-ai-data-extractor/analyze-ai-coding-usage-across-tools/
- Collect Aider chat logs from all your project folders: https://dedupedai.com/use-cases/jatechan-ai-data-extractor/extract-aider-transcripts-from-many-projects/

## How to back up AI coding chat history before it is lost with AI Data Extractor

Repo: [jatechan/ai-data-extractor](https://github.com/jatechan/ai-data-extractor) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Export local chats from supported AI coding tools into timestamped JSONL files you keep yourself.

**Who it is for:** A developer who has years of conversations in AI coding tools and fears an app update or cleanup will clear the local database.

**The problem:** Chat history is stored in each tool's own local format, so it is hard to keep a single copy of it.

**The outcome:** One folder of timestamped JSONL files per source, plus an optional combined all_conversations.jsonl file.

### Steps

1. Run `python extract.py --list` to see which supported tools were found on this machine.
2. Run `python extract.py --all --merge` to extract every found source and write all_conversations.jsonl.
3. Check the new files in `extracted_data/`, one per source, with timestamps in the file names.
4. Copy the extracted_data folder to encrypted storage, since it may hold client or proprietary work.

### Prompt to paste into your agent

```text
Using the repo jatechan/ai-data-extractor, run `python extract.py --all --merge` in the <project folder> directory. Report the number of conversation lines written to each file in extracted_data/ and confirm that all_conversations.jsonl exists. Verify that each JSONL line parses as valid JSON with a messages array.
```

### Caveat

The extractor reads each tool's storage as it exists today, and Windsurf and Trae use a heuristic that may return zero conversations after a storage change.

Risk, credentials: Exported chats can contain API keys or secrets in code_context or tool_use fields, so scan the output before you share or store it elsewhere.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/jatechan-ai-data-extractor/back-up-ai-coding-chat-history/

## How to turn your coding chats into a fine-tuning dataset with AI Data Extractor

Repo: [jatechan/ai-data-extractor](https://github.com/jatechan/ai-data-extractor) | Difficulty: Advanced | Time: 30 minutes | Basis: From the README

Extract, secret-scan, and load your assistant conversations as a training set for a chat model.

**Who it is for:** An ML engineer who wants to fine-tune a model on their own coding conversations and needs a clean, filtered dataset.

**The problem:** Raw chat exports contain secrets, proprietary code, and personal file paths that must be removed before training.

**The outcome:** A filtered Hugging Face dataset of conversations that contain at least one assistant message, ready for chat-template formatting.

### Steps

1. Run `python extract.py --sources cursor,claude_code,aider` to extract only the sources you want to train on.
2. Run `pip install detect-secrets --break-system-packages`, then `detect-secrets scan extracted_data/*.jsonl`.
3. Review code_context and tool_use fields for proprietary code, API keys, and personal file paths, and remove those records.
4. In Python, load the cleaned files with `load_dataset("json", data_files="extracted_data/*.jsonl", split="train")` from the datasets library, then apply the README filter for assistant messages. (inferred, check the README)
5. Format each example with `tokenizer.apply_chat_template`, after defining the tokenizer for your target model.

### Prompt to paste into your agent

```text
Using the repo jatechan/ai-data-extractor, extract the sources cursor and claude_code, run detect-secrets on the output, and load the JSONL files in <project folder>/extracted_data with the datasets library. Report how many conversations remain after filtering for assistant messages. Verify that no record still contains a flagged secret before using it for training.
```

### Caveat

The README example calls tokenizer.apply_chat_template without showing how to define the tokenizer, so you must supply it yourself.

Risk, credentials: Training on unscanned chats can teach a model to repeat API keys or other secrets that appear in code_context or tool_use.

Risk, reverse engineering: Chat records can include proprietary code from employers or clients, so confirm you have the rights to use that data for training.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/jatechan-ai-data-extractor/prepare-coding-chats-for-fine-tuning/

## How to measure your AI coding usage across tools and projects with AI Data Extractor

Repo: [jatechan/ai-data-extractor](https://github.com/jatechan/ai-data-extractor) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Count sessions, projects, and models over time from your extracted assistant conversations.

**Who it is for:** A developer or team lead who wants to see how they use different AI coding assistants across projects.

**The problem:** Usage is split across several tools with different storage formats, so there is no single view of it.

**The outcome:** A summary table of sessions per source, project, model, and month, built from the normalized JSONL files.

### Steps

1. Run `python extract.py --all --merge` to write all_conversations.jsonl with every found source.
2. Write a short Python script using the standard library to read all_conversations.jsonl one line at a time. (inferred, check the README)
3. Group records by the source, project_path, and timestamp fields, counting sessions by session_id. (inferred, check the README)
4. Print the counts per source and per month, and save them to a CSV file. (inferred, check the README)

### Prompt to paste into your agent

```text
Using the repo jatechan/ai-data-extractor, read extracted_data/all_conversations.jsonl from <project folder> and count unique session_id values grouped by source and by month of the timestamp. Output a CSV table with those counts. Verify that the total of session counts equals the number of unique session_id values in the file.
```

### Caveat

Fields vary by source, so some tools will not record model names, project paths, or timestamps, and those rows will be missing from the counts.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/jatechan-ai-data-extractor/analyze-ai-coding-usage-across-tools/

## How to collect Aider chat logs from all your project folders with AI Data Extractor

Repo: [jatechan/ai-data-extractor](https://github.com/jatechan/ai-data-extractor) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Find every Aider transcript across your project directories and export them to JSONL.

**Who it is for:** A developer who uses the terminal tool Aider across many repositories and keeps its transcripts scattered in project folders.

**The problem:** Aider has no central session store, so each project holds its own .aider.chat.history.md file.

**The outcome:** One aider_conversations JSONL file with the transcripts from every project you point the tool at.

### Steps

1. Run `python extract.py --sources aider --search-path ~/client-work --search-path /mnt/data/repos` after changing the paths to your own project folders.
2. Open the new aider_conversations_*.jsonl file in `extracted_data/` to confirm the transcripts are there.
3. Keep the output private, since Aider transcripts often contain full project file contents.

### Prompt to paste into your agent

```text
Using the repo jatechan/ai-data-extractor, run the aider source with --search-path set to <project folder>, and report how many project transcripts were found and written. Verify that each output line includes a messages array and a project_path value that matches one of the searched folders.
```

### Caveat

The default search covers only the home directory and a few common folder names up to 5 levels deep, so projects stored elsewhere must be passed with --search-path.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/jatechan-ai-data-extractor/extract-aider-transcripts-from-many-projects/
