Start here
One command, a herd of agents
One command sets up herdr with one-key agent launchers and a fleet command to run and drive several AI coding agents at once. This page shows what it installs, how to use it, and how to plan a fleet before you start.
Install
macOS or Linux. Safe to run again.curl -fsSL https://raw.githubusercontent.com/mrx-arafat/herdr-setup/main/install.sh | sh
Downloads install.sh and runs it. It asks before it installs the herdr-plus plugin. Installing a plugin clones a GitHub repository and runs its build script, so read what you install.
curl -fsSL https://raw.githubusercontent.com/mrx-arafat/herdr-setup/main/install.sh | sh -s -- --yes
--yes skips the plugin question. Use it in scripts, or when you already know you want herdr-plus.
curl -fsSL https://raw.githubusercontent.com/mrx-arafat/herdr-setup/main/install.sh -o install.sh less install.sh sh install.sh
Download, read, then run. Nothing is installed until you run the last line.
FLEET_CLAUDE_ARGS="" (and FLEET_CODEX_ARGS, FLEET_AGY_ARGS) when you run fleet up.FLEET_CLAUDE_ARGS="" FLEET_CODEX_ARGS="" FLEET_AGY_ARGS="" fleet up 4 1 claude,codex,agy
Quick Actions always start agents with their checks off. To keep the prompts, run fleet up from a terminal, as above. The planner builds this command for you.
Requirements
| System | macOS or Linux |
| herdr | 0.7.0 or newer. Install: curl -fsSL https://herdr.dev/install.sh | sh or brew install herdr |
| jq | brew install jq or sudo apt install jq |
| curl | Downloads the scripts |
| An agent | At least one CLI, signed in: claude, codex or agy |
Check what you have:
for t in herdr claude codex agy jq curl; do printf '%-8s ' "$t"; command -v "$t" || echo "not found"; done
herdr, jq and curl are required. Of the three agents, one is enough.
What the installer does
- Checks that herdr 0.7.0 or newer, jq and curl are installed.
- Installs the herdr-plus plugin (
herdr plugin install cloudmanic/herdr-plus) after asking you. It asks on your terminal even when piped, and--yesskips the question. - Downloads three scripts (
agent-tab.sh,fleet.sh,herdr-setup.sh) and eight Quick Actions from this repo into~/.config/herdr/plugins/config/cloudmanic.herdr-plus/. It never overwrites a file that exists. - Links the
fleetandherdr-setupcommands into~/.local/binwhen that folder is on your PATH, otherwise prints an alias line. It never replaces an existing command of the same name. - Binds
prefix+upto Projects andprefix+downto Quick Actions in~/.config/herdr/config.toml, after a timestamped backup. It skips keys you already use. - Reloads herdr and runs
herdr config check.
Safe to run again.
Try it in 30 seconds
- Open herdr in a project folder:
cdinto it and runherdr. - Press ctrl+b then ↓. Type
claudeand press Enter. A new tab runs Claude with prompts off. - Press ctrl+b then ↓ again. Type
workers, pickWorkers, then2 workers. A tab namedworkersopens with two Claude panes,w1andw2. - In another pane run
fleet lsto see the workers.
Read more
Use the search box above (press /) to find any command on this page and copy it.
Fleet planner
Plan your workers
Pick a count, how many tabs to spread them over, and which agents. The preview is the exact grid fleet builds, numbered the way you address them.
Preview
Run it
Run it in any pane of the workspace. It returns once every agent is ready for a task.
fleet ls fleet send w1 'your first task' fleet wait all fleet read w1 120
For a whole task list, use
Delegate
Hand out the work
One task per worker. You get the fleet commands to paste, or a prompt that lets the Claude in your claude tab run the whole round and report back.
Tasks
Paste into any pane of the workspace, for example the terminal tab.
It tells the agent to leave every change for your review.
Targets
| Write | Means |
|---|---|
| w3 or 3 | One worker |
| w1,w4 | Several workers |
| all | Every worker in this workspace |
| idle | Workers that are idle or done right now |
Good to know
- Workers in one tab share a folder. Give them different files, or give each task its own worktree.
fleet send --wait all '...'sends and blocks until every worker finishes.- Each task also asks the worker to name itself after it, so
w2becomes something likefix-flaky-orders.w2keeps working as a target. - For a long answer, ask the worker to write a file and reply with its path.
- Named agents work with plain herdr:
herdr agent prompt my-app-w1 '...' --wait. After a rename, use the new name.
Manage & clean
Keep the workspace tidy
See what is running, reset a worker's memory, close what you are done with, and keep the setup healthy.
See what is running safe
Workers with number, name, agent, status, tab and pane. The sidebar shows the same states for every workspace.
fleet ls fleet focus w3 herdr agent list
Jump anywhere: ctrl+b g, or ⌘P in the Herdr app.
Name workers after their work safe
Each worker renames its pane, its herdr agent and its own session after its task, like w1 → pr6969-cool-fix. fleet send asks for this with every task. A renamed worker keeps its number, so w1 still reaches it.
fleet rename fleet rename w2 pr6969-cool-fix
Or type name in Quick Actions. Set FLEET_AUTONAME=0 to send tasks exactly as typed.
Keep it current safe
One command updates herdr, the herdr-plus plugin, herdr's agent integrations and this setup's files. It backs up any file it replaces and never restarts herdr, so running agents keep going.
herdr-setup check herdr-setup update
Run it in a plain terminal to include herdr itself, which refuses to update from inside a herdr pane. Typing update in Quick Actions updates everything else. On an older install that lacks the command, run the installer once with --update.
Reset memory loses context
Claude and Codex workers get /clear, a fresh chat in the same session. Claude's counter then reads 0 tokens. Old text stays in the scrollback.
fleet clear w2 fleet clear all
Agy has no verified clear command. Close and relaunch it instead.
Close workers ends sessions
Closing a worker ends its agent. When a tab's last pane closes, the tab goes too. all asks first.
fleet close w3 fleet close all fleet close all --yes
Close bigger things ends sessions
| One pane | ctrl+b x or ⌘W |
| A workspace | ctrl+b shift+d |
| A worktree | herdr worktree remove --workspace <id> |
| Everything | herdr server stop |
ctrl+b q only detaches. Everything keeps running.
Weekly maintenance
Parallel work without collisions
One worktree per task: a separate checkout on its own branch, opened as its own workspace with a claude tab ready.
cd ~/code/my-app for task in login-form rate-limit audit-log; do herdr worktree create --cwd "$PWD" --branch "feat/$task" --no-focus done herdr worktree list
Pick branch names you want to keep. git worktree prune drops records of worktrees whose folder is gone.
Launch & projects
Three keystrokes to an agent
ctrl+b then ↓ opens Quick Actions. Type the word, press Enter. Everything opens in the folder you are in.
| Type | Entry | Opens |
|---|---|---|
| claude | Claude Dangerously Skip Permission | New tab: claude --dangerously-skip-permissions |
| agy | Agy Dangerously Skip Permission | New tab: agy --dangerously-skip-permissions |
| codex | Codex Dangerously Skip Sandbox | New tab: codex --dangerously-bypass-approvals-and-sandbox |
| grid | Agent Grid 2x2 | Workers w1 claude, w2 codex, w3 agy, w4 shell |
| workers | Workers | One of nine layouts, 2 to 8 workers |
| workers | Workers (custom) | Type a layout, for example 6 2 claude,codex |
| name | Name workers | Every worker renames itself after its task: fleet rename |
| update | Update herdr setup | New tab: herdr-setup update |
Codex has no --dangerously-skip-sandbox flag. The entry keeps that name and runs the real flag.
Add your projects
ctrl+b then ↑ opens the pickerA project is one TOML file in ~/.config/herdr/plugins/config/cloudmanic.herdr-plus/projects/. Pick it in the picker and herdr builds its workspace with the tabs you listed. New files appear the next time you open the picker.
D="$(herdr plugin config-dir cloudmanic.herdr-plus)/projects" mkdir -p "$D" cat > "$D/my-app.toml" <<'EOF' name = "my-app" description = "~/code/my-app" working_dir = "~/code/my-app" [[tabs]] name = "claude" command = "claude --dangerously-skip-permissions" [[tabs]] name = "terminal" EOF
The folder must exist. Change the paths to your own project.
Project file fields
| Field | What it does |
|---|---|
| name | The name shown in the picker. |
| description | Optional grey text next to the name. |
| working_dir | Where every tab starts. ~ and $VARS expand. The folder must exist. |
| [[tabs]] | One tab. Tabs open in file order. |
| name | Inside a [[tabs]] block: the tab label. |
| command | Inside a [[tabs]] block: typed into the tab's shell and run. Leave it out for an empty shell. |
Panes inside a tab, project groups and a per-tab folder are covered in the full guide.
Worktree layout
optionalWith a worktree layout, every new herdr worktree opens ready, for example with a claude tab and a terminal tab. The installer does not turn it on. Copy files/worktrees/default.toml from this repo into the plugin folder's worktrees/ folder to enable it. Delete the file to turn it off.
D="$(herdr plugin config-dir cloudmanic.herdr-plus)/worktrees" mkdir -p "$D" cp files/worktrees/default.toml "$D/" # run from a clone of this repo
Worktree commands
herdr worktree create --cwd "$PWD" --branch <name> --no-focus herdr worktree list herdr worktree remove --workspace <id>
In the Herdr app, ⌘N starts a new worktree.
Keys & shell
Every shortcut, one place
The Herdr app's native shortcuts, herdr's prefix keys, the pickers, and the optional shell suggestions.
No shortcut matches. Try split, tab, close or worktree.
Herdr app (⌘)
Inside a picker
Prefix: ctrl+b then
Shell suggestions
optionalNot part of the installer. This is an optional zsh setup, described in the guide's “Command suggestions in the shell” section: docs/GUIDE.md. If you set it up, these keys apply:
With that zsh setup, herdr-setup update refreshes herdr's completion for you. By hand:
herdr completion zsh > ~/.zfunc/_herdr
Working agreement
Rules worth giving your agents
With permission prompts off, written rules are the safety net. This is a starting point. Put the rules in the file your agent reads, and edit them to match how you work.
Ask first
hard stops- No destructive database commands without asking, even on staging.
- No
git add, commit, push, pull, merge, rebase, reset, stash or checkout unless asked. - Never create or switch branches unasked. Push new branches with
git push -u.
Workflow
- Plan before large changes.
- Reproduce a bug before fixing it.
- Write a failing test first.
Tests and proof
- Run only the tests that cover the change. CI runs the full suite.
- Passing tests are not proof. Run the program.
- Check visible changes in a real browser.
Docs
- Update the docs in the same change as the code.
Where agents read rules
- Claude Code reads
CLAUDE.md(~/.claude/CLAUDE.mdfor every project). - Codex reads
~/.codex/AGENTS.md, plusAGENTS.mdfiles from the project root down. - Agy and Gemini read
~/.gemini/GEMINI.md.
Keep one ~/AGENTS.md and copy it with files/extras/sync-agent-rules from this repo. It is a script that writes a marked block into the Codex and Gemini files and leaves everything else in them alone. It is not installed by default. Run it once, and again after every edit to ~/AGENTS.md.
cp files/extras/sync-agent-rules ~/.local/bin/ && chmod +x ~/.local/bin/sync-agent-rules sync-agent-rules
Run it from the root of a copy of this repo. The second line is the one to rerun later.
Starter rules
Markdown. Edit freely.# Rules for coding agents ## Ask first - Never run destructive database commands without asking first, even on staging. This includes migrate:fresh, db:reset, DROP, TRUNCATE and DELETE without a WHERE. - Never run git add, commit, push, pull, merge, rebase, reset, stash or checkout unless I ask. - Never create or switch branches unless I ask. Push new branches with git push -u. ## Workflow - Plan before large changes. - Reproduce a bug before fixing it. - Write a failing test first. ## Tests and proof - Run only the tests that cover your change. CI runs the full suite. - Passing tests are not proof. Run the program. - Check visible changes in a real browser. ## Docs - Update the docs in the same change as the code.
Tested
What was tested, and what was not
Every row below was run with real agents where it matters. Versions are the ones used.
Versions tested
| Tool | Version |
|---|---|
| herdr | 0.9.3 |
| herdr-plus | 0.1.24 |
| Claude Code | 2.1.296 |
| Codex CLI | 0.162.1 |
| Antigravity CLI | 1.3.3 |
| zsh | 5.9 |
| macOS | 26.5 |
The installer requires herdr 0.7.0 or newer.
Check your own install
herdr config check herdr plugin list herdr integration status fleet ls
herdr config check should print config: ok. herdr plugin list should show herdr-plus enabled.
Test record
| Check | Result |
|---|---|
Quick Actions keyword ranking: typing claude, agy, codex, grid, workers puts the right entry first | Pass |
Claude shows bypass permissions on. Codex shows permissions: YOLO mode | Pass |
| 11 fleet layouts, 1 to 9 workers over 1 to 3 tabs, with equal columns and rows | Pass |
| Agents cycle in order, and numbering continues on a second run | Pass |
Real Claude workers: fleet up returns when they are ready, and send and wait return the replies | Pass |
fleet clear resets context to 0 tokens. fleet close removes workers | Pass |
| The Workers presets and Workers (custom) launch from the picker | Pass |
| Real Claude, Codex and Agy workers rename their pane, agent and session after their task, mid-task too, and keep their number | Pass |
fleet rename me refuses inside Codex, whose commands carry another pane's HERDR_PANE_ID | Pass |
| Installer sandbox suite | Pass |
herdr-setup check and update: a newer herdr, an older herdr-plus, a stale integration, a changed file backed up, a Homebrew herdr | Pass |
A real herdr-setup update: herdr 0.9.3 to 0.9.4 and a stale Codex integration, with 21 agents running and none stopped | Pass |
| All scripts pass shellcheck | Pass |
| Linux and Windows | Not run |
| Physical key presses (they were driven through herdr's CLI instead) | Not run |
| Agy's approval banner, and an Agy clear command | Not run |
| A renamed worker's number across a real herdr server restart | Not run |