npx claudepluginhub vranac/claude-session-export-obsidianExport Claude Code sessions to Obsidian markdown with full conversation, project detection, and frontmatter
Export Claude Code conversations to Obsidian-compatible markdown with full user/assistant conversation, automatic project detection, and clean YAML frontmatter.
/plugin marketplace add vranac/claude-session-export-obsidian
Then run the interactive setup:
/session-export:setup
/session-export:setup to configure your vault path, hooks, and project mapcse export --today| Command | Description |
|---|---|
/session-export:setup | Interactive onboarding — vault path, hook scope, project map, shell alias |
/session-export:sync | Sync current session to Obsidian markdown |
/session-export:export | Batch export: --today, --all, --project NAME, --memory, or specific file |
/session-export:note | Append timestamped note to current session |
For batch export outside of Claude Code, add a shell alias to ~/.zshrc:
alias cse="uv run ~/.claude/plugins/marketplaces/claude-session-export-obsidian/skills/session-export/scripts/claude-session-export.py"
Then:
cse export --today # export today's sessions + memories
cse export --all # export all sessions + memories
cse export --project my-project # export by project + memories
cse export --memory # export memories only (no sessions)
cse export --memory --project my-project # memories for one project
cse sync --session-id UUID # sync a specific session + its memories
cse note "some note" --session-id UUID # add a note
Path to your Obsidian vault(s). The script resolves it in this order:
VAULT_DIR environment variable (shell profile, Claude Code settings, or parent process).env file in current working directorySet it in your shell profile:
# ~/.zshrc
export VAULT_DIR="$HOME/obsidian-vault"
Or create a .env file:
VAULT_DIR=/Users/you/obsidian-vault
For per-project overrides (e.g., client vault):
// .claude/settings.local.json
{ "env": { "VAULT_DIR": "/path/to/client-vault" } }
Comma-separated paths export to multiple vaults simultaneously. Directory paths cannot contain commas, so commas are a safe delimiter:
VAULT_DIR="/Users/you/obsidian-personal,/Users/you/obsidian-client"
Each vault has its own project-map.yaml, so the same session can have different project names or thinking settings per vault. JSONL files are parsed once and written to all vaults. Output is prefixed with the vault name:
[obsidian-personal] Synced: .../my-project/2026-03-27-1030-abc12345.md
[obsidian-client] Synced: .../my-project/2026-03-27-1030-abc12345.md
If a vault's config is missing or broken, it's skipped with a warning — other vaults continue.
Create $VAULT_DIR/project-map.yaml to configure output and map encoded directory names to project names:
output_dir: Claude-Sessions # top-level folder name in vault (default: Claude-Sessions)
projects:
my-project:
patterns:
- "-Users-you-dev-my-project"
- "-Users-you-dev-my-project-*"
another-project:
patterns:
- "-Users-you-dev-another-project-*"
Each project uses a patterns: key containing a list of encoded directory names to match. Per-project options can be added alongside patterns::
projects:
research-project:
patterns:
- "-Users-you-dev-research-*"
include_thinking: true
include_commands: false
include_tool_context: true
A shorthand list format (without the patterns: key) is also supported but cannot include per-project options.
Matching rules:
To find your encoded directory names:
ls ~/.claude/projects/
include_thinking (default: false) — include Claude's thinking blocks as collapsible Obsidian calloutsinclude_commands (default: true) — include slash command invocations (e.g., /session-export:sync) in the conversation output. Set to false to filter them out.include_tool_context (default: false) — when a user rejects or approves a tool use with a comment, show the proposed change (edit diff, file content, bash command) in a collapsible Obsidian callout alongside the comment. Useful for reviewing what was rejected/approved. Off by default as it can significantly increase file size.Sessions and memories are exported to $VAULT_DIR/{output_dir}/ organized by project: