All posts

tmux tip: Add Obsidian notes to Claude Code context

1 min read

When working with Claude Code, I often want to reference documents from my Obsidian vault.

Using tmux-file-picker, you can bind a key to open a fuzzy finder in a popup, scoped to your vault's markdown files:

.tmux.conf
bind C-n display-popup -E "TMUX_FILE_PICKER_FD_FLAGS='-H --type f -e md' tmux-file-picker '/Users/raine/Library/Mobile Documents/iCloud~md~obsidian/Documents/raine'"

The TMUX_FILE_PICKER_FD_FLAGS environment variable overrides the default fd flags, filtering to only show .md files. Now prefix + Ctrl-n opens a fuzzy finder scoped to your vault's markdown files.

Fuzzy finder popup showing Obsidian markdown files

Select one or more notes, and they're inserted into your terminal with the @ prefix that Claude Code recognizes as file references.


Thanks for reading! You can check out my projects on GitHub or follow me on Twitter.