Turn your Claude Code conversation history into a searchable markdown library + SQLite database
Project description
Your Claude Code conversations, searchable forever.
The Problem
Claude Code stores conversations in ~/.claude/history.jsonl — not searchable, not browsable, not persistent. Claude compacts and deletes old sessions without warning.
pv turns that history into a searchable markdown library + SQLite database. Browse in Obsidian, search from the terminal with fzf. Zero dependencies. Pure stdlib.
Quick Start
# recommended — fast, isolated, always on PATH
uv tool install promptvault-py
# alternative — same idea, traditional tool
pipx install promptvault-py
pv-sync # sync your Claude Code history
pv # browse conversations
pv search "database migration" # full-text search
Don't have uv?
curl -LsSf https://astral.sh/uv/install.sh | sh(docs)Don't have pipx?
brew install pipxorpip install --user pipx(docs)
Both tools install pv into an isolated virtualenv and symlink the executable to ~/.local/bin/, so it's available globally — no environment activation needed.
pvis the short alias.promptvault/promptvault-syncalso work.
Optional: install fzf for the interactive UI (brew install fzf / apt install fzf). Without it, pv falls back to plain text.
How It Works
pv-sync reads history.jsonl, groups prompts by conversation, and generates:
- Markdown vault — One
.mdper conversation,YYYY/MM/structure, YAML frontmatter. Drop into Obsidian. - SQLite database — FTS5 full-text search with BM25 ranking. Millisecond queries.
The sync is idempotent — always rebuilds from source, impossible to reach a bad state. Resolves pasted-text placeholders, deduplicates prompts, filters slash commands, cleans whitespace.
Commands
All commands launch fzf by default (split pane: conversation list + live preview). Add --no-fzf for plain text.
| Command | Description |
|---|---|
pv |
Browse all conversations interactively |
pv search "query" |
Full-text search ranked by relevance |
pv recent [N] |
Last N conversations (default 20) |
pv list [--date DATE] [--project NAME] |
Filter by date or project |
pv stats |
Vault overview |
pv-sync |
Rebuild vault + database |
Controls: Up/Down navigate, Enter opens in $EDITOR, Ctrl-Y copies, Esc quits
Real-Time Capture
A Claude Code hook captures prompts the moment you send them — no sync needed.
Add to ~/.claude/hooks.json:
{
"hooks": {
"UserPromptSubmit": [{
"hooks": [{
"type": "command",
"command": "python3 /path/to/promptvault/promptvault/hook.py",
"timeout": 5000
}]
}]
}
}
Fast (<50ms), silent (no stdout), safe (errors swallowed). Captures to ~/.claude/prompt-library/capture.jsonl.
Windows: use
pythoninstead ofpython3and backslash paths.
Markdown Vault
Each conversation becomes an Obsidian-compatible .md with YAML frontmatter:
~/.claude/prompt-library/vault/
├── _index.md
├── 2026/
│ └── 03/
│ ├── 2026-03-25__c792e74f__refactor-user-auth.md
│ └── ...
Open as an Obsidian vault. The Calendar plugin works well for browsing.
Environment Variables
| Variable | Default |
|---|---|
PROMPTVAULT_HISTORY |
~/.claude/history.jsonl |
PROMPTVAULT_OUTPUT |
~/.claude/prompt-library |
PROMPTVAULT_DB |
~/.claude/prompt-library/prompts.db |
PROMPTVAULT_VAULT |
~/.claude/prompt-library/vault |
PROMPTVAULT_PROJECTS |
~/.claude/projects |
PROMPTVAULT_CAPTURE_LOG |
~/.claude/prompt-library/capture.jsonl |
Contributing
Contributions welcome! See CONTRIBUTING.md. 187 tests, all synthetic data.
git clone https://github.com/reidemeister94/promptvault.git
cd promptvault
uv tool install --editable . # global "pv" that tracks your local source
make setup-dev-env
make test && make lint
License
MIT
Project details
Release history Release notifications | RSS feed
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 promptvault_py-0.0.4.tar.gz.
File metadata
- Download URL: promptvault_py-0.0.4.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a271384d394145680a6073f7a2c914af8176c3911dba47109018db4705deb9d3
|
|
| MD5 |
647c7b561202751db8a521577eb0b388
|
|
| BLAKE2b-256 |
61349c6d1db7e62768a23eac1f0a647facb6c8f5343c563af67b0c280c628d83
|
Provenance
The following attestation bundles were made for promptvault_py-0.0.4.tar.gz:
Publisher:
publish.yml on reidemeister94/promptvault
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
promptvault_py-0.0.4.tar.gz -
Subject digest:
a271384d394145680a6073f7a2c914af8176c3911dba47109018db4705deb9d3 - Sigstore transparency entry: 1185536038
- Sigstore integration time:
-
Permalink:
reidemeister94/promptvault@03469bfcc31aac62f8e3db0042dca27fc313bf4e -
Branch / Tag:
refs/tags/0.0.4 - Owner: https://github.com/reidemeister94
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@03469bfcc31aac62f8e3db0042dca27fc313bf4e -
Trigger Event:
push
-
Statement type:
File details
Details for the file promptvault_py-0.0.4-py3-none-any.whl.
File metadata
- Download URL: promptvault_py-0.0.4-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f096d04a7dc1b7f500ab08732e12d0e48d0ab3a9cf1d242e3f3789ae20d54c98
|
|
| MD5 |
e02229b67d07e294e40d17814d63d872
|
|
| BLAKE2b-256 |
2aa0a32496bd420b17ab0126ef66ce1494feac7b229dd8c4f702d8c0c633fa88
|
Provenance
The following attestation bundles were made for promptvault_py-0.0.4-py3-none-any.whl:
Publisher:
publish.yml on reidemeister94/promptvault
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
promptvault_py-0.0.4-py3-none-any.whl -
Subject digest:
f096d04a7dc1b7f500ab08732e12d0e48d0ab3a9cf1d242e3f3789ae20d54c98 - Sigstore transparency entry: 1185536072
- Sigstore integration time:
-
Permalink:
reidemeister94/promptvault@03469bfcc31aac62f8e3db0042dca27fc313bf4e -
Branch / Tag:
refs/tags/0.0.4 - Owner: https://github.com/reidemeister94
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@03469bfcc31aac62f8e3db0042dca27fc313bf4e -
Trigger Event:
push
-
Statement type: