Herdr Annotate adds comments to copied terminal text in Herdr. It collects annotations as Markdown for use with any agent.
- Herdr 0.8.0 or later
- Bun
- macOS, Linux, or Windows
On Linux, install wl-clipboard, xclip, or xsel for clipboard access.
On Windows, native Herdr plugin support is preview/best-effort. Bun must be on PATH. Clipboard access uses PowerShell; no extra clipboard package is required. The install, keybinding, configuration check, reload, and use instructions below also apply on Windows.
herdr plugin install plannotator/herdr-annotateAdd these key bindings to Herdr's config:
- macOS and Linux:
~/.config/herdr/config.toml - Windows:
%APPDATA%\herdr\config.toml
[[keys.command]]
key = "prefix+a"
type = "plugin_action"
command = "annotate.capture"
description = "annotate text"
[[keys.command]]
key = "prefix+shift+a"
type = "plugin_action"
command = "annotate.copy-context"
description = "copy annotations as context"
[[keys.command]]
key = "prefix+m"
type = "plugin_action"
command = "annotate.manage"
description = "manage annotations"Make sure that the configuration is valid:
herdr config checkReload the configuration:
herdr server reload-config- Select terminal text in Herdr.
- Press
Ctrl+B A. - Enter a comment.
- Press
Ctrl+Sto save the annotation.
Press Ctrl+B M to manage annotations. Press Ctrl+B Shift+A to copy all annotations as Markdown.
The manager shows the newest annotations first. Press y to copy one annotation or c to copy all annotations. A successful copy closes the manager and keeps the annotations saved.
Press Shift+C to copy all active annotations, archive the set, and clear the active list. Press Tab to browse archives. In the archive view, press y to copy a set, u to restore it, or d twice to permanently delete it.
Herdr Annotate reads text that Herdr copies to the system clipboard. The plugin cannot read selection state from Neovim or another terminal application.
bun install
bun test
bun run typecheck
herdr plugin link "$PWD" --enabledAdd this visual-mode mapping to ~/.config/nvim/lua/config/keymaps.lua for LazyVim, or to init.lua:
vim.keymap.set("x", "<leader>a", function()
vim.cmd('normal! "+y')
vim.fn.jobstart({
"herdr",
"plugin",
"action",
"invoke",
"annotate.capture",
})
end, { desc = "Annotate in Herdr" })Select text with the mouse or Visual mode. Then press <leader>a to open Herdr Annotate.
LazyVim uses Space as <leader> by default. The mapping keeps mouse support and leaves normal Neovim commands unchanged.
