Herdr — The "Habitat" for Coding Agents, Keeping AI Agents Running Forever
Herdr — The "Habitat" for Coding Agents, Keeping AI Agents Running Forever
One-line summary: Herdr is a background terminal server that keeps AI coding agents like Claude Code, Codex, and Cursor running continuously — even when you close your laptop, lose network, or restart your computer. Agents keep working and you can reconnect anytime.
📌 Project Overview
| Info | Content |
|---|---|
| Project Name | Herdr |
| GitHub | herdrdev/herdr |
| Stars | 26,000+ ⭐ |
| Language | Rust (No Electron, single binary) |
| Platforms | macOS, Linux, Windows Beta |
| License | Apache 2.0 |
| Installs | 363,000+ |
🎯 What Problem Does It Solve?
Imagine this scenario:
You ask an AI coding agent (like Claude Code) to write a Starbucks ordering system. The program is large and takes 3 hours to complete.
Without Herdr:
- You must keep your computer on, cannot close the lid
- Lost network? Program stops
- Agent stuck and needs to ask you a question, but you're out? Done
- Restart computer? Everything starts over
With Herdr:
- Agent runs in your "digital pasture", with or without you
- Close laptop → Agent keeps running
- Lost network → Agent keeps running
- Restart computer → Herdr automatically restores, agent continues
- Agent stuck and needs you → Herdr tells you "which agent is waiting for you"
🏗️ Core Concepts (Explained Simply)
Herdr has several basic concepts, explained with real-world analogies:
1. Workspace = A Large Office
A workspace is a top-level project container. If you're simultaneously working on a "Starbucks Ordering System" and a "Food Delivery System", you can have two workspaces that don't interfere with each other.
2. Tab = Different Whiteboards in the Office
A workspace can have multiple tabs, such as:
agentstab → holds AI agentslogstab → holds logsreviewtab → holds code reviews
3. Pane = Each Agent's "Workstation"
Each pane is a real terminal running an AI agent. Can be split left/right or up/down.
4. Agent = The Programmer You Hired
Herdr automatically recognizes these AI coding agents:
| Agent | Description |
|---|---|
| Claude Code | By Anthropic |
| Codex | By OpenAI |
| Cursor Agent | AI mode in Cursor IDE |
| Pi / OMP | Coding agents |
| OpenCode | Open source agent |
| Grok CLI | By xAI |
| GitHub Copilot CLI | By GitHub |
| Kimi Code CLI | By Moonshot AI |
| ...and many more |
5. Agent State — What Is It Doing?
Herdr automatically determines what each agent is doing:
| State | Meaning |
|---|---|
working 🔵 |
Actively writing code |
blocked 🟡 |
Encountered an issue, needs your answer |
done ✅ |
Finished, waiting for you to review |
idle ⚪ |
Idle or waiting |
unknown ❓ |
Cannot determine |
💡 This is Herdr's smartest feature: You don't need to check each window to find which agent is stuck. The sidebar directly tells you "Project A's agent is waiting for your answer".
🚀 Detailed Installation Tutorial
Method 1: One-Click Install (Easiest)
macOS / Linux:
curl -fsSL https://herdr.dev/install.sh | sh
Windows (Beta):
powershell -ExecutionPolicy Bypass -c "irm https://herdr.dev/install.ps1 | iex"
Method 2: Install with Homebrew
brew install herdr
Method 3: Install with mise
mise use -g herdr
Method 4: Install with Nix
nix run github:herdrdev/herdr/v0.x.y
Method 5: Manual Download
Download the binary for your platform from GitHub Releases:
| System | File |
|---|---|
| Linux x86_64 | herdr-linux-x86_64 |
| Linux ARM64 | herdr-linux-aarch64 |
| macOS Intel | herdr-macos-x86_64 |
| macOS Apple Silicon | herdr-macos-aarch64 |
After download:
chmod +x herdr-linux-x86_64
mv herdr-linux-x86_64 ~/.local/bin/herdr
✅ Verify Installation
herdr
If you see the Herdr interface, the installation succeeded!
📖 Quick Start Tutorial
Step 1: Launch Herdr
Run in any directory:
herdr
Herdr automatically starts or connects to your previous background session.
Step 2: Create a Workspace
Herdr creates one automatically on first launch. Press ctrl+b c to create new tabs.
Step 3: Start an AI Agent
In a pane, type your preferred agent command:
claude
Or:
codex
Or:
pi
Herdr automatically recognizes it as an AI agent and displays its status in the sidebar.
Step 4: Mouse Operations (Completely Optional)
Herdr is mouse-native:
- Click panes/tabs/workspaces to switch
- Drag split borders to resize
- Right-click to create new panes or tabs
- Select text to copy directly (no Ctrl+C needed)
Step 5: Keyboard Operations
| Action | Key |
|---|---|
| Enter command mode | ctrl+b |
| New tab | ctrl+b c |
| Split right | ctrl+b v |
| Split down | ctrl+b - |
| Navigate panes | ctrl+b h/j/k/l or arrow keys |
| Next/Previous tab | ctrl+b n / ctrl+b p |
| Workspace navigation | ctrl+b w |
| Detach (agents keep running) | ctrl+b q |
💡 Press
ctrl+b ?to see all shortcuts.
Step 6: Detach and Resume
Detach (agents keep running):
- Press
ctrl+b q - Or just close the terminal window
Resume:
herdr
Herdr automatically restores your previous session with all agents in their original state.
Complete Stop
herdr server stop
This stops all agents and panes.
🧠 Design Philosophy
Herdr's design philosophy can be summarized as:
1. "Agent-Native"
Herdr is not just a "terminal multiplexer" — it's designed for AI agents.
- Herdr's CLI and Socket API are the same interface agents use to create panes, start other agents, and wait for other agents to truly block
- This is not something tmux can do — tmux is just a terminal multiplexer, doesn't understand AI agents
Simply put: Herdr is a "house" specifically built for AI agents, while tmux is just a regular "apartment".
2. "Non-Invasive"
Herdr does not wrap or replace the agent tools you already use:
- Claude Code remains Claude Code, untouched
- Codex remains Codex, untouched
- Herdr simply "owns" their terminals so they can keep running
This is called "Ownership without Replacement".
3. "Real Terminals"
Every pane in Herdr is a real terminal:
- Not simulated, not fake
- Agents see exactly what they would see running a terminal directly
- Supports all terminal features: ANSI colors, cursor control, OSC sequences
4. "No Electron"
Herdr is written in Rust, compiled into a single binary:
- No Electron, no Node.js dependencies
- Small size, fast startup, low memory footprint
- Runs in your existing terminal (iTerm2, Kitty, Alacritty, Windows Terminal...)
5. "Always Running"
Herdr is a background server:
- Clients can detach and reconnect anytime
- Server and agents run continuously
- Close laptop lid → agents keep running
- This is called "Sessions Survive"
6. "State Rollup"
Herdr aggregates state upward:
- A
blockedagent makes its pane, tab, and workspace all show asblocked - You don't need to check each window to find which agent is stuck
- Sidebar instantly tells you "Project A needs your answer"
7. "Remote-First"
Herdr supports remote connections:
- Connect to remote Herdr via SSH
- Check agent status via SSH on your phone
herdr --remote user@hostin one command
8. "Open Source & Free"
- Fully open source (Apache 2.0)
- Always free (no paywall)
- Community plugin ecosystem: herdr.dev/plugins
📊 Feature Summary
Feature Comparison
| Feature | tmux | screen | Herdr |
|---|---|---|---|
| Terminal persistence | ✅ | ✅ | ✅ |
| Multiplexing | ✅ | ✅ | ✅ |
| AI agent recognition | ❌ | ❌ | ✅ |
| Agent state display | ❌ | ❌ | ✅ |
| State rollup | ❌ | ❌ | ✅ |
| Socket API (agent-driven) | ❌ | ❌ | ✅ |
| Native mouse support | Limited | Limited | ✅ |
| Zero-config out of box | ❌ | ❌ | ✅ |
🔌 Advanced Features
1. Socket API (Interface for Agents)
Herdr provides a Socket API that allows agents to:
- Create new panes
- Send input to other panes
- Wait for a pane to truly block (not blindly waiting)
- Query agent state
This is Herdr's unique capability that no other terminal multiplexer has.
2. Plugin System
Herdr supports plugin extensions:
- Install community plugins
- Customize panes and workflows
- Plugin marketplace: herdr.dev/plugins
3. Git Worktree Integration
Herdr has deep Git worktree integration:
- Create Git worktrees directly from sidebar
- Worktrees managed as independent workspaces
- No manual directory switching needed
4. Remote Workflows
Method 1: SSH remote connection
herdr --remote user@your-server.com
Method 2: SSH to server first, then run Herdr
ssh user@your-server.com
herdr
Method 3: Check status via SSH on phone (read-only)
5. Configuration Management
Herdr config file locations:
- Linux/macOS:
~/.config/herdr/config.toml - Windows:
%APPDATA%\herdr\config.toml
Configurable options:
- Keybindings (prefix key, pane switching, etc.)
- Theme colors
- Notification settings
- SSH connection parameters
- Plugin settings
View default config:
herdr --default-config
🗺️ Use Cases
✅ Perfect For
Long-running code tasks
- Training large models, data processing, batch refactoring
- Let agents run in background while you do other things
Multi-agent parallel work
- Run 3 agents simultaneously developing 3 features
- Sidebar instantly shows which one is waiting for you
Remote server development
- Run agents on server, view via SSH locally
- Run agents on work computer, continue on laptop at home
Interrupt/resume workflows
- Agent needs your answer but you're going out
- Close laptop, agent keeps thinking, resume when you return
❌ Less Suitable For
- Tasks requiring GUI (agents need browser to manipulate UI)
- Very short tasks (tasks finishing in seconds don't need Herdr)
- Windows users (Windows version is Beta, may be unstable)
💡 Key Insights and Conclusions
Insight 1: Herdr Is the "Operating System" for AI Coding Agents
If AI agents are "workers", then Herdr is the "workstation management system":
- Workers (agents) work at workstations (panes)
- Management system (Herdr) ensures workers don't stop just because the boss (you) is away
- When workers encounter problems, the management system notifies you
Insight 2: Herdr Is Not a tmux Replacement, But an Evolution
tmux solves "terminal persistence", Herdr builds on this with "AI agent management".
If you only use tmux for terminal multiplexing, Herdr can do that too, and better.
If you run AI coding agents, Herdr is the only choice.
Insight 3: State Visibility Is Herdr's Core Value
In a project with 5 agents running simultaneously, the most annoying thing is "I don't know which agent is stuck".
Herdr completely solves this through state aggregation (blocked → pane → tab → workspace).
Insight 4: "Agent-Native" Is the Key Differentiator
Herdr's Socket API allows agents to communicate and wait for each other. No other tool has this capability.
As multi-agent collaboration becomes mainstream, Herdr's value will become even more apparent.
Insight 5: Rust Is the Right Choice
- No Electron dependency → small size, fast startup
- Single binary → simple installation
- Good performance → can handle large terminal output volumes
This is the most pragmatic choice for server-side tools.
📝 Summary
Herdr is a terminal workspace manager specifically designed for AI coding agents. Its core values are:
- Keep agents never offline — Agents keep running even when you're away
- Make agent state transparent — Sidebar instantly tells you who's doing what
- Make multi-agent collaboration possible — Socket API supports inter-agent communication
- Zero learning curve — Doesn't change your existing workflow
If you use Claude Code, Codex, Cursor, or other AI coding agents, Herdr is worth having. It transforms AI agents from "need you watching" to "can be托管 (entrusted)".
🔗 Related Links
- Website: https://herdr.dev
- Documentation: https://herdr.dev/docs/
- GitHub: https://github.com/herdrdev/herdr
- Plugin Marketplace: https://herdr.dev/plugins/
- Install Command:
curl -fsSL https://herdr.dev/install.sh | sh
