Local UI and tooling for browsing ChatGPT and Claude history exports
Project description
Chat History
UI and local tooling for browsing and exporting ChatGPT and Claude conversation history.
Features
- Unified conversation browser for ChatGPT and Claude exports
- Provider-aware favorites and external links
- Full-text search with optional semantic search (OpenAI embeddings + FAISS)
- Activity and token statistics
- Export conversations to markdown for downstream AI workflows
Basic Usage (uvx)
- Python 3.11+
uv
Quick start
uvx chat-history
Auto mode behavior:
- If
data/.envexists in current directory, it starts the server. - If
data/.envis missing, it starts the interactive setup wizard.
Common commands:
uvx chat-history init
uvx chat-history serve --port 8080
uvx chat-history inspect
uvx chat-history export --provider all --out ./data/export --clean
Then open http://127.0.0.1:8080.
Developer Setup
- Sync dependencies:
make install
- Create local config:
mkdir -p data && cp .env.example data/.env
- Set provider export paths in
data/.env:CHAT_HISTORY_CHATGPT_PATH=/absolute/path/to/chatgpt/export/folder(or directconversations.json)CHAT_HISTORY_CLAUDE_PATH=/absolute/path/to/claude/export/folder(or directconversations.json)
- Start app:
make run
Developer Workflow
- Dev server with reload:
make dev - Tests:
make test - Run CLI directly:
uv run chat-history --help - Run packaged entrypoint from repo checkout:
uvx --from . chat-history --help
Data layout under CHAT_HISTORY_DATA_DIR:
DATA_DIR/
chatgpt/
embeddings.db
claude/
embeddings.db
settings.db
export/
Configuration (data/.env)
CHAT_HISTORY_DATA_DIR(default:data)CHAT_HISTORY_CHATGPT_PATH(optional, folder orconversations.json)CHAT_HISTORY_CLAUDE_PATH(optional, folder orconversations.json)CHAT_HISTORY_SETTINGS_DB_PATH(optional)OPENAI_API_KEY(optional; enables semantic search)OPENAI_ORGANIZATION(optional)CHAT_HISTORY_OPENAI_ENABLED(true/false, defaultfalse)OPENAI_EMBEDDING_MODEL(defaulttext-embedding-3-small)
CLI Reference
Main CLI entrypoint: chat-history
-
Start server:
uv run chat-history serve --port 8080
-
Auto mode:
uv run chat-history- If
data/.envexists in the current directory, starts the server. - If
data/.envdoes not exist, starts interactive setup wizard. - Config is loaded from
./data/.envonly (current working directory); default data path is./data.
-
Interactive setup wizard:
uv run chat-history inituv run chat-history init --path /absolute/path/to/project-dir
-
Inspect loaded data:
uv run chat-history inspect
-
Export conversations:
uv run chat-history export --provider all --out /tmp/chat-export- Add
--cleanto remove old export files before writing new ones. - Output layout:
/tmp/chat-export/{chatgpt|claude}/yyyy-mm-dd-hash.md
Filters:
--provider chatgpt|claude|all--exclude-system--exclude-tool--exclude-thinking--exclude-attachments--clean
Global Command (Local Editable Install)
Install the local repo as a global tool:
uv tool install -e .
Then run from any directory:
chat-history --helpchat-historychat-history serve --port 8080chat-history initchat-history inspectchat-history export --provider all
Uninstall:
uv tool uninstall chat-history
Notes
- Export is non-destructive by default. Existing files remain unless
--cleanis used. - Token stats for Claude are approximate (fallback tokenizer), not exact Claude-native counts.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chat_history-0.3.0.tar.gz.
File metadata
- Download URL: chat_history-0.3.0.tar.gz
- Upload date:
- Size: 413.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39155696533e5a520c97000b05f049ce178fe1986ad1ed795cef85fef4eeabb5
|
|
| MD5 |
db7b1d8467657f67a11e6a1974b23c35
|
|
| BLAKE2b-256 |
084c1ea9db6a9b1abc26e81d554ae81e112c0d972c3eb838f9b3abf6f63510f1
|
File details
Details for the file chat_history-0.3.0-py3-none-any.whl.
File metadata
- Download URL: chat_history-0.3.0-py3-none-any.whl
- Upload date:
- Size: 53.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55f4beeb5e6d2a8ee827d4d6ae9bf7e6901baf400538f9df3c1edbe96393c026
|
|
| MD5 |
5e18c95d6917e781a93cd8130f3180df
|
|
| BLAKE2b-256 |
b8425c679d75502bd292e0bfa9718ac8410814c641118d4be2f3b9ffa6c5f85d
|