Reading the repo
Reading the repo
How to install on macOS
Up to 71.5x fewer tokens per session on Claude Code with Obsidian + Graphify. Persistent memory, codebase knowledge graphs, and chat import pipeline. 🇧🇷 PT-BR included.
Saved setup from just now
Will it work on macOS?
1. Install the Claude Code extractor:
pip install claude-conversation-extractor
2. Create staging directories:
mkdir -p ~/claude-exports/code ~/claude-exports/web
3. Create the post-processing script (~/scripts/claude_to_obsidian.py):
The script should:
.md file[[wikilinks]] for notes that already exist in the vaultchats/code/ or chats/web/ inside the vaultExample keyword-to-tag mapping:
KEYWORD_TAG_MAP = {
"python": "python",
"react": "react",
"supabase": "supabase",
"deploy": "deploy",
"bug": "debugging",
"refactor": "refactoring",
# add your own
}
4. Create the automation script (~/scripts/sync_claude_obsidian.sh):
#!/bin/bash
EXPORT_DIR="$HOME/claude-exports"
VAULT_DIR="$HOME/vault" # adjust to your path
SCRIPT_DIR="$HOME/scripts"
LOG="$SCRIPT_DIR/sync.log"
echo "[$(date)] Sync started" >> "$LOG"
# Export Claude Code chats
claude-extract --all --output "$EXPORT_DIR/code" 2>> "$LOG"
# Process and send to vault
python3 "$SCRIPT_DIR/claude_to_obsidian.py" \
--export-dir "$EXPORT_DIR" \
--vault-dir "$VAULT_DIR" \
--move 2>> "$LOG"
echo "[$(date)] Sync completed" >> "$LOG"
5. Schedule automatic execution:
chmod +x ~/scripts/sync_claude_obsidian.sh
# Run daily at 10 PM
(crontab -l 2>/dev/null; echo "0 22 * * * $HOME/scripts/sync_claude_obsidian.sh") | crontab -
6. For Claude Web chats:
Install the "Export Claude Chat to Markdown" browser extension for Chrome/Edge. Do periodic bulk exports, save the .md files to ~/claude-exports/web/, and the cron job handles the rest.
7. Add a section to the vault's CLAUDE.md:
## Chat Import Pipeline
### Structure
- `chats/code/` → imported Claude Code conversations
- `chats/web/` → imported Claude Web/App conversations
- All chats get frontmatter with `type: chat` and `chat-import` tag
### Filter in Graph View
- `tag:chat-import` → chats only
- `-path:chats` → hide chats
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install
git clone https://github.com/lucasrosati/claude-code-memory-setup.git cd claude-code-memory-setup
Python 3
brew install python
In the maintainers' order. Do the README instructions above first — they cover steps outside the terminal.
pip install claude-conversation-extractor mkdir -p ~/claude-exports/code ~/claude-exports/web EXPORT_DIR="$HOME/claude-exports" VAULT_DIR="$HOME/vault" # adjust to your path SCRIPT_DIR="$HOME/scripts" LOG="$SCRIPT_DIR/sync.log" echo "[$(date)] Sync started" >> "$LOG" claude-extract --all --output "$EXPORT_DIR/code" 2>> "$LOG" python3 "$SCRIPT_DIR/claude_to_obsidian.py" \ --export-dir "$EXPORT_DIR" \ --vault-dir "$VAULT_DIR" \ --move 2>> "$LOG" echo "[$(date)] Sync completed" >> "$LOG" chmod +x ~/scripts/sync_claude_obsidian.sh (crontab -l 2>/dev/null; echo "0 22 * * * $HOME/scripts/sync_claude_obsidian.sh") | crontab -
No reports for macOS yet.
Opens a chat with this manual already filled in, for macOS. It uses your own account; gitmanual sends nothing.