Enable Ctrl+V image pasting for AI agents (for example, Claude Code) on Linux and macOS so the agent can access the currently copied image.
Assume a tmp/ directory at the repository root (or it will fallback to /tmp) that is listed in .gitignore.
Add the following shell function to .zshrc or .bashrc. Ensure wl-paste, wtype, and notify-send are installed (typically available on standard Linux distributions).
Then add the corresponding configuration to Kitty.
map ctrl+alt+v launch --type=background --cwd=current -- bash /path/to/pasteimage.sh
just press ctrl+alt+v when you are in claude code and it would show the [Image #1] thing:
▐▛███▜▌ Claude Code v2.0.33
▝▜█████▛▘ Sonnet 4.5 · API Usage Billing
▘▘ ▝▝ /home/chmouel/git/perso/stuff
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> [Image #1]
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
⏵⏵ accept edits on (shift+tab to cycle)