Claude Vault
Transform your Claude conversations into a searchable, organized knowledge base in Obsidian.
Quick Start
pip install -e .
claude-vault init # run inside your Obsidian vault folder
claude-vault sync ~/Downloads/conversations.json
That's it. Your conversations are now in conversations/ as Markdown files.
Installation
Requirements: Python 3.9+, optional: Ollama for AI tagging and semantic search.
git clone https://github.com/MarioPadilla/claude-vault.git
cd claude-vault
python3 -m venv venv && source venv/bin/activate
pip install -e .
Optional — Ollama setup for AI features:
ollama serve
ollama pull llama3.2:3b # for tagging & summarization
ollama pull nomic-embed-text # for semantic search
Features
- Local-first — everything stays on your machine, no external APIs required
- Three import formats — Claude Web exports (
.json), Claude Code history (.jsonl), and OpenCode sessions (.db) auto-detected - AI tagging & summarization — local LLM (Ollama) generates tags and summaries; falls back to keyword extraction
- Semantic search — find conversations by concept, not just exact words
- Smart relationship detection — automatically links related conversations via shared tags
- Bi-directional sync — rename or move files freely; UUID tracking keeps everything in sync
- Watch mode — auto-syncs when your export files change
- PII protection — detect, redact, or skip conversations containing personal or sensitive data
- Dry-run mode — preview all changes before writing anything
Usage
Export your conversations
- Go to claude.ai → Settings → Export data
- This downloads
conversations.json - For Claude Code history, point directly at
~/.claude
Sync
# Web export (auto-detected)
claude-vault sync ~/Downloads/conversations.json
# Claude Code history
claude-vault sync ~/.claude
# OpenCode (auto-detected from .db extension)
claude-vault sync ~/.local/share/opencode/opencode.db
# OpenCode (uses default path)
claude-vault sync --source opencode
# Preview changes without writing
claude-vault sync conversations.json --dry-run
Search
# Semantic search (requires Ollama + nomic-embed-text)
claude-vault search "async error handling"
# Keyword search
claude-vault search "python" --mode keyword
# Filter by tag
claude-vault search "API" --tag debugging
Watch mode
claude-vault watch-add ~/Downloads --source web # register a path
claude-vault watch # start (foreground)
claude-vault watch-status
claude-vault watch-stop
PII & sensitive content protection
Scan conversations for personal or confidential data before they are written to disk.
Off by default. Without
--detect-pii(orpii.enabledin the config) nothing is scanned, and a sync writes your conversations exactly as they are, including any password or API key you pasted into a chat.synctells you when it wrote files without a scan. This matters most if your vault lives in a synced folder (Drive, iCloud, Dropbox).
What it looks for:
- Provider tokens: Anthropic, OpenAI, GitHub, GitLab, Google, AWS, Slack, Stripe, Hugging Face, npm, SendGrid
- JWTs,
Authorization: Bearer/Basicheaders, private key blocks, and connection strings with a password name = valuecredentials (password:,api_key=,AWS_SECRET_ACCESS_KEY=...), and long random-looking tokens- Emails, phone numbers, SSNs (US format), credit card numbers (checksum-validated), IP addresses
- If Ollama is running, an LLM pass also classifies broader sensitive content
It is built for coding sessions: git SHAs, hashes, UUIDs, identifiers and token counts are not flagged.
Risk levels: high (SSN, card, provider token, JWT, private key, connection string), medium (email, phone, random token), low (IP, credential context).
# Tag conversations that contain PII (adds pii-* tags + frontmatter fields)
claude-vault sync conversations.json --detect-pii
# Redact PII before writing — stored files contain [REDACTED-EMAIL] etc.
claude-vault sync conversations.json --detect-pii --redact-pii
# Skip conversations at medium risk or above entirely
claude-vault sync conversations.json --detect-pii --skip-sensitive
To make these behaviours permanent, set them in ~/.claude-vault/config.json:
{
"pii": {
"enabled": false,
"redact": false,
"skip_sensitive": false,
"use_llm": true,
"risk_threshold": "medium"
}
}
If the config file cannot be read (invalid JSON, wrong value), Claude Vault warns and falls back to the defaults, which means PII handling is off.
What scanned files look like. Every conversation that went through the scan carries pii_scanned: true, pii_detector (the detector version) and pii_llm (false when only the regex pass ran, for example because Ollama was down). A conversation with none of these was never scanned: treat it as unknown, not as clean. Findings add pii_detected, risk_level and pii_types. When the detector improves, the next PII-enabled sync scans each conversation once more.
Limits to know about
- Redacting the vault does not undo a leak. A key that appeared in a chat was already sent to the model provider. If a real credential shows up, rotate it.
- Your source data is untouched. Claude Code keeps plaintext transcripts in
~/.claude/projects/. Claude Vault only controls what it writes into your vault; it does not clean those files. --skip-sensitivedoes not remove files that already exist. It keeps new sensitive conversations out. If a file was written before, sync lists it ("already in your vault, not removed") and leaves it for you to delete or move.- Detection is pattern matching plus an optional LLM, not a guarantee. It misses secrets that have no recognisable format (for example a bare hex key), and it can flag harmless text. Review a vault before sharing it.
- Redaction covers message text, titles and summaries. A file that already exists keeps its old filename on re-sync.
Other commands
claude-vault status # vault statistics
claude-vault retag # regenerate AI tags (requires Ollama)
claude-vault retag --force # regenerate even existing tags
claude-vault verify # check file/database consistency
claude-vault verify --cleanup # remove orphaned database entries
claude-vault config # view current configuration
Use claude-vault [command] --help for full options on any command.
Configuration
Global config lives at ~/.claude-vault/config.json. Run claude-vault config to view and edit it.
Key settings:
| Section | Key | Default | Purpose |
|---|---|---|---|
ollama |
model |
llama3.2:3b |
Model used for tagging |
ollama |
url |
http://localhost:11434/api/generate |
Ollama endpoint |
embeddings |
model |
nomic-embed-text |
Model used for semantic search |
pii |
risk_threshold |
medium |
Minimum level to tag as sensitive |
pii |
use_llm |
true |
Enable LLM-based classification |
| root | custom_keywords |
null |
Extra tag → keyword mappings for fallback tagging |
Troubleshooting
| Error | Fix |
|---|---|
| "Ollama not running" | Run ollama serve |
| Semantic search returns nothing | Run ollama pull nomic-embed-text |
| "Module not found" | Run pip install -e . |
| "Not initialized" | Run claude-vault init first |
Contributing
Contributions are welcome. Please see CONTRIBUTING.md for setup and pull request guidelines.
License
Claude Vault is dual-licensed:
AGPL-3.0 (free) — for personal use, open-source projects, education, and non-commercial work. Modifications must be shared under the same license.
Commercial license — required for proprietary applications, SaaS products, or any deployment where you cannot comply with AGPL-3.0 copyleft terms. Contact via GitHub for pricing.
| Use case | License |
|---|---|
| Personal / open-source / education | AGPL-3.0 ✅ |
| Internal tool (source shared with employees) | AGPL-3.0 ✅ |
| Commercial SaaS or closed-source product | Commercial 💼 |
| Enterprise deployment (no source disclosure) | Commercial 💼 |
Metadata
Release files for claude-vault 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| claude_vault-0.9.1.tar.gz | 76.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claude_vault-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 128.2 kB
Release files / claude_vault-0.9.1.tar.gz
| Download URL | claude_vault-0.9.1.tar.gz |
|---|---|
| Size | 76.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54da00cd242e9bd80edabfe12d3cdfa4d04c62bb82662367e063c96371c0e7b3
|
|
BLAKE2b-256 checksum How to use checksums |
3d5b97ed51b3475c98e4b2fcec9b127840fbe0df322c9dc5b743e74cd04cd50e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / claude_vault-0.9.1-py3-none-any.whl
| Download URL | claude_vault-0.9.1-py3-none-any.whl |
|---|---|
| Size | 51.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b487c2aba97633c3c177fc7c29c7201164b274571b738a462515ab3b88e83b06
|
|
BLAKE2b-256 checksum How to use checksums |
8a1a3f6915409e34667df1723b9d30d0ab95cb52c243b79a37a7ce6e82b0f133
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|