百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
H

herdr-plus

> 编程语言
开源

这是一个为 herdr 打造的扩展,作为一款一流的 herdr 插件 — — 包含一系列可以提升其功能的工具:项目和快速操作。

188 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

这是一个为 herdr 打造的扩展,作为一款一流的 herdr 插件 — — 包含一系列可以提升其功能的工具:项目和快速操作。

herdr-plus

herdr-plus is an add-on for herdr, built as a first-class herdr plugin. It adds two things:

  • Projects — declarative herdr-workspace templates you fuzzy-pick to spin up a whole workspace (every tab and pane, every startup command) in one keypress.
  • Quick Actions — a fuzzy launcher for one-off actions/scripts, run in the directory you launched from.

Install

herdr-plus is a herdr plugin (requires herdr ≥ 0.7.0). Installing it registers the plugin's actions with herdr — no editing of your config.toml.

bash
herdr plugin install cloudmanic/herdr-plus

herdr clones the repo, runs the manifest's [[build]] step, and registers the actions. That step prefers a local Go toolchain (an exact build of the source) and falls back to downloading the latest prebuilt release binary, so it works with or without Go. Manage it with herdr plugin list, herdr plugin action list --plugin cloudmanic.herdr-plus, and herdr plugin uninstall cloudmanic.herdr-plus.

Windows (herdr's Windows support is in preview): the plugin installs and runs on Windows, but its build step compiles straight from source with the Go toolchain — there's no prebuilt-binary fallback like the Linux/macOS sh script has — so Go must be on your PATH to herdr plugin install. The plugin talks to herdr over a named pipe there instead of a unix socket; it's validated against the herdr Windows beta.

Local development: build the binary and link your checkout in place:

bash
make build
herdr plugin link /path/to/herdr-plus     # or: make plugin-link

Just the binary

If you'd rather have herdr-plus on your PATH (e.g. to run herdr-plus version), prebuilt binaries are published on every release:

bash
# Homebrew (the repo is its own tap)
brew tap cloudmanic/herdr-plus https://github.com/cloudmanic/herdr-plus
brew install cloudmanic/herdr-plus/herdr-plus

# or the install script (Linux/macOS, no Homebrew)
curl -fsSL https://raw.githubusercontent.com/cloudmanic/herdr-plus/main/install.sh | sh

The binary on its own doesn't register the plugin with herdr — use herdr plugin install (above) for that. Every merge to main cuts a new release with cross-compiled binaries.

Configuration

herdr-plus keeps its config in herdr's managed plugin directory — find it with:

bash
herdr plugin config-dir cloudmanic.herdr-plus
# → ~/.config/herdr/plugins/config/cloudmanic.herdr-plus

Inside it, projects/ holds your project templates and quick-actions/ your actions. herdr provisions this directory and keeps it across uninstall/upgrade. (Running the binary outside herdr falls back to ~/.config/herdr-plus/, honoring $XDG_CONFIG_HOME.)

Optional global settings live in config.toml in that same directory:

toml
[worktree]
branch_prefix = "your-name/" # used verbatim; include your own trailing /

[projects]
placement = "zoomed" # overlay, popup, split, tab, or zoomed; default is zoomed

[quick_actions]
placement = "overlay" # overlay, popup, split, tab, or zoomed; default is overlay

placement controls how herdr opens each picker — see herdr's plugin pane open --placement for what each value does. popup is a good fit for either picker if you want a small floating window that leaves your tiled layout untouched, rather than the default zoomed/overlay takeover. An empty or invalid value falls back to the built-in default and prints a warning to stderr rather than being passed through to herdr.

Projects

Pick a project from a full-screen fuzzy browser and herdr-plus builds its whole workspace. Trigger it from herdr's plugin action menu, or bind a key — the action is cloudmanic.herdr-plus.projects. Inside the browser, Enter opens the highlighted project as a normal workspace; ctrl+g opens it as a git worktree. The worktree prompt accepts an optional branch name: empty lets herdr generate worktree/..., bare names get the optional [worktree] branch_prefix, and names containing / are used as-is.

Opening as a worktree fills its tabs from a matching worktree auto-layout — a file in worktrees/ whose repo matches — not the project's own [[tabs]]. Without a matching layout the worktree opens with herdr's default single pane, so add a worktrees/ file for any repo you open this way.

A project is one TOML file in the projects/ subdir of herdr-plus's config dir. The file name doesn't matter; add a file to add a project, delete it to remove it. With no files there, the browser shows an onboarding card.

toml
name = "Options Cafe"
description = "The main options.cafe monorepo"
working_dir = "~/Development/options-cafe/options.cafe"   # ~ and $VARS expand

[[tabs]]
name = "claude"
command = "claude --dangerously-skip-permissions --chrome"

[[tabs]]
name = "lazygit"
command = "lazygit"

[[tabs]]
name = "terminal"   # no command — just an empty shell

Tabs open in file order. The first tab reuses the workspace's root tab; the rest are created behind it. A tab with no command is just an empty shell.

A directory per tab

The project's working_dir is where every tab starts. A tab — or a single pane — can override it with its own working_dir, which is what a monorepo usually wants:

toml
name = "Shop"
working_dir = "~/dev/shop"

[[tabs]]
name = "web"
working_dir = "frontend"   # relative to the project → ~/dev/shop/frontend
command = "npm run dev"

[[tabs]]
name = "api"
working_dir = "backend"    # → ~/dev/shop/backend
command = "make run"

[[tabs]]
name = "shell"             # no working_dir → the project's ~/dev/shop

A relative path is resolved against the project's working_dir, so "frontend" means what it looks like. Absolute paths, ~, and $VARS work the same as they do at the project level. Panes inherit their tab's directory unless they set their own:

toml
[[tabs]]
name = "stack"
working_dir = "frontend"

[[tabs.panes]]
command = "npm run dev"          # frontend/

[[tabs.panes]]
command = "psql shop"
split = "right"
working_dir = "../backend/db"    # its own directory instead

Every directory must exist. A missing one is reported before anything opens, so a typo never leaves you a half-built workspace to clean up.

Opening by name (headless)

The picker is interactive, but a project can also be opened directly — no browser, no fuzzy-picking — with the open subcommand:

bash
herdr-plus open harbor-sysadmin

It loads the same templates, resolves the one whose name matches (exactly, or case-insensitively as a fallback), and builds its workspace through the identical code path the picker uses — so there is a single source of truth for the layout. A mistyped name fails with the list of available projects.

Run it from inside herdr (a pane shell, a keybinding, another tool): like every herdr-plus command it reaches the running herdr over its socket, and it asks herdr where your project templates live, so it finds the same ones the picker shows. This is the scriptable entry point for spinning up a known workspace in one shot — handy for shell aliases, scripts, and AI agents. (To get herdr-plus on your PATH, see Just the binary.)

Grouping

A project may set an optional group to cluster related projects under a heading in the browser (handy when one client has several). Projects sharing a group are shown together; group-less ones fall under an Ungrouped heading. Grouping only engages when at least one project sets a group — otherwise the list is plain. Filtering ignores headings: start typing and it collapses to one ranked list.

Split panes within a tab

A tab can hold up to 4 panes. Instead of a single command, give it [[tabs.panes]] entries. Each pane after the first sets split to "down" (stacked) or "right" (side by side) — how it splits off the previous pane. An omitted split defaults to "down". A pane may also set ratio — how much of that split it takes, between 0 and 1, leaving the rest to the pane it splits off. Omitted, the split is even. Each pane may also set an optional label — the name herdr shows on the pane border (when show_agent_labels_on_pane_borders is on). A blank or omitted label leaves the pane's default name untouched.

toml
[[tabs]]
name = "server"

[[tabs.panes]]
label = "Server"
command = "php artisan serve"

[[tabs.panes]]
label = "Assets"
command = "npm run dev"
split = "down"
ratio = 0.3

A tab uses either command or [[tabs.panes]], not both.

Quick Actions

A fuzzy launcher for one-off commands. Trigger it (action cloudmanic.herdr-plus.quick-actions), fuzzy-pick an action, and it runs in the directory you launched from. Actions are TOML files in the quick-actions/ subdir of herdr-plus's config dir (seeded with editable examples on first run). A repo can also ship its own in /.herdr-plus/quick-actions/, shown under a Project heading above your Global ones — this repo ships make build / make test as a live example.

There are three action types:

toml
# command (default) — runs immediately
name = "GitHub"
command = "open https://github.com"
toml
# select — pick from a second fuzzy list; the choice becomes {{.Value}}
name = "Open Repo"
type = "select"
command = "open https://github.com/cloudmanic/{{.Value}}"

[[options]]
label = "Herdr Plus"
value = "herdr-plus"

A select action can build its list at open time instead of hard-coding it. Set options_command in place of [[options]] and it runs fresh every time the action is picked, one option per line of stdout:

toml
# select — options come from a command, so the list follows what is on disk
name = "New Project"
type = "select"
options_command = "ls -1 ~/projects"
command = "cd ~/projects/{{.Value}} && $EDITOR ."

options_command is templated exactly like command, so it can reference {{.WorkDir}} and friends. A line becomes the option's label and value; add a tab to give it a description — herdr-plus\tinstalled shows "installed" beside the row without it ending up in {{.Value}}. If the command fails, the picker shows the error as an unselectable row rather than an empty list.

toml
# form — type a value that becomes {{.Value}}
name = "Search Google"
type = "form"
command = "open 'https://www.google.com/search?q={{.Value | urlquery}}'"

[form]
prompt = "Search Google for"

The command is a Go template rendered against the launch context: {{.WorkDir}} (where you launched from), {{.SessionTitle}} (the workspace label), {{.Value}} (select/form input), and more — also exported as HERDR_PLUS_* environment variables. If a command doesn't reference {{.Value}}, the value is appended as a final shell-quoted argument.

Worktree auto-layout

herdr-plus can lay a project-style tab layout into a git worktree the moment herdr creates or opens it. When you run herdr worktree create/open (or use herdr's right-click worktree dialog), herdr makes a fresh workspace for the worktree and fires a worktree.created event (new worktree) or worktree.opened event (existing one); herdr-plus catches either, finds a layout matching the worktree's repo, and opens that layout's tabs and panes in the new workspace — every command running — with no keypress. This is the plugin system's [[events]] hook (declared in herdr-plugin.toml) put to work.

Layouts live in ~/.config/herdr-plus/worktrees/, one TOML file per layout (the file name doesn't matter). A layout is a repo matcher plus the same [[tabs]] format projects use:

toml
repo = "options-cafe"          # matches the worktree's repo name (case-insensit

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Goherdr-plugin

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言