A Herdr plugin with two clipboard helpers for AI agent panes:
-
Paste image — gives every AI agent in Herdr the image-paste experience of Claude Code. Press a key → the plugin grabs the image from your clipboard, saves it as a PNG file, and types its absolute path into the focused agent pane (Codex, Gemini CLI). In Claude Code panes the path gets an
[Image #N]prefix — the format of Claude Code's own image paste — because Claude Code ignores a bare path as plain text. The agent reads the file and sees the actual image — the same result as Claude Code's native clipboard paste, which other agent CLIs don't have. If the clipboard contains text instead of an image, the plugin pastes the text, so binding it to a direct key does not break normal pasting. -
Dedent clipboard — TUI agents (Codex, …) render output with a left margin, so mouse-copied text carries extra leading spaces on every line. The dedent action strips the shared leading whitespace from all clipboard lines while preserving relative indentation (nested lists, code).
- Reads an image from the clipboard:
- WSL (Windows clipboard) via
powershell.exe - Linux via
wl-paste(Wayland) orxclip(X11)
- WSL (Windows clipboard) via
- Saves it as
paste-YYYYMMDD-HHMMSS.pnginto a configurable directory (default:~/.local/state/herdr-paste-images/) - Types the absolute path into the focused pane with
herdr pane send-text - Shows a Herdr notification with the saved path
- Herdr 0.7.4+
- WSL with
powershell.exeon PATH, or Linux withwl-paste/xclip jqandbase64
From GitHub (after publishing):
herdr plugin install <owner>/herdr-paste-imageLocal development:
git clone https://github.com/<owner>/herdr-paste-image
herdr plugin link /path/to/herdr-paste-imageAdd to ~/.config/herdr/config.toml:
[[keys.command]]
key = "f9"
type = "shell"
command = "/home/qo0d/.local/bin/herdr plugin action invoke paste-image.dedent"
description = "strip shared indent from clipboard text"
[[keys.command]]
key = "f8"
type = "shell"
command = "/home/qo0d/.local/bin/herdr plugin action invoke paste-image.paste"
description = "paste clipboard image as path"Reload the config with prefix+shift+r (or restart Herdr) after editing.
Use the absolute path of your herdr binary in command.
Version notes (tested on Herdr 0.7.4 / WSL2 / Windows Terminal):
type = "plugin_action"withcommand = "paste-image.paste"is the documented form, but it did not fire on 0.7.4 — usetype = "shell"as above. On newer Herdr versions, tryplugin_actionfirst.- Direct
ctrl+vnever reaches Herdr: Windows Terminal intercepts it as text paste.alt+varrives asESC+vand 0.7.4 does not reassemble it into a chord. Function keys (e.g.f8) andprefixbindings are reliable. - Claude Code has native clipboard image paste of its own (Alt+V on Windows/WSL); other agents (Codex, …) do not — that is exactly the gap this plugin fills.
Find the plugin config directory:
herdr plugin config-dir paste-imageCreate a config.env file there:
image_dir=~/pictures/agent-pastes # absolute path, ~ is expandedPriority: HERDR_PASTE_IMAGE_DIR env var → image_dir in config.env →
default ~/.local/state/herdr-paste-images/.
# put an image in your clipboard (e.g. Win+Shift+S on Windows),
# then:
herdr plugin action invoke paste-image.paste
# copy text with extra indentation, then:
herdr plugin action invoke paste-image.dedentA notification should appear and the path should be typed into the focused
pane. Plugin logs: herdr plugin log list --plugin paste-image.
Herdr's marketplace indexes public GitHub repositories tagged
herdr-plugin that contain a valid
herdr-plugin.toml. Push this repo, add the topic herdr-plugin, and anyone
can install it with herdr plugin install <owner>/herdr-paste-image.
MIT — see LICENSE.
Site & contact: grooni.com