Metadata-Version: 2.4
Name: ai-chat-vault
Version: 0.3.0
Summary: Local-first archive, clean Markdown/Obsidian exporter, and instant full-text search (CLI + Web UI) for ChatGPT, Claude, and Gemini conversations.
Author: HbuAsherLucas
License-Expression: MIT
Project-URL: Homepage, https://github.com/HbuAsherLucas/ai-chat-vault
Project-URL: Repository, https://github.com/HbuAsherLucas/ai-chat-vault
Project-URL: Issues, https://github.com/HbuAsherLucas/ai-chat-vault/issues
Keywords: chatgpt,claude,gemini,obsidian,markdown,sqlite,fts5,local-first,cli
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Utilities
Classifier: Topic :: Text Processing :: Indexing
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# ai-chat-vault

[![PyPI version](https://img.shields.io/pypi/v/ai-chat-vault.svg)](https://pypi.org/project/ai-chat-vault/)
[![CI](https://github.com/HbuAsherLucas/ai-chat-vault/actions/workflows/ci.yml/badge.svg)](https://github.com/HbuAsherLucas/ai-chat-vault/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Python >= 3.11](https://img.shields.io/badge/python-%3E%3D3.11-blue.svg)](pyproject.toml)
[![Zero Dependencies](https://img.shields.io/badge/dependencies-0%20(stdlib%20only)-brightgreen.svg)](pyproject.toml)

**Own your AI conversations.** `ai-chat-vault` is a **zero-dependency, local-first** CLI and modern Web UI that archives exports from **ChatGPT**, **Claude**, and **Gemini** into a single **SQLite + FTS5** vault, lets you full-text search across every chat in milliseconds, and exports clean **Obsidian-ready Markdown** files.

![ai-chat-vault Web UI Preview](docs/preview.png)

## Why `ai-chat-vault`?

If you use ChatGPT, Claude, and Gemini side by side:
- Your best prompts, debugging sessions, and ideas are scattered across three web apps.
- Native web search is slow or missing across accounts/workspaces.
- Switching accounts, losing access, or canceling a plan puts your history at risk.
- Exporting clean Markdown with YAML frontmatter for Obsidian / Notion / Git takes manual work.

`ai-chat-vault` runs **100% offline** with **zero external Python dependencies** (standard library only) and binds its local Web UI strictly to `127.0.0.1`.

## 30-Second Quickstart

```bash
pip install ai-chat-vault

# 1. Import your ChatGPT, Claude, or Gemini export (.zip or .json):
ai-chat-vault import conversations.zip

# 2. See stats across all providers:
ai-chat-vault stats

# 3. Instant full-text search (SQLite FTS5 + BM25):
ai-chat-vault search "Obsidian"
ai-chat-vault search "bm25" --provider chatgpt

# 4. Export clean Obsidian-ready Markdown + _INDEX.md:
ai-chat-vault export --out ./my-ai-notes

# 5. Launch the local dark/light Web UI with drag-and-drop import (127.0.0.1:8765):
ai-chat-vault serve
```

## Supported Export Formats

| Provider | How to export | What to pass to `import` |
|---|---|---|
| **ChatGPT** | Settings -> Data Controls -> Export Data | The `.zip` archive or `conversations.json` |
| **Claude** | Settings -> Privacy -> Export Data | The `.zip` archive or `conversations.json` |
| **Gemini** | Google Takeout -> Gemini Apps (`MyActivity.json`) or structured JSON | The `.zip` archive or `.json` file |

Re-importing the same export is **idempotent** — conversations are upserted by provider + ID so you never get duplicates.

## CLI Reference

```bash
ai-chat-vault [--db ai-chat-vault.db] import <file.zip | file.json | dir/>
ai-chat-vault [--db ai-chat-vault.db] search "<query>" [--provider all|chatgpt|claude|gemini] [--limit 15] [--json]
ai-chat-vault [--db ai-chat-vault.db] export [--out exported] [--provider all|chatgpt|claude|gemini]
ai-chat-vault [--db ai-chat-vault.db] stats [--json]
ai-chat-vault [--db ai-chat-vault.db] serve [--host 127.0.0.1] [--port 8765]
```

## Obsidian Markdown Output

Every exported file includes clean YAML frontmatter compatible with Obsidian Properties & Dataview:

```markdown
---
id: "claude:conv-claude-001"
title: "Designing an Obsidian Markdown frontmatter schema"
provider: claude
created_at: 2026-10-15T08:30:00Z
updated_at: 2026-10-15T08:35:00Z
tags: [ai-chat, claude]
---

# Designing an Obsidian Markdown frontmatter schema
```

## License

MIT — see [LICENSE](LICENSE).
