Herdr Pluck is a Herdr plugin for quickly copying visible terminal tokens with short keyboard hints, inspired by tmux-fingers.
Invoke the plugin while a pane is focused, type the displayed hint for the token you want, and the selected text is copied to your system clipboard. Escape or Ctrl-C cancels.
- Herdr 0.7.0 or newer
- For release installs, a download tool:
curlorwget
- Rust/Cargo only when forcing a source build or when no matching prebuilt binary is available
- A system clipboard command:
- macOS:
pbcopy - Linux Wayland:
wl-copy - Linux X11:
xcliporxsel
- macOS:
From the remote repository:
herdr plugin install rmarganti/herdr-pluckPublished releases provide prebuilt binaries for these targets:
- macOS Apple Silicon:
aarch64-apple-darwin - Linux x86_64:
x86_64-unknown-linux-musl
To install a specific branch, tag, or commit, pass --ref:
herdr plugin install rmarganti/herdr-pluck --ref mainInstall first downloads the GitHub Release asset matching the version in herdr-plugin.toml. If that asset is unavailable, it falls back to a local Cargo build when Rust is available.
From this checkout:
herdr plugin link .By default, linking also installs the prebuilt binary matching herdr-plugin.toml. To build the checked-out source instead:
HERDR_PLUCK_BUILD_FROM_SOURCE=1 herdr plugin link .Verify Herdr can see the action:
herdr plugin action list --plugin rmarganti.herdr-pluckThe action id is:
rmarganti.herdr-pluck.pluck
Add a Herdr plugin_action binding to your Herdr config, choosing any free key you prefer:
[[keys.command]]
key = "prefix+q"
type = "plugin_action"
command = "rmarganti.herdr-pluck.pluck"
description = "pluck visible token"Reload Herdr config after editing:
herdr server reload-config- Focus a Herdr pane containing a URL, path, commit SHA, UUID, IP address, long numeric identifier, hex literal, Kubernetes reference, Git status path, branch, or diff path.
- Invoke
rmarganti.herdr-pluck.pluckthrough your keybinding or Herdr's plugin action command. - Herdr Pluck opens a temporary picker tab that mirrors the source layout and shows hints over copyable text in the target pane.
- Type the shown one- or two-letter hint to copy that token and close the picker.
- Press Escape or Ctrl-C to cancel without copying.
You can also invoke the action from the CLI:
herdr plugin action invoke rmarganti.herdr-pluck.pluckHerdr Pluck recognizes these built-in token types, in priority order:
- URLs
- Git status paths, Git upstream branch names, and diff paths
- Kubernetes resource references such as
pod/nginxordeployment.apps/frontend - File paths
- UUIDs
- Deployment-managed Kubernetes pod names
- Git SHAs
- Hex literals such as
0xdeadBEEF - IPv4 addresses
- Long numeric identifiers
Custom global patterns can be added in the plugin config directory:
CONFIG_DIR="$(herdr plugin config-dir rmarganti.herdr-pluck)"
$EDITOR "$CONFIG_DIR/config.toml"Example:
[[patterns]]
name = "jira"
regex = "\\b[A-Z][A-Z0-9]+-[0-9]+\\b"
priority = 25Project-local patterns are also enabled by default. Herdr Pluck looks for .herdr-pluck.toml from the focused pane's working directory up to the Git root. Disable or customize this in the global config:
[project]
patterns = true
pattern_files = [".herdr-pluck.toml"]Project-local config files use the same [[patterns]] shape as global config. Pattern precedence for equal-priority overlaps is project-local, then global, then built-ins.
regex uses Rust regular expression syntax. If a named capture called match is present, only that capture is copied; otherwise the whole regex match is copied:
[[patterns]]
name = "trace-id"
regex = "trace_id=(?<match>[A-Za-z0-9_-]+)"
priority = 25For trace_id=abc123, this pattern highlights and copies only abc123.
Lower priority values win overlapping matches. If omitted, custom pattern priority defaults to 25.
When identical text appears more than once, every visible occurrence shows the same hint and copies the same text.
Tag releases as vX.Y.Z. GitHub Actions validates the crate, builds release archives, and uploads platform binaries to the matching GitHub Release.
If invoking the action does nothing useful, check that the plugin is linked and the installed binary exists:
herdr plugin link .
ls -l ./bin/herdr-pluck
herdr plugin action list --plugin rmarganti.herdr-pluckIf no release asset matches the plugin version, make sure Rust/Cargo is available for the local fallback build. Set HERDR_PLUCK_BUILD_FROM_SOURCE=1 to skip the release download and build the checked-out source explicitly.
If copying fails, install one of the supported clipboard tools for your platform and try again.
